[issue16957] shutil.which() shouldn't look in working directory on unix-y systems

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99db73ce8374 by Serhiy Storchaka in branch '3.3':
Fix pathext test for shutil.which() which was
http://hg.python.org/cpython/rev/99db73ce8374

New changeset ab0ff935126c by Serhiy Storchaka in branch 'default':
Fix pathext test for shutil.which() which was
http://hg.python.org/cpython/rev/ab0ff935126c

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc21f8e83062 by Serhiy Storchaka in branch '2.7':
Don't run the test for issue #16335 when -M is not specified.
http://hg.python.org/cpython/rev/fc21f8e83062

New changeset e3d1b68d34e3 by Serhiy Storchaka in branch '3.2':
Increase the memory limit in the test for issue #16335.
http://hg.python.org/cpython/rev/e3d1b68d34e3

New changeset 43907b88ce93 by Serhiy Storchaka in branch '3.3':
Increase the memory limit in the test for issue #16335.
http://hg.python.org/cpython/rev/43907b88ce93

New changeset fcdb35b114ab by Serhiy Storchaka in branch 'default':
Increase the memory limit in the test for issue #16335.
http://hg.python.org/cpython/rev/fcdb35b114ab

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Bigmem test in 2.7 ran even if -M option is not specified and this causes the 
memory error. But memuse parameter should be increased (I tested with smaller 
sizes and found that 1 + 4 // len(u'\U0001') is not enough, but 2 + 4 // 
len(u'\U0001') is enough). Let's see if it helps.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Bigmem test in 2.7 ran even if -M option is not specified and this
> causes the memory error.

Ah, yes, that's because you should have used `size` instead
of `_testcapi.UINT_MAX` inside the test.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Ah, yes, that's because you should have used `size` instead
> of `_testcapi.UINT_MAX` inside the test.

This test has sense only if size % (_testcapi.UINT_MAX + 1) == 0.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

The test is fixed here, thanks.

The limits appear to be different in 2.7 and 3.4:  In 2.7 the bigmem tests
are executed with -M x > 16G, in 3.4 with -M x >= 12G.

I don't know if that's deliberate, just mentioning it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

> It is in the combination with jumpahead(), getstate(), setstate() that you'll 
> experience random() to produce values >= 1.0

Let me reiterate what David said: Can you post a self-contained program
that exhibits the issue?

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Due to PEP 393 Python 3.3+ requires less memory for temporary output buffer. As 
for difference between ">" and ">=", the meaning of -M parameter a little 
differs in 2.7 and 3.x -- in 2.7 some overhead (5MiB) counted up.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16686] audioop overflow issues

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can anyone look at the patch? I want fix this issue before 2.7.4 RC released.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17028] launcher

2013-01-25 Thread Thomas Heller

New submission from Thomas Heller:

The python launcher does not parse the shebang if arguments for the Python 
interpreter are given on the command line.  For example:

py.exe test.py # uses shebang line
py.exe -u test.py # does NOT use shebang line

The attached patch fixes this.

--
components: Windows
files: launcher.patch
keywords: patch
messages: 180565
nosy: theller
priority: normal
severity: normal
stage: patch review
status: open
title: launcher
type: enhancement
Added file: http://bugs.python.org/file28820/launcher.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I looked into this a bit.  It seems like this is because with the patch, the 
call to "loader.loadTestsFromModule(the_module)" inside regrtest comes before 
the try-finally:

http://hg.python.org/cpython/file/fcdb35b114ab/Lib/test/regrtest.py#l1277

whereas with the current code, the analogous test-loading code is part of 
test.support.run_unittest() and so is protected by the try-finally inside 
test_main().  Apparently, simply discovering/loading tests from 
test_concurrent_futures.py is enough to modify threading._dangling (e.g. when 
finding the tests to pass to load_tests).

I'm not sure yet what the right solution is, but it doesn't seem like test 
discovery should have that side effect.  It could be because of how 
test_concurrent_futures is written, or because of certain initialization code 
in one of the modules it depends on.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16968] Fix test discovery for test_concurrent_futures.py

2013-01-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I confirmed the above by changing regrtest as follows in the patch (moving the 
decorator from load_tests()), and trying both placements of the 
loadTestsFromModule() line.  One gives the warning and one does not:

if test_runner is None:
loader = unittest.TestLoader()
#tests = loader.loadTestsFromModule(the_module)
@support.reap_threads
def test_runner():
try:
tests = loader.loadTestsFromModule(the_module)
support.run_unittest(tests)
finally:
support.reap_children()
test_runner()

This is mostly a suggestion though -- not 100%.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13454] crash when deleting one pair from tee()

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f7e14a1af609 by Serhiy Storchaka in branch '3.2':
Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
http://hg.python.org/cpython/rev/f7e14a1af609

