Re: [Python-Dev] A new JIT compiler for a faster CPython?

2012-07-21 Thread Michael Foord
On 20 Jul 2012, at 17:50, Maciej Fijalkowski wrote: > On Fri, Jul 20, 2012 at 2:55 PM, Michael Foord > wrote: > > On 17 Jul 2012, at 23:04, mar...@v.loewis.de wrote: > > >> [snip...] > > > >> I would like to use a JIT to generate specialized functions for a > >> combinaison of arguments types

Re: [Python-Dev] A new JIT compiler for a faster CPython?

2012-07-21 Thread Antoine Pitrou
On Sat, 21 Jul 2012 11:45:21 +0100 Michael Foord wrote: > > On 20 Jul 2012, at 17:50, Maciej Fijalkowski wrote: > > > On Fri, Jul 20, 2012 at 2:55 PM, Michael Foord > > wrote: > > > > On 17 Jul 2012, at 23:04, mar...@v.loewis.de wrote: > > > > >> [snip...] > > > > > >> I would like to use a

Re: [Python-Dev] cpython: Issue #15168: Move importlb.test to test.test_importlib.

2012-07-21 Thread Brett Cannon
On Fri, Jul 20, 2012 at 4:12 PM, Antoine Pitrou wrote: > On Fri, 20 Jul 2012 20:49:03 +0200 (CEST) > brett.cannon wrote: > > diff --git a/Lib/importlib/test/__init__.py > b/Lib/test/test_importlib/__init__.py > > rename from Lib/importlib/test/__init__.py > > rename to Lib/test/test_importlib/__

Re: [Python-Dev] cpython (3.2): ISsue #14988: restore Python 2's behavior of raising ImportError when unable to

2012-07-21 Thread Georg Brandl
This looks like it will give an "error return without exception set" if the "if (expat_capi)" directly before the change is true, and expat_capi is then set to NULL in the branch. Georg On 07/17/2012 01:25 PM, eli.bendersky wrote: > http://hg.python.org/cpython/rev/d896fd0a8ba7 > changeset: 781

Re: [Python-Dev] cpython: Optimize tostringlist by taking the stream class outside the function. It's now

2012-07-21 Thread Georg Brandl
Uh, optimizations are not exactly what I want to see during feature freeze. Georg On 07/17/2012 02:10 PM, eli.bendersky wrote: > http://hg.python.org/cpython/rev/51978f89e5ed > changeset: 78156:51978f89e5ed > user:Eli Bendersky > date:Tue Jul 17 15:09:12 2012 +0300 > summary: >

Re: [Python-Dev] cpython: Optimize tostringlist by taking the stream class outside the function. It's now

2012-07-21 Thread Eli Bendersky
On Sat, Jul 21, 2012 at 5:43 PM, Georg Brandl wrote: > Uh, optimizations are not exactly what I want to see during feature freeze. > This is not a new optimization. It fixes a performance regression introduced by an earlier bugfix changeset (for http://bugs.python.org/issue1767933). Eli

Re: [Python-Dev] cpython (3.2): ISsue #14988: restore Python 2's behavior of raising ImportError when unable to

2012-07-21 Thread Eli Bendersky
On Sat, Jul 21, 2012 at 5:41 PM, Georg Brandl wrote: > This looks like it will give an "error return without exception set" > if the "if (expat_capi)" directly before the change is true, and > expat_capi is then set to NULL in the branch. > > Georg > Good catch! I'll fix it soon. Eli > On 07/1

[Python-Dev] four easy documentation patches

2012-07-21 Thread Chris Jerdonek
I was wondering if someone could review the following minor documentation patches: Document that filecmp.dircmp comparisons are "shallow" (7/5/2012): http://bugs.python.org/issue15250 Document dircmp.left and dircmp.right (7/6/2012): http://bugs.python.org/issue15269 Update "PyPI package display

[Python-Dev] test_hashlib

2012-07-21 Thread Kristján Valur Jónsson
I was hit by this today. in test_hashlib.py there is this: def test_unknown_hash(self): self.assertRaises(ValueError, hashlib.new, 'spam spam spam spam spam') self.assertRaises(TypeError, hashlib.new, 1) but in hashlib.py, there is this code: except ImportError: pass # no e

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Antoine Pitrou
On Sat, 21 Jul 2012 21:29:50 + Kristján Valur Jónsson wrote: > > The code will raise ValueError when int(1) is passed in, but the > unittests expect a TypeError. Well, if test_hashlib passes, surely your analysis is wrong, no? -- Software development and contracting: http://pro.pitrou.net

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Amaury Forgeot d'Arc
2012/7/21 Antoine Pitrou : > Kristján Valur Jónsson wrote: >> >> The code will raise ValueError when int(1) is passed in, but the >> unittests expect a TypeError. > > Well, if test_hashlib passes, surely your analysis is wrong, no? In the normal case, yes: >>> import hashlib >>> hashlib.new(1) T

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Guido van Rossum
I think I see Kristján's point: the pure Python implementation handles errors differently than the C implementation, so the unittest fails if the pure Python version is enabled. I imagine this is a general problem that often occurs when a pure Python version is normally shadowed by a C extension, u

Re: [Python-Dev] venv scripts for fish and csh shells

2012-07-21 Thread Andrew Svetlov
I created http://bugs.python.org/issue15417 with required activation scripts. If there are no objections I like to commit it after, say, three days. On Thu, Jul 19, 2012 at 7:31 PM, Carl Meyer wrote: > On 07/19/2012 10:26 AM, Andrew Svetlov wrote: >> virtualenv has virtualenv.csh and virtualenv.f

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Kristján Valur Jónsson
Indeed, shame on me for not mentioning this. I rarely have the full complement of externals available when I'm doing python work, and it struck me that this unitest was failing. I suppose it should be possible to write unittests that test more than one particular implementation. K _

Re: [Python-Dev] test_hashlib

2012-07-21 Thread R. David Murray
On Sun, 22 Jul 2012 01:05:35 -, =?iso-8859-1?Q?Kristj=E1n_Valur_J=F3nsson?= wrote: > Indeed, shame on me for not mentioning this. > I rarely have the full complement of externals available when I'm doing > python work, and it struck me that this unitest was failing. > I suppose it should be

Re: [Python-Dev] test_hashlib

2012-07-21 Thread Gregory P. Smith
Fixed. The TypeError in this nonsense never gonna work use case is now consistent in 2.7, 3.2 and 3.3. On Sat, Jul 21, 2012 at 7:10 PM, R. David Murray wrote: > On Sun, 22 Jul 2012 01:05:35 -, > =?iso-8859-1?Q?Kristj=E1n_Valur_J=F3nsson?= wrote: > > Indeed, shame on me for not mentioning thi