[issue10433] Document unique behavior of 'getgroups' on OSX

2011-04-04 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Here's a revised doc patch. As noted from my investigation in Issue7900, the 
key getgroups behavior change is with the OS X 10.6 ABI (so  10.5), not 10.5.

--
stage: needs patch - commit review
Added file: http://bugs.python.org/file21528/issue10433-v2.patch

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



[issue11571] Turtle window pops under the terminal on OSX

2011-04-04 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

Looks good to me.  I tested on OS X with both Tk 8.5 on 10.6 and Tk 8.4 on 
10.5.  The demo runs fine under IDLE.app and bin/idle3.  If no objections, I'll 
commit the patch with the nit addressed.

--
keywords: +patch
stage:  - commit review
versions: +Python 2.7, Python 3.2
Added file: http://bugs.python.org/file21529/issue11571.patch

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



[issue11759] assert for exception parameters

2011-04-04 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

I've just realized that unittest doesn't provide a way to test arguments of 
exception thrown during assertRaises check.

--
components: Tests
messages: 132919
nosy: techtonik
priority: normal
severity: normal
status: open
title: assert for exception parameters

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



[issue11757] test_subprocess failure

2011-04-04 Thread Charles-Francois Natali

Charles-Francois Natali neolo...@free.fr added the comment:

_remaining_time doesn't check that endtime  current time and can return a 
negative number, which would trigger an EINVAL when passed to select 
(select_select doesn't seem to check for negative double).
Note that a check is performed through _check_timeout but after having called 
select, so there are at least two possible ways to get this error:
The process blocks a little before calling select for the first time. This can 
at least happen here:
if self.stdin and not self._communication_started:
# Flush stdio buffer.  This might block, if the user has
# been writing to .stdin in an uncontrolled fashion.
self.stdin.flush()
if not input:
self.stdin.close()

There's also a short race window if the endtime deadline expires between the 
call to _check_timeout and remaining_time.

--
nosy: +neologix

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



[issue11757] test_subprocess failure

2011-04-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue11753] test_sendall_interrupted() of test_socket hangs on FreeBSD

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset ebc03d7e7110 by Victor Stinner in branch 'default':
Issue #11753: faulthandler thread uses pthread_sigmask()
http://hg.python.org/cpython/rev/ebc03d7e7110

--
nosy: +python-dev

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



[issue11753] test_sendall_interrupted() of test_socket hangs on FreeBSD

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

test_socket and test_signal succeed on x86 FreeBSD custom:
http://www.python.org/dev/buildbot/all/builders/x86%20FreeBSD%20custom/builds/4
(there are other issues, but there are not related)

I pushed the fix in Python 3.3 (ebc03d7e7110).

--
resolution:  - fixed
status: open - closed

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



[issue11759] assert for exception parameters

2011-04-04 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

What about this:

 class MyTestCase(TestCase):
... def test_foo(self):
... with self.assertRaises(SyntaxError) as cm:
... compile('asdf jkl', 'file.py', 'eval')
... self.assertEqual('file.py', cm.exception.filename)

This isn't good enough?

--
nosy: +durban

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



[issue11759] assert for exception parameters

2011-04-04 Thread Michael Foord

Changes by Michael Foord mich...@voidspace.org.uk:


--
resolution:  - invalid
stage:  - committed/rejected

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



[issue11759] assert for exception parameters

2011-04-04 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Looks like a hack (and not the obvious one). I guess no asserts return values 
like this, so that usage is not really intuitive for me.

--

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



[issue11759] assert for exception parameters

2011-04-04 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

I found that successful assert in twisted returns exception object. But thanks 
for workaround anyway.

--

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



[issue1294232] Error in metaclass search order

2011-04-04 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

The attached patch seems to correct this issue.  It contains the test attached 
yesterday, and it passes now.

I factored out the winner calculation from type_new to a new 
_PyType_CalculateWinner function, and type_new calls this.  I've put the 
declaration of this function into object.h, so __build_class__ can also call 
it, instead of using the metaclass of the first base.  (Am I correct in 
thinking that the underscore prefix keeps it out of the public API?)

A slight problem may be, that in some cases this function will be called twice. 
 But it is quite simple, so I don't think it matters much:

Without patch:
$ ./python -m timeit -- class A(type): pass
class B: pass
class C(metaclass=A): pass
class D(B, C): pass

1 loops, best of 3: 371 usec per loop

With patch:
$ ./python -m timeit -- class A(type): pass
class B: pass
class C(metaclass=A): pass
class D(B, C): pass

1 loops, best of 3: 381 usec per loop

(Note, that I generated the patch with hg extdiff, because the output of hg 
qdiff was much more unreadable than simple diff.  I can provide an equivalent 
patch generated by hg if needed.)

--
Added file: http://bugs.python.org/file21530/issue_1294232.patch

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



[issue11760] Bus error in test_big_buffer() of test_zlib on AMD64 Snow Leopard 3.x buildbot

2011-04-04 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

Trace:

...
[ 79/354] test_time
[ 80/354] test_zlib
Fatal Python error: Bus error

Traceback (most recent call first):
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_zlib.py,
 line 85 in test_big_buffer
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 387 in _executeTestPart
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 442 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 494 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1078 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1166 in _run_suite
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1192 in run_unittest
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_zlib.py,
 line 611 in test_main
  File ./Lib/test/regrtest.py, line 1032 in runtest_inner
  File ./Lib/test/regrtest.py, line 826 in runtest
  File ./Lib/test/regrtest.py, line 650 in main
  File ./Lib/test/regrtest.py, line 1607 in module
make: *** [buildbottest] Bus error
program finished with exit code 2
elapsedTime=1400.363321

http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/44/steps/test/logs/stdio

--
components: Library (Lib)
messages: 132927
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: Bus error in test_big_buffer() of test_zlib on AMD64 Snow Leopard 3.x 
buildbot
versions: Python 3.3

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

Stefan, theoretically this is

A valid locale description (as understood by S-SYS) is:

language[_TERRITORY[.CODESET[@Modifier]]]

where language is indeed a ISO 639 language code (see
doc/iso639.txt) and _TERRITORY is indeed a ISO 3166 country code
(see doc/iso3166.txt).
..
The ISO3166 Maintenance Agency can be found at:
#   http://www.iso.ch/iso/en/prods-services/iso3166ma/index.html
..
http://www.loc.gov/standards/iso639-2/

A good UNIX has copies of the files in /usr/share/misc/{iso639,iso3166}.
I may be out-of-date a bit, though.
(And: this is not about Python, of course.)

--
nosy: +sdaoden

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue11761] fragile tests in test_gc

2011-04-04 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4329/steps/test/logs/stdio

==
FAIL: test_collect_generations (test.test_gc.GCTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py, 
line 1142, in wrapper
return func(*args, **kwargs)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_gc.py, 
line 269, in test_collect_generations
assertEqual(gc.get_count(), (0, 0, 0))
AssertionError: Tuples differ: (3, 0, 0) != (0, 0, 0)

First differing element 0:
3
0

- (3, 0, 0)
+ (0, 0, 0)

==
FAIL: test_get_count (test.test_gc.GCTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py, 
line 1142, in wrapper
return func(*args, **kwargs)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_gc.py, 
line 252, in test_get_count
assertEqual(gc.get_count(), (0, 0, 0))
AssertionError: (4, 0, 0) != (0, 0, 0)

--

--
components: Tests
messages: 132929
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: fragile tests in test_gc
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue11738] ThreadSignals.test_signals() of test_threadsignals hangs on PPC Tiger 3.x buildbot

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 9d59ae98013c by Victor Stinner in branch 'default':
Reenable regrtest.py timeout (30 min): #11738 and #11753 looks to be fixed
http://hg.python.org/cpython/rev/9d59ae98013c

--
nosy: +python-dev

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Here's an implementation of read1() that satisfies that condition, along with
some relevant unit tests.

--
keywords: +patch
Added file: http://bugs.python.org/file21531/gzipfile_read1.diff

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Stefan Krah wrote:
 
 Stefan Krah stefan-use...@bytereef.org added the comment:
 
 Is there another (authoritative) source for locale aliases apart
 from X.org? On Ubuntu Lucid, many aliases for installed locales
 are missing:
 
 f = open(/var/lib/locales/supported.d/local)
 locale_list = [loc.split()[0] for loc in f.readlines() \
if not loc.startswith('#')]
 
 for loc in locale_list:
 x = locale.setlocale(locale.LC_ALL, loc)
 try:
 y = locale.getlocale()
 except ValueError:
 print(loc)
 
 aa_DJ

Hmm, I get:

Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.6/locale.py, line 513, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

The local file you mention only contains en_US.UTF-8 UTF-8 on
our Ubuntu 10.04.1 default installation.

Have you installed some other package to get support for all those
locales ?

--
title: locale._parse_localename fails when localename does not contain encoding 
information - locale._parse_localename fails when localename does not  contain 
encoding information

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



[issue11678] Add support for Arch Linux to platform.linux_distributions()

2011-04-04 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Westley Martínez wrote:
 
 Westley Martínez aniko...@gmail.com added the comment:
 
 Perhaps I wasn't clear. That release version isn't for the system. It's for 
 the installation disc. There's no way to get that info and it means nothing 
 to anyone anyways. All users of Arch are expected to have their system fully 
 up to date. There are no releases; Just do pacman -Syu and the system is 
 made up to date.

Interesting. In that case, I guess version and id don't make sense
for Arch Linux.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com



::: Try our new mxODBC.Connect Python Database Interface for free ! 

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/

--
title: Add support for Arch Linux   to  platform.linux_distributions() 
- Add support for Arch  Linux to platform.linux_distributions()

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



[issue11749] test_socket failure

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Looks fixed now.

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

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Marc-Andre Lemburg rep...@bugs.python.org wrote:
 The local file you mention only contains en_US.UTF-8 UTF-8 on
 our Ubuntu 10.04.1 default installation.
 
 Have you installed some other package to get support for all those
 locales ?

On Ubuntu it is a bit messy:

cp /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/local
locale-gen

On Debian it should be:

# Select 'all' in the dialog
dpkg-reconfigure locales

Stefan Krah

--
title: locale._parse_localename fails when localename does not  contain 
encoding information - locale._parse_localename fails when localename does not 
contain encoding information

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



[issue11760] Bus error in test_big_buffer() of test_zlib on AMD64 Snow Leopard 3.x buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Another failure on test_zlib on the same buildbot: build 30
http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/30/steps/test/logs/stdio

--

I already noticed some failures on test_mmap: build 8, 25 and 36
http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/36/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/25/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/8/steps/test/logs/stdio

--

and on test_urllibnet: build 7

http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/7/steps/test/logs/stdio

(network issue?)

--

and on test_threadsignals
http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/2/steps/test/logs/stdio

Issue #11738?

--

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



[issue11760] Bus error in test_big_buffer() of test_zlib on AMD64 Snow Leopard 3.x buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

test_zlib failure is on zlib.crc32(mmap.mmap(...)) with a mapping bigger than 4 
GB:
--
# Issue #10276 - check that inputs =4GB are handled correctly.
class ChecksumBigBufferTestCase(unittest.TestCase):

def setUp(self):
with open(support.TESTFN, wb+) as f:
f.seek(_4G)
f.write(basdf)
with open(support.TESTFN, rb) as f:
self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)

def tearDown(self):
self.mapping.close()
support.unlink(support.TESTFN)

@unittest.skipUnless(mmap, mmap() is not available.)
@unittest.skipUnless(sys.maxsize  _4G, Can't run on a 32-bit system.)
@unittest.skipUnless(support.is_resource_enabled(largefile),
 May use lots of disk space.)
def test_big_buffer(self):
self.assertEqual(zlib.crc32(self.mapping), 3058686908) ~~~ HERE
self.assertEqual(zlib.adler32(self.mapping), 82837919)
--

It looks to be related to #11277 (and #10276).

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

This issue is not dead: test_zlib failed twice on AMD64 Snow Leopard 3.x 
buildbot: build 30 (024967cdc2f0e850f0b338e7593a12d965017a6a, Mar 31 01:40:00 
2011) and 44 (ebc03d7e711052c0b196aacdbec6778c0a6d5c0c, Apr 4 10:11:20 2011).

Build 44 has a traceback thanks to faulthandler:

...
[ 79/354] test_time
[ 80/354] test_zlib
Fatal Python error: Bus error

Traceback (most recent call first):
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_zlib.py,
 line 85 in test_big_buffer
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 387 in _executeTestPart
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 442 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py,
 line 494 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 105 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py,
 line 67 in __call__
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1078 in run
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1166 in _run_suite
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, 
line 1192 in run_unittest
  File 
/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_zlib.py,
 line 611 in test_main
  File ./Lib/test/regrtest.py, line 1032 in runtest_inner
  File ./Lib/test/regrtest.py, line 826 in runtest
  File ./Lib/test/regrtest.py, line 650 in main
  File ./Lib/test/regrtest.py, line 1607 in module
make: *** [buildbottest] Bus error
program finished with exit code 2
elapsedTime=1400.363321

http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/44/steps/test/logs/stdio

test_zlib.py:85 is the crc32(+4 GB) test:
--
# Issue #10276 - check that inputs =4GB are handled correctly.
class ChecksumBigBufferTestCase(unittest.TestCase):

def setUp(self):
with open(support.TESTFN, wb+) as f:
f.seek(_4G)
f.write(basdf)
with open(support.TESTFN, rb) as f:
self.mapping = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)

def tearDown(self):
self.mapping.close()
support.unlink(support.TESTFN)

@unittest.skipUnless(mmap, mmap() is not available.)
@unittest.skipUnless(sys.maxsize  _4G, Can't run on a 32-bit system.)
@unittest.skipUnless(support.is_resource_enabled(largefile),
 May use lots of disk space.)
def test_big_buffer(self):
self.assertEqual(zlib.crc32(self.mapping), 3058686908) ~~~ HERE
self.assertEqual(zlib.adler32(self.mapping), 82837919)
--

--
resolution: fixed - 
status: closed - open

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



[issue11760] Bus error in test_big_buffer() of test_zlib on AMD64 Snow Leopard 3.x buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

This issue is a duplicate of #11277.

--
resolution:  - duplicate
status: open - closed

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Issue #11760 has been marked as a duplicate of this issue.

--

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



[issue6895] locale._parse_localename fails when localename does not contain encoding information

2011-04-04 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso sdao...@googlemail.com:


--
nosy:  -sdaoden

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread Charles-Francois Natali

Charles-Francois Natali neolo...@free.fr added the comment:

Is the SIGBUS generated on the first page access ?
How much memory does this buildbot have ?

--

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



[issue8323] multiprocessing.Queue ignores pickle restrictions in .put()

2011-04-04 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

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



[issue11734] Add half-float (16-bit) support to struct module

2011-04-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I've only glanced at the patch, but a couple of things:

(1) It looks as though the patch assumes that a C double is IEEE 754 binary64 
format, and that a C float is IEEE 754 binary32 format.  Is that correct?

If so, that's a significant break with tradition:  Python's supposed to be able 
to work with the native doubles, no matter what their format.  I, for one, 
wouldn't object if IEEE floating-point were made a requirement for Python = 
3.3, but this change would need to be discussed on the python-dev mailing list.

(2)  The

  typedef PY_LONG_LONG npy_uint64;

looks wrong to me for two reasons:  first, PY_LONG_LONG is a signed type.  
Second, while it's guaranteed (by the C standard) that unsigned long long will 
have width at least 64, it's not guaranteed that it'll be exactly 64.  Does the 
code depend on this assumption?  Similarly when using unsigned int in the union 
for the 32-bit code;  here it's not even guaranteed by the standards that 
unsigned int has width at least 32.

It may be better to use the PY_UINT64_T type and the HAVE_UINT64_T macros, and 
similarly for the 32-bit types.

--

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



[issue8428] buildbot: test_multiprocessing timeout (test_notify_all? test_pool_worker_lifetime?)

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Here is a nice trace on PPC Leopard 3.x thanks to faulthandler + regrtest 
timeout (30 minutes):
---
...
[218/354] test_multiprocessing
Thread 0xf0617000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 372 in _handle_results
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf0595000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 331 in _handle_tasks
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf0513000:
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 324 in _handle_workers
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf0491000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 102 in worker
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf040f000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 102 in worker
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf038d000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 102 in worker
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xf030b000:
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 235 in wait
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/queue.py, line 
185 in get
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 102 in worker
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 688 in run
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 735 in _bootstrap_inner
  File /Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/threading.py, 
line 708 in _bootstrap

Thread 0xa09e1820:
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/forking.py,
 line 134 in poll
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/forking.py,
 line 149 in wait
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/process.py,
 line 149 in join
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/multiprocessing/pool.py,
 line 458 in join
  File 
/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/test/test_multiprocessing.py,
 line 1195 in test_pool_worker_lifetime
  File 

[issue9592] Limitations in objects returned by multiprocessing Pool

2011-04-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue11759] assert for exception parameters

2011-04-04 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Using assertRaises as a context manager is not a hack, and is the correct way 
to do this in unittest.

--
nosy: +r.david.murray
status: open - closed

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



[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2011-04-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue11759] assert for exception parameters

2011-04-04 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

See also #6275.

--
nosy: +ezio.melotti

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



[issue11759] assert for exception parameters

2011-04-04 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

I've also found #9587. Now I wonder how many people requested return vs 
context, and how many would vote for one vs another. Nothing personal - just a 
pure curiosity.

--

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



[issue11759] assert for exception parameters

2011-04-04 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

That was a design decision made by Guido (iirc), and even if it might seem not 
obvious at first, it's probably just because not everyone is Dutch.
Many people would probably vote on sequence.join(sep) too, but it's unlikely 
that another way to do it will be introduced.

The doc for assertRaises[0] also is quite clear and even includes an example 
where the exception args are checked.

[0]: 
http://docs.python.org/py3k/library/unittest.html#unittest.TestCase.assertRaises

--

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Here's an implementation of read1() that satisfies that condition, along with
 some relevant unit tests.

Something looks fishy: what happens if size is -1 and EOFError is not
raised?

--

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



[issue11759] assert for exception parameters

2011-04-04 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Thanks for clarification, Ezio. I am still using Python 2.7 - that's why I've 
missed this part.

--

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



[issue11738] ThreadSignals.test_signals() of test_threadsignals hangs on PPC Tiger 3.x buildbot

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I think that the last test_threadsignals failures on PPC Tiger were related to 
the new regrtest timeout, and it is now fixed.

--
resolution:  - fixed
status: open - closed

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



[issue11754] Changed test to check calculated constants in test_string.py

2011-04-04 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy: +brian.curtin

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



[issue11758] increase xml.dom.minidom test coverage

2011-04-04 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy: +brian.curtin

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



[issue11762] Ast doc: warning and version number

2011-04-04 Thread Terry J. Reedy

New submission from Terry J. Reedy tjre...@udel.edu:

Two related proposals.

1. Add a warning similar to the one for the dis module. As modified:

CPython implementation detail: The ast definition is specific to the CPython 
interpreter! Ast nodes may be added, removed, or changed between versions. Use 
*ast.__version__* to work across versions.

I omitted  Use of this module should not be considered to work across Python 
VMs or Python releases. as redundant and too legalistic.
*ast.__version__* should link to its (new) entry).

2. Add a full entry for __version__. Currently (3.2):

The module defines a string constant __version__ which is the decimal 
Subversion revision number of the file shown below.

Proposed replacement (with hidden reference point):

ast.__version__ [__version__ in normal entry boldface]
String constant with version number of abstract grammar file.
3.1: 67616; 3.2: 82163; 3.3: x

--
assignee: docs@python
components: Documentation
messages: 132951
nosy: docs@python, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Ast doc: warning and version number
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue11762] Ast doc: warning and version number

2011-04-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Modify entry slightly to
String constant with version number of the abstract grammar file.
3.1: '67616'; 3.2: '82163'; 3.3: 'x'

--
keywords: +patch

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

 Something looks fishy: what happens if size is -1 and EOFError is not raised?

You're right - I missed that possibility. In that case, extrasize and offset get
updated incorrectly, which will break subsequent calls to seek() and tell().
However, it seems that subsequent reads work fine, because slicing a bytes 
object
with a too-large upper bound doesn't raise an exception.

The attached patch fixes this bug, and updates test_read1() to catch 
regressions.

--
Added file: http://bugs.python.org/file21532/gzipfile_read1.diff

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

[Question from python-list]
Would a C version only be for 3.3 or backported to 3.2 and 2.7. The rationale 
for backport to 2.7 is that .cmp_to_key was added to 2.7 to aid transition to 
3.x. A faster version would make use in 2.7 more inviting.

I understand that there is concern that performance enhancements may have 
unforseen effects.

--
nosy: +terry.reedy

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



[issue10175] vs version for win32 compilation of extension modules is undocumented.

2011-04-04 Thread Brian Curtin

Changes by Brian Curtin br...@python.org:


--
nosy: +brian.curtin

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



[issue11761] fragile tests in test_gc

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 36d92e923a1a by Antoine Pitrou in branch '3.1':
Issue #11761: make tests for gc.get_count() less fragile
http://hg.python.org/cpython/rev/36d92e923a1a

New changeset 5daf9a8dc4e8 by Antoine Pitrou in branch '3.2':
Issue #11761: make tests for gc.get_count() less fragile
http://hg.python.org/cpython/rev/5daf9a8dc4e8

New changeset 24d4c5fd3bc6 by Antoine Pitrou in branch 'default':
Issue #11761: make tests for gc.get_count() less fragile
http://hg.python.org/cpython/rev/24d4c5fd3bc6

--
nosy: +python-dev

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I was only aiming for Py3.3.  

If someone wanted to push for a backport to 3.2, it would be up to the release 
manager to decide whether a performance booster would be worth the risk of 
introducing a bug in a point release.

ISTM that if someone really cared about performance, they would probably 
already be using an O(n) key-function approach.  This patch eliminates most of 
the overhead for calling a cmp-function, but it can't do anything about the 
body of the user-supplied cmp-function which will dominate the running time if 
it does anything useful.

--

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



[issue10023] test_lib2to3 leaks under 3.1

2011-04-04 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

As discussed with Ezio on IRC, this doesn't apply anymore in 3.2 nor in 3.3, so 
we guess we can simply mark is already fixed in a later version.

--
nosy: +sandro.tosi
resolution:  - out of date
status: open - closed

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



[issue10339] test_lib2to3 leaks

2011-04-04 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

closing like issue10023

--
nosy: +sandro.tosi
resolution:  - out of date
status: open - closed

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 9775d67c9af9 by Antoine Pitrou in branch 'default':
Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile
http://hg.python.org/cpython/rev/9775d67c9af9

--
nosy: +python-dev

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



[issue10791] Wrapping TextIOWrapper around gzip files

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Patch now committed, thank you!
Since the patch adds a new API (GzipFile.read1()), I think it's better not to 
backport it.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed
type: behavior - feature request
versions:  -Python 2.7, Python 3.2

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



[issue11734] Add half-float (16-bit) support to struct module

2011-04-04 Thread Mark Wiebe

Mark Wiebe mwwi...@gmail.com added the comment:

The patch currently assumes IEEE 754 with byte-order matching the integer type. 
I see that pyconfig.h defines three possible cases when IEEE 754 doubles are 
supported, DOUBLE_IS_LITTLE_ENDIAN_IEEE754, DOUBLE_IS_BIG_ENDIAN_IEEE754, and 
DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754. The code should have some byte swapping to 
match it to the integer endianness.

If support for non-IEEE systems is still desired, implementing a conversion 
using isnan/isinf/frexp/ldexp should be pretty easy, though off hand I can't 
see an efficient way to extract the significand bits.

Regarding the PY_LONG_LONG, it should have been unsigned PY_LONG_LONG. Using 
PY_UINT64_T is better, though, since a bigger PY_LONG_LONG would cause trouble 
in the union.

For the UINT32, maybe just using the double/PY_UINT64_T versions is better, 
since there is no macro for FLOAT_IS_IEEE754? Falling back to a frexpr 
implementation if double isn't IEEE or there is no 64-bit integer type may be a 
reasonable tradeoff to support the few platforms where that's the case, and 2 
instead of 3 separate conversion codes is a bit better maintenance-wise.

--

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



[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2011-04-04 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

And also with an extension module I'm trying to build with Python-2.7.1 AMD64. 
Schnur's suggestion fixes it.

--
nosy: +santa4nt

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



[issue11731] Simplify email API via 'policy' objects

2011-04-04 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

For some reason the create patch button isn't working (perhaps because I'm 
using a named branch?), so here is a patch representing the current state of 
the feature branch.

--
keywords: +patch
Added file: http://bugs.python.org/file21533/policy.patch

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



[issue6040] bdist_msi does not deal with pre-release version

2011-04-04 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Is there any workaround we can use in setup.py to set correct version for 
build_msi subcommand only?

--
nosy: +techtonik

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



[issue11763] assertEqual memory issues with large text inputs

2011-04-04 Thread Michael Foord

New submission from Michael Foord mich...@voidspace.org.uk:

 s = x * (2**29)
 case.assertEqual(s + a, s + b)
Traceback (most recent call last):
 File stdin, line 1, in module
 File /home/antoine/cpython/default/Lib/unittest/case.py, line 643,
in assertEqual assertion_func(first, second, msg=msg)
 File /home/antoine/cpython/default/Lib/unittest/case.py, line 984,
in assertMultiLineEqual secondlines = [second + '\n']
MemoryError

assertEqual delegates to assertMultilineEqual for comparing text which uses 
difflib for comparisons. This has performance issues (as well as memory issues) 
for very large inputs, so should fallback to a simple comparison (or simpler 
diff generation technique) for very large inputs.

--
assignee: michael.foord
messages: 132965
nosy: ezio.melotti, michael.foord, pitrou
priority: normal
severity: normal
status: open
title: assertEqual memory issues with large text inputs
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue1425127] os.remove OSError: [Errno 13] Permission denied

2011-04-04 Thread Christoph Gohlke

Changes by Christoph Gohlke cgoh...@uci.edu:


--
nosy: +cgohlke

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



[issue4431] Distutils MSVC doesn't create manifest file (with fix)

2011-04-04 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Another workaround is by adding the linker argument to Extension() as 
extra_link_args:

extra_link_args=['/MANIFEST']

--

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



[issue11764] inspect.getattr_static code execution w/ class body as non dict

2011-04-04 Thread Michael Foord

New submission from Michael Foord mich...@voidspace.org.uk:

In Python 3 a metclass can create a class __dict__ that is not a true 
dictionary. This can trigger code execution when accessing __dict__ members. 
getattr_static should not access them directly but do so using dict methods 
directly for dict subclasses and skipping classes that have non-dicts for 
__dict__.

The documentation should mention explicitly that the no code execution 
feature of this function is *not* a security feature and should not be relied 
on for security purposes.

--
assignee: michael.foord
components: Library (Lib)
messages: 132967
nosy: michael.foord
priority: normal
severity: normal
stage: test needed
status: open
title: inspect.getattr_static code execution w/ class body as non dict
versions: Python 3.2, Python 3.3

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



[issue11731] Simplify email API via 'policy' objects

2011-04-04 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file21533/policy.patch

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



[issue11731] Simplify email API via 'policy' objects

2011-04-04 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Try again with a patch going in the expected direction :)

--
Added file: http://bugs.python.org/file21534/policy.patch

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Filip Gruszczyński

Filip Gruszczyński grusz...@gmail.com added the comment:

Here are some example performance results:

def cmp(x, y):
return y - x

sorted(range(1, 1000), key=cmp_to_key(cmp))

'''
C version:
real0m19.994s
user0m8.053s
sys 0m1.044s

Python version:
real0m28.825s
user0m28.046s
sys 0m0.728s

'''


def cmp(x, y):
x = int(x)
y = int(y)
return (x  y) - (y  x)

sorted([str(i) for i in reversed(range(1, 200))], key=cmp_to_key(cmp))

'''
Python version

real0m15.930s
user0m15.629s
sys 0m0.284s

C version

real0m10.880s
user0m10.585s
sys 0m0.284s
'''

There is some performance gain. I don't know however, if it's enough to use C 
version instead of Python, that's for Raymond to decide.

--

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



[issue11765] test_faulthandler failure

2011-04-04 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4334/steps/test/logs/stdio

==
FAIL: test_dump_tracebacks_later (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 420, in test_dump_tracebacks_later
self.check_dump_tracebacks_later()
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 417, in check_dump_tracebacks_later
self._check_dump_tracebacks_later(repeat, cancel, None)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 404, in _check_dump_tracebacks_later
self.assertRegex(trace, regex)
AssertionError: Regex didn't match: '^Thread 0x[0-9a-f]+:\n  File string, 
line 12 in func\n  File string, line 27 in module$' not found in 'Thread 
0x0100:\n  File string, line 12 in func\n  File string, line 27 in 
module\nTraceback (most recent call last):\n  File string, line 27, in 
module\n  File string, line 16, in func\nAssertionError: 
0.99706539917  1.125'

==
FAIL: test_dump_tracebacks_later_cancel 
(test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 426, in test_dump_tracebacks_later_cancel
self.check_dump_tracebacks_later(cancel=True)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 417, in check_dump_tracebacks_later
self._check_dump_tracebacks_later(repeat, cancel, None)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 406, in _check_dump_tracebacks_later
self.assertEqual(trace, '')
AssertionError: 'Traceback (most recent call last):\n  File string, line 
27, in module\n   [truncated]... != ''
- Traceback (most recent call last):
-   File string, line 27, in module
-   File string, line 16, in func
- AssertionError: 0.9980001449584961  1.125

==
FAIL: test_dump_tracebacks_later_file (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 429, in test_dump_tracebacks_later_file
self.check_dump_tracebacks_later(file=True)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 415, in check_dump_tracebacks_later
self._check_dump_tracebacks_later(repeat, cancel, filename)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 394, in _check_dump_tracebacks_later
trace, exitcode = self.get_output(code, filename)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 61, in get_output
self.assertEqual(output, '')
AssertionError: 'Traceback (most recent call last):\n  File string, line 
27, in module\n   [truncated]... != ''
- Traceback (most recent call last):
-   File string, line 27, in module
-   File string, line 16, in func
- AssertionError: 0.9980001449584961  1.125
- sys:1: ResourceWarning: unclosed file _io.BufferedWriter 
name='c:\\docume~1\\db3l\\locals~1\\temp\\tmph6ch7_'

==
FAIL: test_dump_tracebacks_later_repeat 
(test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 423, in test_dump_tracebacks_later_repeat
self.check_dump_tracebacks_later(repeat=True)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 417, in check_dump_tracebacks_later
self._check_dump_tracebacks_later(repeat, cancel, None)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_faulthandler.py,
 line 404, in _check_dump_tracebacks_later
self.assertRegex(trace, regex)
AssertionError: Regex didn't match: '^Thread 0x[0-9a-f]+:\n  File string, 
line 12 in func\n  File string, line 27 in module\nThread 0x[0-9a-f]+:\n  
File string, line 12 in func\n  File string, line 27 in module$' not 
found in 'Thread 0x0ff4:\n  File string, line 12 in func\n  File 
string, line 27 in module\nThread 0x0ff4:\n  File string, line 12 
in func\n  File string, line 27 in module\nTraceback 

[issue11619] On Windows, don't encode filenames in the import machinery

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 1b7f484bab6e by Victor Stinner in branch 'default':
Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes
http://hg.python.org/cpython/rev/1b7f484bab6e

--
nosy: +python-dev

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I'm working on cleaning-up (and speeding-up) the patch.  I'll post new timings 
once that's done.

--

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



[issue2193] Cookie Colon Name Bug

2011-04-04 Thread BM

BM shouri...@yandex.ru added the comment:

To Carsten Klein:
It would be great if you turn your eyes on and try to read more carefully 
before posting something here.


NAME=VALUE 
NAME is the cookie’s name, and VALUE is its value. Thus the header Set-Cookie: 
id=waldo sets a cookie with name id and value waldo. Both the cookie NAME  and 
its VALUE may be any sequence of characters except semi-colon, comma, or 
whitespace. 


In the above it says any sequence of characters EXCEPT a three characters: 
1. semi-colon
2. comma
3. whitespace

In English this means that any sequence of characters INCLUDES a colon and 
thus colon IS a valid character. BTW, this stupid bug is three years old, while 
the rest of the world implemented it right (Java, Ruby etc).

Also Python implementation of this part is at least... strange (being polite 
here). Because instead of excluding illegal chars, they actually going opposite 
by including the entire world and then going mad in the whole code inside... :-(

--

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



[issue11766] test_multiprocessing failure (test_pool_worker_lifetime)

2011-04-04 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

This sometimes happens on the buildbots:

test test_multiprocessing failed -- Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_multiprocessing.py,
 line 1191, in test_pool_worker_lifetime
self.assertNotIn(None, finalworkerpids)
AssertionError: None unexpectedly found in [1788, 3984, None]

e.g. 
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4334/steps/test/logs/stdio

--
components: Library (Lib), Tests
messages: 132974
nosy: asksol, jnoller, pitrou
priority: normal
severity: normal
status: open
title: test_multiprocessing failure (test_pool_worker_lifetime)
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue11765] test_faulthandler failure

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I wrote the assertion while dump_tracebacks_later() was implemented using 
SIGALRM + alarm(timeout). A simple fix for this issue is just to remove the 
assertion. But... I'm curious, and I would like to understand.

The problem is on the following code:

timeout = 0.5
pause = timeout * 2.5
# on Windows XP, b-a gives 1.249931 after sleep(1.25)
min_pause = pause * 0.9
a = time.time()
time.sleep(pause)
b = time.time()
faulthandler.cancel_dump_tracebacks_later()
# Check that sleep() was not interrupted
assert (b - a) = min_pause, {{}}  {{}}.format(b - a, min_pause)

So time.sleep(1.25) gives a time delta of 0.998 or 0.970 seconds. Hum, this 
value is close to 1.0 seconds, but not to 1.25 seconds.

I see different reasons why the assertion may fail:

 * sleep() was really interrupted (by faulthandler thread writing the 
tracebacks?)
 * time.time() and/or sleep() are not accurate on Windows XP

--
nosy: +belopolsky

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



[issue11734] Add half-float (16-bit) support to struct module

2011-04-04 Thread Eli Stevens

Eli Stevens wickedg...@gmail.com added the comment:

There seems to be some disagreement about the double-rounding issue; Mark 
Dickinson posted on python-ideas that he doesn't think that there is one.  If 
possible, I think that removing code paths that aren't needed are generally a 
good thing, especially if I'm going to have to add support for non-IEEE floats.

I'll start working on the isnan/isinf/frexp/ldexp implementation for the cases 
where either we don't have a UINT64 type, or doubles aren't IEEE.  Given my 
current schedule, I don't think that I'll have this done today; hopefully 
tomorrow morning.  :)

--

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



[issue2736] datetime needs an epoch method

2011-04-04 Thread Jay Taylor

Jay Taylor outtat...@gmail.com added the comment:

I couldn't agree more with ping's position on this.  It is against the spirit 
of what Python has set out to be, and the blocking needs to stop.

Any chance we could get a .epoch() function into python 2.7 as well?

--
nosy: +Jay.Taylor

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



[issue11765] test_faulthandler failure

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 8da8cd1ba9d9 by Victor Stinner in branch 'default':
Issue #11765: don't test time.sleep() in test_faulthandler
http://hg.python.org/cpython/rev/8da8cd1ba9d9

--
nosy: +python-dev

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



[issue11765] test_faulthandler failure

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

8da8cd1ba9d9 should fix this issue. Please reopen it if it doesn't solved it.

--
resolution:  - fixed
status: open - closed

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



[issue11734] Add half-float (16-bit) support to struct module

2011-04-04 Thread Mark Wiebe

Mark Wiebe mwwi...@gmail.com added the comment:

There's no disagreement, since they're different cases. Taking an arbitrary 
double, rounding to float, then rounding to half definitely has double-rounding 
issues. (And I would recommend constructing an example to add to the test case 
to make sure you understand what's going on.) Taking two halfs, doing a 
primitive arithmetic operation on them as floats, then rounding back to half is 
what Mark was referring to on the list.

In NumPy I also tried to err more towards accuracy and performance than having 
each intermediate be strictly half. The einsum function retains intermediate 
values as floats when operating on half, for example, and that's what I 
recommended in the documentation.

I'd also suggest adding some more to the test suite here to verify that ties 
are rounding to the nearest even properly. You can see some tests for this here:

https://github.com/numpy/numpy/blob/master/numpy/core/tests/test_half.py#L124

--

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



[issue11754] Changed test to check calculated constants in test_string.py

2011-04-04 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Being rather circular, that doesn't seem to be a particularly useful test. (Not 
that the original is either.) It'd be more correct if you actually tested 
that hex numbers are contained within string.hexdigits, for example.

--
nosy: +benjamin.peterson

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



[issue11761] fragile tests in test_gc

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Should be fixed now.

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

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The new FreeBSD buildbot had a sporadic SIGKILL in 
http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1/steps/test/logs/stdio

(apparently, faulthandler didn't dump a traceback)

By the way, we can be fairly certain now that the problem is on the OS side 
rather than on our (Python) side, so I'm lowering the priority.

--
nosy: +skrah
priority: critical - high

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



[issue6792] Distutils-based installer does not detect 64bit versions of Python

2011-04-04 Thread Jason R. Coombs

Changes by Jason R. Coombs jar...@jaraco.com:


--
nosy: +jaraco

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

By the way, at this point I think we could simply skip the test on BSDs and OS 
X. The tested functionality is cross-platform, so testing under a limited set 
of systems should be ok.

--

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-04-04 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

For the new FreeBSD bot, the issue was simply insufficient swap space.
With 1GB of memory and 2GB of swap test_zlib runs fine.

--

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



[issue11763] assertEqual memory issues with large text inputs

2011-04-04 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Attached patch adds a _diffThreshold attribute of 2**16 and uses 
_baseAssertEqual whenever one of the two string is longer than 2**16 chars.

--
keywords: +patch
Added file: http://bugs.python.org/file21535/issue11763.diff

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



[issue11763] assertEqual memory issues with large text inputs

2011-04-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Rather than hardwiring `self.addCleanup(lambda: setattr(self, '_diffThreshold', 
2**16))`, you should retrieve the previous value.

--

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



[issue11767] Maildir iterator leaks file descriptors by default

2011-04-04 Thread Brendan Dolan-Gavitt

New submission from Brendan Dolan-Gavitt brenda...@gatech.edu:

The default constructor for Maildir is rfc822.Message. This means that when 
iterating over a Maildir mailbox instantiated with default settings, the 
Mailbox class will return self._factory(self.get_file(key)), leaking the file 
descriptor returned by get_file(). Thus, iterating over any reasonably sized 
maildir mailbox will cause file descriptors to be leaked, and if a 
non-refcounting GC is used (as in PyPy), it is very likely that the process 
will run out of file descriptors.

I see that the default has changed to None, for Py3k, but this still means that 
using a message factory unavoidably leaks file descriptors. Ideally, I'd like 
the Mailbox class to close the file descriptor passed into the factory; this 
would mean that file descriptors are never leaked during iteration.

--
components: Library (Lib)
messages: 132988
nosy: moyix
priority: normal
severity: normal
status: open
title: Maildir iterator leaks file descriptors by default
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7

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



[issue11763] assertEqual memory issues with large text inputs

2011-04-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee: michael.foord - ezio.melotti
components: +Library (Lib)
nosy: +rhettinger
stage:  - patch review
type:  - behavior
Added file: http://bugs.python.org/file21536/issue11763-2.diff

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



[issue10785] parser: store the filename as an unicode object

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 6e9dc970ac0e by Victor Stinner in branch 'default':
Issue #10785: Store the filename as Unicode in the Python parser.
http://hg.python.org/cpython/rev/6e9dc970ac0e

--
nosy: +python-dev

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



[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 7b8d625eb6e4 by Victor Stinner in branch 'default':
Issue #9319: Include the filename in Non-UTF8 code ... syntax error.
http://hg.python.org/cpython/rev/7b8d625eb6e4

--
nosy: +python-dev

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



[issue9709] test_distutils warning: initfunc exported twice on Windows

2011-04-04 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

A workaround would be to define an arbitrary macro when building with 
distutils. For example, in setup.cfg:

[build_ext]
define = _DISTUTILS

Then in some main header file(s) in your project:

#ifdef _DISTUTILS
#undef PyMODINIT_FUNC
#define PyMODINIT_FUNC void
#endif

And you won't get the warning anymore.

--
nosy: +santa4nt
versions: +Python 3.3 -3rd party

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



[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 Hum, I'm not sure that my patch works if the locale encoding is not
 UTF-8: import.c manipulates path in the filesystem encoding, whereas
 PyTokenizer_FindEncodingFilename() expects UTF-8 filename.

Thanks to my work on #3080, the import machinery (and other functions using 
Python modules and filenames) manipulates filenames as Unicode, and so I don't 
have to care about the filename encoding anymore.

6e9dc970ac0e (of issue #10785) fixed the crash, 7b8d625eb6e4 added the filename 
into the SyntaxError.

--
resolution: accepted - fixed
status: open - closed

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



[issue10785] parser: store the filename as an unicode object

2011-04-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

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



[issue9709] test_distutils warning: initfunc exported twice on Windows

2011-04-04 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
versions: +3rd party

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



[issue7805] test_multiprocessing failure

2011-04-04 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
nosy: +haypo

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



[issue11768] test_signals() of test_threadsignals failure on Mac OS X Tiger

2011-04-04 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

test_threadsignals hangs on x86 Tiger 3.x and PPC Tiger 3.x:
-
[279/354] test_threadsignals
Thread 0xa000d000:
  File 
/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_threadsignals.py, 
line 46 in test_signals
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/case.py, line 
387 in _executeTestPart
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/case.py, line 
442 in run
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/case.py, line 
494 in __call__
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/suite.py, 
line 105 in run
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/suite.py, 
line 67 in __call__
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/suite.py, 
line 105 in run
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/unittest/suite.py, 
line 67 in __call__
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/support.py, line 
1078 in run
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/support.py, line 
1166 in _run_suite
  File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/support.py, line 
1192 in run_unittest
  File 
/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_threadsignals.py, 
line 210 in test_main
  File ./Lib/test/regrtest.py, line 1032 in runtest_inner
  File ./Lib/test/regrtest.py, line 826 in runtest
  File ./Lib/test/regrtest.py, line 650 in main
  File ./Lib/test/regrtest.py, line 1607 in module
make: *** [buildbottest] Error 1
program finished with exit code 2
elapsedTime=3365.320090
-
http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2289/steps/test/logs/stdio
http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/1700/steps/test/logs/stdio

test_threadsignals hangs at:

class ThreadSignals(unittest.TestCase):
def test_signals(self):
signalled_all.acquire()
self.spawnSignallingThread()
signalled_all.acquire()  here


self.spawnSignallingThread() calls:

def send_signals():
os.kill(process_pid, signal.SIGUSR1)
os.kill(process_pid, signal.SIGUSR2)
signalled_all.release()


The hang may be related to regrtest timeout: faulthandler had a bug, but the 
bug is supposed to be fixed (#11753, #11755).

See also issue #11223.

--
components: Library (Lib)
messages: 132993
nosy: haypo
priority: normal
severity: normal
status: open
title: test_signals() of test_threadsignals failure on Mac OS X Tiger
versions: Python 3.3

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



[issue2736] datetime needs an epoch method

2011-04-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

On Mon, Apr 4, 2011 at 5:42 PM, Jay Taylor rep...@bugs.python.org wrote:
..
 I couldn't agree more with ping's position on this.

Adding votes to a tracker issue without a working patch will not move
it any further.   There are several committers besides me in the nosy
list including the original author of the datetime module.  If it was
such a universally desired feature as Ka-Ping makes it sound, it would
be committed long before I became the maintainer of the datetime
module.

  It is against the spirit of what Python has set out to be, and the blocking 
 needs to stop.

I don't think any committer has a power to *block* a patch.  I
certainly don't.  If  Ka-Ping wants to add a feature over my
objections, it is well within his power to do so. (Note that I
objected to timedelta.total_seconds(), but it was added nevertheless.)
 It would be best, however to bring this to python-dev or python-ideas
first.

 Any chance we could get a .epoch() function into python 2.7 as well?

No.

--

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



[issue11768] test_signals() of test_threadsignals failure on Mac OS X Tiger

2011-04-04 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset d14eac872a46 by Victor Stinner in branch 'default':
Issue #11768: add debug messages in test_threadsignals.test_signals
http://hg.python.org/cpython/rev/d14eac872a46

--
nosy: +python-dev

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Attaching timing code.

Results with and without patch (as cleaned-up):

  7.1 seconds without patch
  3.2 seconds with patch

--
Added file: http://bugs.python.org/file21537/time_cmp_to_key.py

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-04 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Attaching cleaned-up version of the patch, making it more like the pure python 
version:

* Made 'obj' a member so it is an accessible field
* Accept keyword arguments
* Create arg tuple like was done in the Py2.7 code
* Create the zero only once
* Expanded tests to cover all code paths

--
Added file: http://bugs.python.org/file21538/11707_4.patch

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



[issue11769] test_notify() of test_threading hang on x86 XP-4 3.x:

2011-04-04 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

Timeout of 15 minutes on x86 XP-4 3.x:

...
[334/354] test_threading
Thread 0x024c:
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\threading.py, line 
235 in wait
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 392 in f
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 37 in task

Thread 0x02d8:
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\threading.py, line 
235 in wait
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 392 in f
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 37 in task

Thread 0x0da4:
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\threading.py, line 
235 in wait
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 392 in f
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 37 in task

Thread 0x0bb0:
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 16 in _wait
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 416 in _check_notify
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\lock_tests.py, 
line 433 in test_notify
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\case.py, 
line 387 in _executeTestPart
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\case.py, 
line 442 in run
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\case.py, 
line 494 in __call__
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\suite.py, 
line 105 in run
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\suite.py, 
line 67 in __call__
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\suite.py, 
line 105 in run
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\unittest\suite.py, 
line 67 in __call__
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py, 
line 1078 in run
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py, 
line 1166 in _run_suite
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\support.py, 
line 1192 in run_unittest
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_threading.py,
 line 728 in test_main
  File ../lib/test/regrtest.py, line 1032 in runtest_inner
  File ../lib/test/regrtest.py, line 826 in runtest
  File ../lib/test/regrtest.py, line 650 in main
  File ../lib/test/regrtest.py, line 1607 in module
s_push: parser stack overflow
program finished with exit code 1
elapsedTime=2601.059000

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4317/steps/test/logs/stdio

Hum, it looks like we have 4 threads, and all threads are waiting.

= See issue #8799 and maybe also #4188 and #5114.

--
components: Library (Lib)
messages: 132998
nosy: haypo
priority: normal
severity: normal
status: open
title: test_notify() of test_threading hang on x86 XP-4 3.x:
versions: Python 3.3

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



[issue11727] Add a --timeout option to regrtest.py using the faulthandler module

2011-04-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

regrtest default timeout is now 30 minutes.

I opened specific issues for each failure:

 * test_sendall_interrupted() of test_socket: issue #11753
 * test_itimer_real() of test_signal: issue #11755
 * test_threadsignals: issue #11768
 * test_notify() of test_threading: issue #11769

If you get new timeout issue, it's now better to open a new specific issue.

--
resolution:  - fixed
status: open - closed

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



  1   2   >