New changeset eff2a7346243 by Serhiy Storchaka in branch '3.3':
Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
http://hg.python.org/cpython/rev/eff2a7346243

New changeset 02d7a127fdfb by Serhiy Storchaka in branch 'default':
Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
http://hg.python.org/cpython/rev/02d7a127fdfb

New changeset 62f2d3f6015e by Serhiy Storchaka in branch '2.7':
Issue #13454: Fix a crash when deleting an iterator created by itertools.tee()
http://hg.python.org/cpython/rev/62f2d3f6015e

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13454] crash when deleting one pair from tee()

2013-01-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Serhiy Storchaka added the comment:
> 
> > Ah, yes, that's because you should have used `size` instead
> > of `_testcapi.UINT_MAX` inside the test.
> 
> This test has sense only if size % (_testcapi.UINT_MAX + 1) == 0.

Why so? Does it fail otherwise?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16335] Integer overflow in unicode-escape decoder

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The test passed in any case, but for different size it doesn't check that the 
bug is fixed. Due to the bug bytes b'\\N{SPACE...xxx'}' decoded as 
b'\\N{SPACE'}' if the number of x-es divisible by (UINT_MAX + 1). In this case 
unicode-escape decoding doesn't failed when the bug not fixed and failed (as 
expected) when the bug fixed. For all other numbers (>0) the decoding fails as 
when the bug fixed so when the bug is not fixed. And for other numbers the test 
is not relevant.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17029] h2py.py: search the multiarch include dir if it does exist

2013-01-25 Thread Matthias Klose

New submission from Matthias Klose:

On MultiArch systems, header files are split into /usr/include and 
/usr/include/. Make sure that h2py finds all headers. 
Currently the build of IN.py is broken, when running on such a system.

--
components: Build
files: ma-h2py.diff
keywords: patch
messages: 180571
nosy: doko
priority: normal
severity: normal
status: open
title: h2py.py: search the multiarch include dir if it does exist
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28821/ma-h2py.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17029] h2py.py: search the multiarch include dir if it does exist

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5981425cc48e by doko in branch '2.7':
- Issue #17029: Let h2py search the multiarch system include directory.
http://hg.python.org/cpython/rev/5981425cc48e

New changeset 039e17133391 by doko in branch '3.2':
- Issue #17029: Let h2py search the multiarch system include directory.
http://hg.python.org/cpython/rev/039e17133391

New changeset c97447e36665 by doko in branch '3.3':
- Issue #17029: Let h2py search the multiarch system include directory.
http://hg.python.org/cpython/rev/c97447e36665

New changeset f69eced9ff9d by doko in branch 'default':
- Issue #17029: Let h2py search the multiarch system include directory.
http://hg.python.org/cpython/rev/f69eced9ff9d

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Since Rietveld didn't mail me this time: I left some comments on the 2.7 patch.

--
versions: +Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17030] strange import visibility

2013-01-25 Thread Stephan

New submission from Stephan:

$ cat a.py
import dbus
import b
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
print "Hello, World."
$ cat b.py
import dbus.mainloop.glib
$ python a.py
Hello, World.
$

If I remove the “import b” line, the output is:

$ python a.py
Traceback (most recent call last):
  File "a.py", line 3, in 
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
AttributeError: 'module' object has no attribute 'mainloop'
$

In my opinion this is inconsistent. Either both versions should fail with that 
error, because “dbus.mainloop.glib” is imported in “b”, not “a”; or both should 
succeed, because “a” imports dbus.

This is Python 2.7.3 and python-dbus 1.0.0 on Ubuntu 12.4.2

--
components: Interpreter Core
messages: 180574
nosy: geryon
priority: normal
severity: normal
status: open
title: strange import visibility
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

> 2-CROSS-use-_PYTHON_PROJECT_BASE-in-distutils-sysconfig.patch

This looks ok to me, just factoring out some code and setting the project base. 
Even if distutils is frozen, I'll apply this one, based on Eric's comment in 
http://bugs.python.org/issue14330#msg164406

> 2-CROSS-set-_PYTHON_PROJECT_BASE-to-current-build-dir.patch

I'll use abs_builddir instead.

--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17030] strange import visibility

2013-01-25 Thread R. David Murray

R. David Murray added the comment:

I agree that this is not immediately intuitive.

What you need to know is that modules are part of the global state.  When b 
imports dbus.mainloop.glib, it affects the global state of the module dbus, 
causing mainloop.glib to be defined when 'a' references it.

The fact that modules are global state is inherent in Python's design, and is 
the reason that "monkey patching" works.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

and adding the pybuilddir to PYTHONPATH, so that _sysconfigdata.py is found if 
it does exist.

$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2e7c85399f5 by doko in branch '3.3':
- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
http://hg.python.org/cpython/rev/b2e7c85399f5

New changeset 172fec65c882 by doko in branch 'default':
- Issue #15484: Fix _PYTHON_PROJECT_BASE for srcdir != builddir builds;
http://hg.python.org/cpython/rev/172fec65c882

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Matthias Klose

Changes by Matthias Klose :


--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

The 2.7 comments also apply to the 3.2 patch. Otherwise the 3.2 patch
(without the _sre changes :) looks good to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4c97d2d464ad by doko in branch '3.3':
- Issue #16292: Improve a comment for cross building in configure.ac
http://hg.python.org/cpython/rev/4c97d2d464ad

New changeset 4feff8c8250b by doko in branch 'default':
- Issue #16292: Improve a comment for cross building in configure.ac
http://hg.python.org/cpython/rev/4feff8c8250b

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

updated the comment, the fixes for the duplicate issues are checked in.

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17029] h2py.py: search the multiarch include dir if it does exist

2013-01-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17030] strange import visibility

2013-01-25 Thread Stephan

Stephan added the comment:

Thanks! I was not aware of this yet.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3718] environment variable MACHDEP and python build system

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

the change to the configure script looks ok. however you could change the 
README too.

It looks like the changes to the Makefile.pre.in are already applied.

--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10782] Not possible to cross-compile due to poor detection of %lld support in printf

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

in 3.3 and later, the test defaults to no when cross-building. If gcc is used 
for the cross build, then a compile test is used. 

it is usually needed to provide some values in a CONFIG_SITE file. See autoconf 
for the details.

closing the issue.

--
nosy: +doko
status: languishing -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15483] CROSS: initialise include and library paths in setup.py

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

I don't think this one is still necessary. can it be closed?

--
nosy: +doko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17031] fix running regen in cross builds

2013-01-25 Thread Matthias Klose

New submission from Matthias Klose:

currently regen calls the python interpreter for the host, not the build 
machine. You can't directly use BUILD_FOR_PYTHON, because this one uses 
./python explicitly, so use BUILDPYTHON instead.

I'd like to see this for 3.3 and the trunk.

--
assignee: doko
components: Cross-Build
files: regen.diff
keywords: needs review, patch
messages: 180588
nosy: doko
priority: normal
severity: normal
status: open
title: fix running regen in cross builds
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28822/regen.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9290] IDLE and Command line present different behavior for sys.stdin

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset def4cd7e0a9f by Serhiy Storchaka in branch '2.7':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/def4cd7e0a9f

New changeset 0d26f3aa7a8f by Serhiy Storchaka in branch '3.2':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/0d26f3aa7a8f

New changeset 9dfbd65d5041 by Serhiy Storchaka in branch '3.3':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/9dfbd65d5041

New changeset 458b36fb12bc by Serhiy Storchaka in branch 'default':
Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
http://hg.python.org/cpython/rev/458b36fb12bc

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16224] tokenize.untokenize() misbehaves when moved to "compatiblity mode"

2013-01-25 Thread Thomas Kluyver

Thomas Kluyver added the comment:

I think this is a duplicate of #8478.

--
nosy: +takluyver

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8478] tokenize.untokenize first token missing failure case

2013-01-25 Thread Thomas Kluyver

Thomas Kluyver added the comment:

#16224 appears to be a duplicate.

There seem to be several quite major issues with untokenize - see also #12691 - 
with patches made to fix them. Is there anything I can do to help push these 
forwards?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3754] cross-compilation support for python build

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 11a18263ceb7 by doko in branch '2.7':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/11a18263ceb7

New changeset e28b30e6eee6 by doko in branch '3.2':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/e28b30e6eee6

New changeset 5464a534e7bd by doko in branch '3.3':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/5464a534e7bd

New changeset ee48728e3695 by doko in branch 'default':
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
http://hg.python.org/cpython/rev/ee48728e3695

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ram Rachum

New submission from Ram Rachum:

Every single time I see the error message `global name 'X' is not defined` I 
say to myself, "ah yeah, I mistyped a variable name."

But then it occurred to me, why should I have to do this mental translation 
from "global name not defined" to "I mistyped a variable name"?

Now, I'm not asking for the error message to say "You mistyped a variable 
name", because that goes too much into second-guessing the user. But can we at 
least drop the reference to a global name? I understand that Python first 
searches the local namespace, and only then in the global namespace, and if the 
name isn't found there then an error is raised. But that doesn't mean that the 
error message should just assume that the variable is supposed to be global. 
It's misleading to say that a variable is global when it's in fact local.

I think that the error message should just say `Variable 'X' not defined`. 
Maybe add a suggestion `(Typo?)` at the end.


Example:

>>> def f():
... meow = 0
... return meoow
...
>>> f()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in f
NameError: global name 'meoow' is not defined

I'd make the error message:

NameError: Variable 'meoow' is not defined

--
components: Interpreter Core
messages: 180591
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Misleading error message: global name 'X' is not defined
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ezio Melotti

Ezio Melotti added the comment:

Maybe we could just drop the 'global'.

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Ramchandra Apte

Ramchandra Apte added the comment:

+1 on Ezio's idea.

--
nosy: +ramchandra.apte

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16292] Cross compilation fixes (general)

2013-01-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2013-01-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
versions: +Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3754] cross-compilation support for python build

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

about py3k-20121004-CROSS.tgz:

- committed 0001-CROSS-fix-typo-in-thread-AC_CACHE_VAL.patch

- 0002-CROSS-restore-graminit.-to-source-directory.patch
  is this necessary?  Assuming that you have correct time
  stamps, this is something which usually is not built during
  a cross build.

  Can we just have a shell script which touches some files
  so that you can cross-build even from the repository without
  building pgen?

  Do the release managers have such a script which is run
  when building a release?

- 0003-CROSS-restore-importlib-header-to-source-directory-a.patch

  Same as for 0002, using correct timestamps. The EXEEXT is a
  different issue. However I'm not sure what to use, EXEEXT,
  or BUILDEXEEXT.

- 0004-CROSS-restore-AST-to-source-directory.patch

  Same as for 0002. Btw, does this fail with a native out-of-tree
  build too?

- 0005-CROSS-revert-issue13150-i.e.-python-solution-with-_s.patch
  A comment like "The fix for issue #13150 is bogus and break
  everything" might not the best way to convince maintainers ...

  This works for me, and IMO should be dropped, or please explain
  why this doesn't work for you.

- 0006-CROSS-initialise-include-and-library-paths.patch
  Afaics, a similar patch is now applied. Can be dropped.

- 0007-CROSS-set-_PYTHON_PROJECT_BASE-to-current-build-dir.patch
  Applied.

- 0008-CROSS-use-_PYTHON_PROJECT_BASE-in-distutils-sysconfi.patch
  Applied.

- 0009-CROSS-pass-all-top-configure-arguments-to-libffi-con.patch

  Why is it needed to pass all configure args?

- 0010-CROSS-warn-only-if-readelf-is-not-in-host-triplet-fo.patch

  Why is this needed just for readelf? If you do have a cross
  toolchain installed, then this should be available with
  the triplet name, same as for gcc, as, ...

- 0011-CROSS-append-gcc-library-search-paths-instead-to-pre.patch

  Looks ok. Could you mention where this does make a difference,
  or do you just want to keep the search order as defined by
  the compiler?

- 0012-CROSS-avoid-ncursesw-include-path-hack.patch

  This would break cross-building in a multiarch environment.
  Maybe we need a --with-curses-incdir=<> option.

- 0013-CROSS-properly-detect-WINDOW-_flags-for-different-nc.patch
  This should be a separate issue. Not cross specific.

- 0014-CROSS-use-build-directory-as-root-for-regression-tes.patch
  why is this necessary?

- 0015-CROSS-test-tools-has-to-depend-only-from-location-of.patch
  Looks ok, but not cross specific. Could you file a separate issue?

- 0016-CROSS-reload-may-fail-with-operation-on-closed-file-.patch
  Looks like a separate issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3871] cross and native build of python for mingw* hosts

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

some random comments about py3k-20121004-MINGW.patch:

- Modules/_ctypes/libffi_msvc/win32.S
  Please can you get rid of libffi_msvc and use libffi?
  afaics, libffi has support for mingw32.

- there seem to be chunks which are unrelated to mingw, like:

@@ -830,15 +926,18 @@ class PyBuildExt(build_ext):
 if have_usable_openssl:
 # The _hashlib module wraps optimized implementations
 # of hash functions from the OpenSSL library.
+# NOTE: _hashlib require only OpenSSL crypto library !
 exts.append( Extension('_hashlib', ['_hashopenssl.c'],
depends = ['hashlib.h'],
include_dirs = ssl_incs,
library_dirs = ssl_libs,
-   libraries = ['ssl', 'crypto']) )
+   libraries = ['crypto']) )

please file separate issues.


- why setup_info.in. looks like something which could be done with 
get_config_var.

- why re-reading files in setup.py, and grepping these for config options?


I think the patch would benefit from splitting it up into several 
self-contained chunks.

did you try to do builds for windows and linux after this patch was applied?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Taavi Burns

New submission from Taavi Burns:

Looking at the Misc/RPM/python-X.X.spec files, they seem to be slightly out of 
date. Near the top of the file is a config_binsuffix configuration setting that 
is "2.6" for both the 2.7 and 3.3 branches!

I suspect that it should be updated with the version and libvers variables a 
bit later in the file.

--
components: Build
files: python-2.7.spec.diff
keywords: patch
messages: 180596
nosy: taavi-burns
priority: normal
severity: normal
status: open
title: RPM spec file has old config_binsuffix value
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file28823/python-2.7.spec.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Taavi Burns

Taavi Burns added the comment:

The diff against 3.3.

--
Added file: http://bugs.python.org/file28824/python-3.3.spec.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602133] non-framework python fails to define os.environ properly

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 864b9836dae6 by Ronald Oussoren in branch '2.7':
Issue #1602133: 'environ' is not really available with shared libraries on OSX
http://hg.python.org/cpython/rev/864b9836dae6

New changeset ea9fd9c9c677 by Ronald Oussoren in branch '3.2':
Issue #1602133: 'environ' is not really available with shared libraries on OSX
http://hg.python.org/cpython/rev/ea9fd9c9c677

New changeset 106d1d79c853 by Ronald Oussoren in branch '3.3':
Issue #1602133: 'environ' is not really available with shared libraries on OSX 
(merge from 3.2)
http://hg.python.org/cpython/rev/106d1d79c853

New changeset b41e3e2bd4cc by Ronald Oussoren in branch 'default':
Issue #1602133: 'environ' is not really available with shared libraries on OSX 
(merge from 3.3)
http://hg.python.org/cpython/rev/b41e3e2bd4cc

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602133] non-framework python fails to define os.environ properly

2013-01-25 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
stage: commit review -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17031] fix running regen in cross builds

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

Not an autotools expert, but patch looks good.  Apparently 3.3 is still open to 
such changes.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17028] launcher does not read shebang line when arguments are given

2013-01-25 Thread Thomas Heller

Changes by Thomas Heller :


--
title: launcher -> launcher does not read shebang line when arguments are given

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17027] support for drag and drop of files to tkinter application

2013-01-25 Thread Ned Deily

Ned Deily added the comment:

A feature like drag-and-drop seems like something that needs to be provided at 
either the application level or within Tk or both.  While there is apparently 
no built-in Tk support for drag-and-drop, it appears to be possible to use a Tk 
extension that provides that capability and that will work with Tkinter.  See, 
for example, 
http://stackoverflow.com/questions/14267900/python-drag-and-drop-explorer-files-to-tkinter-entry-widget

--
nosy: +ned.deily
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17031] fix running regen in cross builds

2013-01-25 Thread Matthias Klose

Changes by Matthias Klose :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17031] fix running regen in cross builds

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff5cf42136b3 by doko in branch '3.3':
- Issue #17031: Fix running regen in cross builds.
http://hg.python.org/cpython/rev/ff5cf42136b3

New changeset 1942987921e9 by doko in branch 'default':
- Issue #17031: Fix running regen in cross builds.
http://hg.python.org/cpython/rev/1942987921e9

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16235] Add python-config.sh for use during cross compilation.

2013-01-25 Thread Matthias Klose

Matthias Klose added the comment:

so here is what I intend to commit.

 - --help now does exit with 0 (same as the python script)
 - removed the abi safety check (always compares the same
   two strings)
 - build the script for the build target, so that it can be
   checked before installing it.
 - install the old script in $(LIBPL). Maybe we can remove
   this later, or add this functionality into sysconfig.

--
Added file: http://bugs.python.org/file28825/0001-add-python-config-sh.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 11:07, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
>> It is in the combination with jumpahead(), getstate(), setstate() that 
>> you'll experience random() to produce values >= 1.0
> 
> Let me reiterate what David said: Can you post a self-contained program
> that exhibits the issue?

My program is sort of complex in the meaning of multiple processes interleaving 
and interacting via a priorityqueue.
Each individual steps through multiple classes which all should stay 
independent.
No simple short snippet.
>From what i understand is that issue14591 was able to reproduce the same 
>feature as it seems related to the jumpahead()  malfunctioning.

.F

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9290] IDLE and Command line present different behavior for sys.stdin

2013-01-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Floris van Manen  wrote:
> From what i understand is that issue14591 was able to reproduce the same 
> feature as it seems related to the jumpahead()  malfunctioning.

I'm also quite sure that it's the same issue. It would be nice to have
confirmation though. If you have the opportunity to compile the tip of
the 2.7 branch (where #14591 is fixed), get one of these:

http://hg.python.org/cpython/archive/864b9836dae6.tar.gz
http://hg.python.org/cpython/archive/864b9836dae6.zip

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15031] Split .pyc parsing from module loading

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Nick's suggestions done in changeset 792810303239 .

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16972] Useless function call in site.py

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2c0197c95ec6 by Brett Cannon in branch 'default':
Issue #16972: Have site.addpackage() consider known paths even when
http://hg.python.org/cpython/rev/2c0197c95ec6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16972] Useless function call in site.py

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the bug report, Kirill!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3099] On windows, "import nul" always succeed

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4180] warnings.simplefilter("always") does not make warnings always show up

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue762963] timemodule.c: Python loses current timezone

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12583] More detailed ImportError messages

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Closing as circular imports are not as much of a problem in Python 3.3, 
ImportError now has informational attributes, and namespace packages took care 
of the usefulness of ImportWarning.

--
assignee:  -> brett.cannon
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12652] Keep test.support docs out of the global docs index

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12648] Wrong import module search order on Windows

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Can this be closed, David?

--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11049] add tests for test.support

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

Is this still a problem in clang 3.2?

--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

> I'm not sure how to make hg include a commit message in the patch...
See hg help export.

(In Mercurial, the only objects are changesets; hg log trawls through commit 
messages (with options to see short text, full text, diff), hg diff only shows 
diff, and hg export is the command to output full changesets.)

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12693] test.support.transient_internet prints to stderr when verbose is false

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3329] API for setting the memory allocator used by Python

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2013-01-25 Thread Ezio Melotti

Ezio Melotti added the comment:

It's not necessary to include the commit message and/or use "hg export" though, 
since we don't import patches directly and we write the message ourself when we 
commit.

> (... is there a better way to upload three files?)

You need to upload them individually and "submit changes" 3 times, but it's not 
necessary to write a comment every time.  Also, unless the 3 patches are 
independent, it's usually better to upload a single diff that includes all the 
necessary changes.

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10588] imp.find_module raises unexpected SyntaxError

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

imp.find_module() is now documented as deprecated, so changing the mode that 
files are opened in would change backwards-compatibility but wouldn't be worth 
it.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11676] Improve imp.load_module and submodules doc

2013-01-25 Thread Brett Cannon

Brett Cannon added the comment:

imp.find_module() is now deprecated, so not worrying about adding more details 
to the docs for the function.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13048] Handling of paths in first argument of imp.find_module()

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13047] imp.find_module("") and imp.find_module(".")

2013-01-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17033] RPM spec file has old config_binsuffix value

2013-01-25 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +ncoghlan
stage:  -> patch review
versions: +Python 3.2, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17032] Misleading error message: global name 'X' is not defined

2013-01-25 Thread Éric Araujo

Éric Araujo added the comment:

Dropping global sounds good.  (Let’s not replace name with variable though!)

--
nosy: +eric.araujo
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 19:35, Stefan Krah wrote:

> 
> Stefan Krah added the comment:
> 
> Floris van Manen  wrote:
>> From what i understand is that issue14591 was able to reproduce the same 
>> feature as it seems related to the jumpahead()  malfunctioning.
> 
> I'm also quite sure that it's the same issue. It would be nice to have
> confirmation though. If you have the opportunity to compile the tip of
> the 2.7 branch (where #14591 is fixed), get one of these:
> 
> http://hg.python.org/cpython/archive/864b9836dae6.tar.gz
> http://hg.python.org/cpython/archive/864b9836dae6.zip
> 

Did compile that version and it launches.
To test with my code i do not want to have it interfere with my current version.
I remember it is possible to setup n isolated environment with pip en 
virtualenv.
But i never did this so far.
Any hints / links to (simple) script explanation that could do the job?
Or is there an even simpler way?

.F

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The 2.7 comments also apply to the 3.2 patch. Otherwise the 3.2 patch
> (without the _sre changes :) looks good to me.

Patches updated addressing new Stefan's comments. Unicode globals no longer 
reinitialized in _PyUnicode_Init(). Note that I have added a consistency check 
into the macro in 3.3+.

I hope Rietveld will accept this set.

--
Added file: http://bugs.python.org/file28826/unicode_globals-2.7_3.patch
Added file: http://bugs.python.org/file28827/unicode_globals-3.2_3.patch
Added file: http://bugs.python.org/file28828/unicode_globals-3.3_3.patch
Added file: http://bugs.python.org/file28829/unicode_globals-3.4_3.patch

___
Python tracker 

___diff -r 864b9836dae6 Objects/unicodeobject.c
--- a/Objects/unicodeobject.c   Fri Jan 25 17:55:39 2013 +0100
+++ b/Objects/unicodeobject.c   Fri Jan 25 21:34:01 2013 +0200
@@ -82,8 +82,9 @@
 
 /* --- Globals 
 
-   The globals are initialized by the _PyUnicode_Init() API and should
-   not be used before calling that API.
+NOTE: In the interpreter's initialization phase, some globals are currently
+  initialized dynamically as needed. In the process Unicode objects may
+  be created before the Unicode type is ready.
 
 */
 
@@ -93,15 +94,27 @@
 #endif
 
 /* Free list for Unicode objects */
-static PyUnicodeObject *free_list;
-static int numfree;
+static PyUnicodeObject *free_list = NULL;
+static int numfree = 0;
 
 /* The empty Unicode object is shared to improve performance. */
-static PyUnicodeObject *unicode_empty;
+static PyUnicodeObject *unicode_empty = NULL;
+
+#define _Py_RETURN_UNICODE_EMPTY()  \
+do {\
+if (unicode_empty != NULL)  \
+Py_INCREF(unicode_empty);   \
+else {  \
+unicode_empty = _PyUnicode_New(0);  \
+if (unicode_empty != NULL)  \
+Py_INCREF(unicode_empty);   \
+}   \
+return (PyObject *)unicode_empty;   \
+} while (0)
 
 /* Single character Unicode strings in the Latin-1 range are being
shared as well. */
-static PyUnicodeObject *unicode_latin1[256];
+static PyUnicodeObject *unicode_latin1[256] = {NULL};
 
 /* Default encoding to use and assume when NULL is passed as encoding
parameter; it is initialized by _PyUnicode_Init().
@@ -110,7 +123,7 @@
PyUnicode_GetDefaultEncoding() APIs to access this global.
 
 */
-static char unicode_default_encoding[100];
+static char unicode_default_encoding[100 + 1] = "ascii";
 
 /* Fast detection of the most frequent whitespace characters */
 const unsigned char _Py_ascii_whitespace[] = {
@@ -204,7 +217,7 @@
 
 #define BLOOM_MASK unsigned long
 
-static BLOOM_MASK bloom_linebreak;
+static BLOOM_MASK bloom_linebreak = ~(BLOOM_MASK)0;
 
 #define BLOOM_ADD(mask, ch) ((mask |= (1UL << ((ch) & (BLOOM_WIDTH - 1)
 #define BLOOM(mask, ch) ((mask &  (1UL << ((ch) & (BLOOM_WIDTH - 1)
@@ -448,10 +461,8 @@
 if (u != NULL) {
 
 /* Optimization for empty strings */
-if (size == 0 && unicode_empty != NULL) {
-Py_INCREF(unicode_empty);
-return (PyObject *)unicode_empty;
-}
+if (size == 0)
+_Py_RETURN_UNICODE_EMPTY();
 
 /* Single character Unicode objects in the Latin-1 range are
shared when using this constructor */
@@ -497,10 +508,8 @@
 if (u != NULL) {
 
 /* Optimization for empty strings */
-if (size == 0 && unicode_empty != NULL) {
-Py_INCREF(unicode_empty);
-return (PyObject *)unicode_empty;
-}
+if (size == 0)
+_Py_RETURN_UNICODE_EMPTY();
 
 /* Single characters are shared when using this constructor.
Restrict to ASCII, since the input must be UTF-8. */
@@ -1162,13 +1171,10 @@
 }
 
 /* Convert to Unicode */
-if (len == 0) {
-Py_INCREF(unicode_empty);
-v = (PyObject *)unicode_empty;
-}
-else
-v = PyUnicode_Decode(s, len, encoding, errors);
-
+if (len == 0)
+_Py_RETURN_UNICODE_EMPTY();
+
+v = PyUnicode_Decode(s, len, encoding, errors);
 return v;
 
   onError:
@@ -1381,7 +1387,7 @@
 Py_DECREF(v);
 strncpy(unicode_default_encoding,
 encoding,
-sizeof(unicode_default_encoding));
+sizeof(unicode_default_encoding) - 1);
 return 0;
 
   onError:
@@ -8850,8 +8856,6 @@
 
 void _PyUnicode_Init(void)
 {
-int i;
-
 /* XXX - move this array to unicodectype.c ? */
 Py_UNICODE linebreak[] = {
 0x000A, /* LINE FEED */
@@ -8865,15 +8869,12 @@
 };
 

[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Mark Dickinson

Mark Dickinson added the comment:

I believe the int_pow issue has been resolved, so this bug shouldn't show up in 
any of the current branches, regardless of which version of Clang is used.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12701] Apple's clang 2.1 (xcode 4.1, OSX 10.7) optimizer miscompiles intobject.c

2013-01-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Issue #12973 is the one that led to the eventual fix.  Closing this as a 
duplicate.

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> int_pow() implementation is incorrect

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11049] add tests for test.support

2013-01-25 Thread R. David Murray

R. David Murray added the comment:

Sure.  It doesn't seem likely that I'll get back to it any time soon, and if I 
do I can open a new issue.

--
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17034] Initialization of globals in stringobject.c

2013-01-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The patch for stringobject.c is similar to patch for unicodeobject.c in 
issue10156, but more simpler.

--
components: Interpreter Core
files: string_globals.patch
keywords: patch
messages: 180621
nosy: serhiy.storchaka, skrah
priority: normal
severity: normal
stage: patch review
status: open
title: Initialization of globals in stringobject.c
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file28830/string_globals.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12641] Remove -mno-cygwin from distutils

2013-01-25 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16235] Add python-config.sh for use during cross compilation.

2013-01-25 Thread Ray Donnelly

Ray Donnelly added the comment:

Great. My only query is whether the changes to sed will work on non-GNU sed.

It used to be like:
sed < in >out

you've now got:
sed in >out

I'm not saying it won't work, I'm not in a position to check, but I think it's 
safer to keep it as it was.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10156] Initialization of globals in unicodeobject.c

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Nice. I think the latest patches are commit-ready.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17035] Use new style classes in {class, static}method examples

2013-01-25 Thread Berker Peksag

New submission from Berker Peksag:

The examples in the built-in functions documentation[1] should be consistent 
and use new style classes.

[1] http://docs.python.org/2.7/library/functions.html

--
assignee: docs@python
components: Documentation
files: new-style-classes.diff
keywords: patch
messages: 180624
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Use new style classes in {class, static}method examples
versions: Python 2.7
Added file: http://bugs.python.org/file28831/new-style-classes.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16651] Find out what stdlib modules lack a pure Python implementation

2013-01-25 Thread Eric Snow

Eric Snow added the comment:

Also missing a pure-Python implementation:

collections.defaultdict (relatively trivial)
collections.deque

In the spirit of what Brett said, I found that PyPy has an implementation 
already:

  https://bitbucket.org/pypy/pypy/src/default/lib_pypy/_collections.py

Jython and IronPython do not have pure Python implentations:
  http://hg.python.org/jython/file/default/src/org/python/modules/_collections
  http://ironpython.codeplex.com/SourceControl/changeset/view/99885#1091023

--
nosy: +eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Stefan Krah

Stefan Krah added the comment:

Floris van Manen  wrote:
> Did compile that version and it launches.
> To test with my code i do not want to have it interfere with my current 
> version.
> I remember it is possible to setup n isolated environment with pip en 
> virtualenv.
> But i never did this so far.
> Any hints / links to (simple) script explanation that could do the job?
> Or is there an even simpler way?

I wouldn't bother with virtualenvs yet. First I'd simply install python
into /tmp:

mkdir /tmp/usr
./configure --prefix=/tmp/usr/
make
make install

Then always call python with the full path. If your app is a simple
script, then:

/tmp/usr/bin/python app.py

If you have to install it:

/tmp/usr/bin/python setup.py install

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16975] Broken error handling in codecs.escape_decode()

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5970c90dd8d1 by Serhiy Storchaka in branch '2.7':
Issue #16975: Fix error handling bug in the escape-decode decoder.
http://hg.python.org/cpython/rev/5970c90dd8d1

New changeset 22594c5060eb by Serhiy Storchaka in branch '3.2':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/22594c5060eb

New changeset 580d536cc910 by Serhiy Storchaka in branch '3.3':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/580d536cc910

New changeset 513b728695fc by Serhiy Storchaka in branch 'default':
Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
http://hg.python.org/cpython/rev/513b728695fc

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, then:
> 
> /tmp/usr/bin/python app.py

ok.
and how do i add extra packages to that new python version ?
e.g. i need to install
pyyam and openpyxll

(sorry for the inconvenience)
.F

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16980] SystemError in codecs.unicode_escape_decode()

2013-01-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dcbc16afd6bc by Serhiy Storchaka in branch '3.3':
Issue #16980: Fix processing of escaped non-ascii bytes in the
http://hg.python.org/cpython/rev/dcbc16afd6bc

New changeset d8c2ce63f5a4 by Serhiy Storchaka in branch 'default':
Issue #16980: Fix processing of escaped non-ascii bytes in the
http://hg.python.org/cpython/rev/d8c2ce63f5a4

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

New submission from STINNER Victor:

I create this issue to review and track the implementation of the PEP 433: 
"Easier suppression of file descriptor inheritance"
http://www.python.org/dev/peps/pep-0433/

--
components: Interpreter Core
hgrepos: 173
messages: 180630
nosy: haypo
priority: normal
severity: normal
status: open
title: Implementation of the PEP 433: Easier suppression of file descriptor 
inheritance
type: enhancement
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17036] Implementation of the PEP 433: Easier suppression of file descriptor inheritance

2013-01-25 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +patch
Added file: http://bugs.python.org/file28832/297b3529876a.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17020] random.random() generating values >= 1.0

2013-01-25 Thread Floris van Manen

Floris van Manen added the comment:

On 25 Jan 2013, at 22:27, Stefan Krah wrote:

> Then always call python with the full path. If your app is a simple
> script, t

ok, managed to install the extra packages and run the app.
Seems to work correctly now, no more random() >= 1.0

(thanks!)
.F

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >