[pypy-commit] pypy py3.5: hg merge default
Author: Ronan Lamy Branch: py3.5 Changeset: r87911:bc30265a8f9a Date: 2016-10-22 19:15 +0100 http://bitbucket.org/pypy/pypy/changeset/bc30265a8f9a/ Log:hg merge default diff --git a/pypy/doc/faq.rst b/pypy/doc/faq.rst --- a/pypy/doc/faq.rst +++ b/pypy/doc/faq.rst @@ -397,3 +397,13 @@ in auto-generated C code, and at least some knowledge about the various components involved, from PyPy's own RPython source code to the GC and possibly the JIT. + + +Why doesn't PyPy move to GitHub, Gitlab, ...? +-- + +We've been quite happy with bitbucket.org. Moving version control systems and +hosting is a lot of hard work: On the one hand, PyPy's mercurial history is +long and gnarly. On the other hand, all our infrastructure (buildbots, +benchmarking, etc) would have to be adapted. So unless somebody steps up and +volunteers to do all that work, it will likely not happen. diff --git a/pypy/module/array/test/test_array.py b/pypy/module/array/test/test_array.py --- a/pypy/module/array/test/test_array.py +++ b/pypy/module/array/test/test_array.py @@ -2,7 +2,18 @@ import pytest -class BaseArrayTests: +class AppTestArray(object): +spaceconfig = {'usemodules': ['array', 'struct', 'binascii']} + +def setup_class(cls): +cls.w_array = cls.space.appexec([], """(): +import array +return array.array +""") +cls.w_tempfile = cls.space.wrap( +str(pytest.ensuretemp('array').join('tmpfile'))) +cls.w_maxint = cls.space.wrap(sys.maxint) + def test_ctor(self): assert len(self.array('i')) == 0 @@ -173,13 +184,6 @@ raises(ValueError, a.frombytes, a) def test_fromfile(self): - -## class myfile(object): -## def __init__(self, c, s): -## self.c = c -## self.s = s -## def read(self,n): -## return self.c*min(n,self.s) def myfile(c, s): f = open(self.tempfile, 'wb') f.write(c * s) @@ -242,12 +246,12 @@ assert repr(a) == "array('b', [1, 2, 1, 2])" def test_fromunicode(self): -raises(ValueError, self.array('i').fromunicode, 'hi') +raises(ValueError, self.array('i').fromunicode, u'hi') a = self.array('u') -a.fromunicode('hi') +a.fromunicode(u'hi') assert len(a) == 2 and a[0] == 'h' and a[1] == 'i' -b = self.array('u', 'hi') +b = self.array('u', u'hi') assert len(b) == 2 and b[0] == 'h' and b[1] == 'i' def test_sequence(self): @@ -344,23 +348,6 @@ except ValueError: assert not ok -def test_reversingslice_pre26(self): -import sys -if sys.version_info >= (2, 6): -skip('arrays can handle more slice ops than lists in 2.6') - -for a in range(-4, 5): -for b in range(-4, 5): -for c in [-4, -3, -2, -1, 1, 2, 3, 4]: -lst = [1, 2, 3] -arr = self.array('i', lst) -for vals in ([4, 5], [6], []): -try: -lst[a:b:c] = vals -except ValueError: -raises(ValueError, - "arr[a:b:c]=self.array('i', vals)") - def test_toxxx(self): a = self.array('i', [1, 2, 3]) l = a.tolist() @@ -406,7 +393,7 @@ assert repr(a) == "array('b', [104, 105])" raises(ValueError, self.array('i').tounicode) -assert self.array('u', 'hello').tounicode() == 'hello' +assert self.array('u', u'hello').tounicode() == u'hello' def test_empty_tostring(self): a = self.array('l') @@ -770,17 +757,16 @@ self.height = height return self -def _index(self, xy): -x, y = xy +def _index(self, x, y): x = min(max(x, 0), self.width-1) y = min(max(y, 0), self.height-1) return y * self.width + x def __getitem__(self, i): -return array.__getitem__(self, self._index(i)) +return array.__getitem__(self, self._index(*i)) def __setitem__(self, i, val): -return array.__setitem__(self, self._index(i), val) +return array.__setitem__(self, self._index(*i), val) img = Image(5, 10, 'B') for y in range(10): @@ -846,8 +832,8 @@ assert repr(mya('i', (1, 2, 3))) == "array('i', [1, 2, 3])" def test_unicode_outofrange(self): -a = self.array('u', '\x01\u263a\x00\ufeff') -b = self.array('u', '\x01\u263a\x00\ufeff') +a = self.array('u', u'\x01\u263a\x00\ufeff') +b = self.array('u', u'\x01\u263a\x00\ufeff') b.byteswap() assert a != b @@ -962,34 +948,6 @@ assert a ==
[pypy-commit] pypy.org extradoc: tweak and fix for issue #2424
Author: Matti Picus Branch: extradoc Changeset: r811:2d8cc7009dbd Date: 2016-10-22 22:30 +0300 http://bitbucket.org/pypy/pypy.org/changeset/2d8cc7009dbd/ Log:tweak and fix for issue #2424 diff --git a/download.html b/download.html --- a/download.html +++ b/download.html @@ -205,9 +205,13 @@ Installing more modules -The recommended way is to install pip, which is the standard package +There are as yet few distribution-ready packages. +We recommend installing pip, which is the standard package manager of Python. It works like it does on CPython as explained in the http://doc.pypy.org/en/latest/install.html";>installation documentation. +If you use your distribution's PyPy package we recommend you install packages +into a virtualenv. If you try to build a module and the build process complains +about “missing Python.h”, you may need to install the pypy-dev package. Installing NumPy diff --git a/source/download.txt b/source/download.txt --- a/source/download.txt +++ b/source/download.txt @@ -216,13 +216,19 @@ Installing more modules --- -The recommended way is to install ``pip``, which is the standard package +There are as yet few distribution-ready packages. +We recommend installing ``pip``, which is the standard package manager of Python. It works like it does on CPython as explained in the -`installation documentation`_. +`installation documentation`_. + +If you use your distribution's PyPy package we recommend you install packages +into a virtualenv. If you try to build a module and the build process complains +about "missing Python.h", you may need to install the pypy-dev package. .. _installation documentation: http://doc.pypy.org/en/latest/install.html + Installing NumPy --- ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: describe using a packaged PyPy, fixes issue #2424
Author: Matti Picus Branch: Changeset: r87912:9c7523abf0d0 Date: 2016-10-22 22:39 +0300 http://bitbucket.org/pypy/pypy/changeset/9c7523abf0d0/ Log:describe using a packaged PyPy, fixes issue #2424 diff --git a/pypy/doc/install.rst b/pypy/doc/install.rst --- a/pypy/doc/install.rst +++ b/pypy/doc/install.rst @@ -1,8 +1,17 @@ Downloading and Installing PyPy === +Using a packaged PyPy +~ + +Some Linux distributions provide a pypy package. Note that in order to +install additional modules that require compilation, you may need to install +additional packages such as pypy-dev. This will manifest as an error about +"missing Python.h". Distributions do not as of yet supply many pypy-ready +packages, if you require additionall modules we recommend creating a virtualenv +and using pip. + .. _prebuilt-pypy: - Download a pre-built PyPy ~ @@ -38,6 +47,9 @@ and not move the binary there, else PyPy would not be able to find its library. +Installing more modules +~~~ + If you want to install 3rd party libraries, the most convenient way is to install pip_ using ensurepip_ (unless you want to install virtualenv as explained below; then you can directly use pip inside virtualenvs): ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: typo (marberi)
Author: Matti Picus Branch: Changeset: r87913:f7d69cd47b5f Date: 2016-10-22 23:58 +0300 http://bitbucket.org/pypy/pypy/changeset/f7d69cd47b5f/ Log:typo (marberi) diff --git a/pypy/doc/install.rst b/pypy/doc/install.rst --- a/pypy/doc/install.rst +++ b/pypy/doc/install.rst @@ -8,7 +8,7 @@ install additional modules that require compilation, you may need to install additional packages such as pypy-dev. This will manifest as an error about "missing Python.h". Distributions do not as of yet supply many pypy-ready -packages, if you require additionall modules we recommend creating a virtualenv +packages, if you require additional modules we recommend creating a virtualenv and using pip. .. _prebuilt-pypy: ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit