[pypy-commit] pypy default: Crash with a fatal warning when trying to translate PyPy with --sandbox.

2017-04-22 Thread arigo
Author: Armin Rigo 
Branch: 
Changeset: r91118:13ba684a8c50
Date: 2017-04-22 23:47 +0200
http://bitbucket.org/pypy/pypy/changeset/13ba684a8c50/

Log:Crash with a fatal warning when trying to translate PyPy with
--sandbox. People that really want to play with it can remove the
"assert 0".

diff --git a/pypy/goal/targetpypystandalone.py 
b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -307,6 +307,9 @@
 config.translation.jit = True
 
 if config.translation.sandbox:
+assert 0, ("--sandbox is not tested nor maintained.  If you "
+   "really want to try it anyway, remove this line in "
+   "pypy/goal/targetpypystandalone.py.")
 config.objspace.lonepycfiles = False
 
 if config.objspace.usemodules.cpyext:
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: Fix / clean up more tests.

2017-04-22 Thread mjacob
Author: Manuel Jacob 
Branch: 
Changeset: r91117:b6eb464863f4
Date: 2017-04-22 23:23 +0200
http://bitbucket.org/pypy/pypy/changeset/b6eb464863f4/

Log:Fix / clean up more tests.

diff --git a/pypy/module/test_lib_pypy/test_md5_extra.py 
b/pypy/module/test_lib_pypy/test_md5_extra.py
--- a/pypy/module/test_lib_pypy/test_md5_extra.py
+++ b/pypy/module/test_lib_pypy/test_md5_extra.py
@@ -68,9 +68,7 @@
 w_m2c = space.call_method(w_m2, 'copy')
 
 # Update and compare...
-for i in range(len(cases)):
-message = cases[i]
-
+for message in cases:
 m1c.update(message)
 d1 = m1c.hexdigest()
 
@@ -147,13 +145,10 @@
  "57edf4a22be3c955ac49da2e2107b67a"),
 )
 
-for i in range(len(cases)):
-res = self.compare(cases[i][0])
+for message, expectedResult in cases:
+res = self.compare(message)
 if res is not None:
 d1, d2 = res
-message, expectedResult = cases[i][0], None
-if len(cases[i]) == 2:
-expectedResult = cases[i][1]
 self.print_diff(message, d1, d2, expectedResult)
 assert res is None
 
@@ -182,27 +177,25 @@
 "123456789 123456789 123456789 12345678",
 )
 
-for i in range(len(cases)):
-res = self.compare(cases[i][0])
+for message in cases:
+res = self.compare(message)
 if res is not None:
 d1, d2 = res
-message = cases[i][0]
 self.print_diff(message, d1, d2)
 assert res is None
 
 def test3(self):
 """Test cases with long messages (can take a while)."""
 cases = (
-(2**10*'a',),
-(2**10*'abcd',),
-#(2**20*'a',),  # 1 MB, takes about 160 sec. on a 233 Mhz Pentium.
+2**10*'a',
+2**10*'abcd',
+#2**20*'a',  # 1 MB, takes about 160 sec. on a 233 Mhz Pentium.
 )
 
-for i in range(len(cases)):
-res = self.compare(cases[i][0])
+for message in cases:
+res = self.compare(message)
 if res is not None:
 d1, d2 = res
-message = cases[i][0]
 self.print_diff(message, d1, d2)
 assert res is None
 
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy default: Fix test to make a bit more sense.

2017-04-22 Thread mjacob
Author: Manuel Jacob 
Branch: 
Changeset: r91116:9ef459636100
Date: 2017-04-22 23:06 +0200
http://bitbucket.org/pypy/pypy/changeset/9ef459636100/

Log:Fix test to make a bit more sense.

diff --git a/pypy/module/test_lib_pypy/test_md5_extra.py 
b/pypy/module/test_lib_pypy/test_md5_extra.py
--- a/pypy/module/test_lib_pypy/test_md5_extra.py
+++ b/pypy/module/test_lib_pypy/test_md5_extra.py
@@ -69,7 +69,7 @@
 
 # Update and compare...
 for i in range(len(cases)):
-message = cases[i][0]
+message = cases[i]
 
 m1c.update(message)
 d1 = m1c.hexdigest()
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit


[pypy-commit] pypy.org extradoc: update the values

2017-04-22 Thread arigo
Author: Armin Rigo 
Branch: extradoc
Changeset: r881:6bdf17522e91
Date: 2017-04-22 21:16 +0200
http://bitbucket.org/pypy/pypy.org/changeset/6bdf17522e91/

Log:update the values

diff --git a/don1.html b/don1.html
--- a/don1.html
+++ b/don1.html
@@ -15,7 +15,7 @@
 
 

-   $66793 of $105000 (63.6%)
+   $66798 of $105000 (63.6%)


 
@@ -23,7 +23,7 @@
   
   This donation goes towards supporting Python 3 in 
PyPy.
   Current status:
-we have $2601 left
+we have $2605 left
   in the account. Read proposal
   
   
diff --git a/don4.html b/don4.html
--- a/don4.html
+++ b/don4.html
@@ -17,7 +17,7 @@
2nd call:

-   $59050 of $8 (73.8%)
+   $59060 of $8 (73.8%)


 
@@ -29,7 +29,7 @@
   
   

[pypy-commit] pypy quad-color-gc: Add import script for qcgc

2017-04-22 Thread ntruessel
Author: Nicolas Truessel 
Branch: quad-color-gc
Changeset: r91115:5d861f5ae857
Date: 2017-04-22 13:00 +0200
http://bitbucket.org/pypy/pypy/changeset/5d861f5ae857/

Log:Add import script for qcgc

diff --git a/rpython/translator/c/src/qcgc/import_qcgc.py 
b/rpython/translator/c/src/qcgc/import_qcgc.py
new file mode 100755
--- /dev/null
+++ b/rpython/translator/c/src/qcgc/import_qcgc.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+'''Usage: import_qcgc.py [PATH_TO_QCGC]'''
+import sys
+import py.path
+
+
+# Configuration
+whitelist = ['src', 'config.h', 'qcgc.c', 'qcgc.h']
+
+
+def main(qcgc_dir):
+qcgc_src = py.path.local(qcgc_dir)
+include = lambda f: len(set([ x.basename for x in f.parts()]) & 
set(whitelist)) > 0
+qcgc_files = qcgc_src.visit(fil=include, rec=include)
+qcgc_dest = py.path.local(__file__).join('..')
+for src_file in qcgc_files:
+dest_file = qcgc_dest.join(src_file.relto(qcgc_src))
+dest_file.join('..').ensure(dir=True)
+if dest_file.check():
+dest_file.remove()
+src_file.copy(dest_file)
+
+
+if __name__ == '__main__':
+if len(sys.argv) != 2:
+print(__doc__)
+sys.exit(2)
+main(sys.argv[1])
___
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit