Change version to 3.0.0rc1
Change version to 3.0.0rc1
Fix ajax string argument

The ajax.send function fails every time it is called with a string
parameter. This happens because the ‘send’ javascript function tests
for ‘params.$keys.length==0’ before checking if it is a string, and
strings don’t have ‘$keys’.

This change fixes the problem, and continues to work for the empty
dictionary case (when $keys.length==0) which is perfectly handled by
the ‘for’ loop over the length of keys.
Lint fixes
Minor
Merge pull request #51 from juancarlospaco/master

Lint Fixes JS
Background styles
Merge pull request #50 from joaoventura/master

Fix ajax string argument
Merge pull request #52 from juancarlospaco/master

[CSS] Background styles
Add configs useful for development
Merge pull request #53 from juancarlospaco/master

Add configs useful for development
Fix importing packages in Lib/site-packages

Suppose you have the following package (or folder) inside
Lib/site-packages/:

mypackage/
    __init__.py   -> with only a print(“On init”)
    hello.py        -> with only a print(“On hello”)

The most common way to import my package.hello is:

“from mypackage import hello”.

However, this imports correctly mypackage/__init__.py (printing the “On
init”), but then it is not able to import hello.py. This happens
because a flag that says that “mypackage” is a real package is not set
to true. Then, the importing code does not continue to the importing of
“hello.py”.

This patch sets the $package flag of a package in site-packages to
‘true’ when Brython was successfully able to import a
packagename/__init__.py file.

It fixes the problem and is working fine on Firefox 32, Chrome 38 and
Safari 7.1.
Fix the slice bug described in issue #55

The previous code was not taking into account that a developer can use
‘strange’ slice indexes, like [0:200] when a list has only [1,2,3].
Therefore,  there were some bounds that were not respected, like
limiting the “stop” argument to the maximum length of the list.

The previous code, for [1,2,3][1:200] would return [1,2,3,None……197x
None] .

This patch is based on the CPython code at
https://hg.python.org/cpython/file/3d4d52e47431/Objects/sliceobject.c#l1
32. The following answer at stackoverflow was also relevant for the
problem:
http://stackoverflow.com/questions/12173856/implementing-python-slice-no
tation?answertab=votes#tab-top

This patch only fixes issues related with retrieving items from a list.
There are still issues with slices for deleting and assignment, but
that will be handled later.
Fixes issue #56 (number of replacements in string)

Brython is not respecting the ‘count’ argument to replace only a few
occurrences on a string. This patch fixes that by implementing a loop
instead of using Regular Expressions.

Regular expressions are slow in current browser implementations, and
this loop is at least 400% faster than using Regex in pure javascript
as can be seen in this jsperf:
http://jsperf.com/string-replace-comparison.
Add Fork with GitHub ribbon, more CSS tweaks
Better button text
Merge pull request #59 from juancarlospaco/master

Add Fork with GitHub ribbon, more CSS tweaks
Remove styles from doc_brython.css
Merge branch 'master' of https://github.com/brython-dev/brython
Restore tests/header.py