[issue21462] PEP 466: upgrade OpenSSL in the Python 2.7 Windows builds

2014-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Yes, since OpenSSL 1.0.2 is still in beta, the target version for 2.7.7 would be 1.0.1g -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21462

[issue21474] Idle: updata fixwordbreaks() for unicode identifiers

2014-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is enough to get rid of this function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21474 ___

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21469 ___ ___ Python-bugs-list

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-12 Thread Mateusz Łoskot
Mateusz Łoskot added the comment: On 9 May 2014 19:21, Tim Golden rep...@bugs.python.org wrote: Fixed. Thanks for the report Thank you for the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21452

[issue1599254] mailbox: other programs' messages can vanish without trace

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1599254 ___ ___ Python-bugs-list mailing list

[issue20115] NUL bytes in commented lines

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20115 ___ ___ Python-bugs-list mailing list

[issue21475] Support the Sitemap and Crawl-delay extensions in robotparser

2014-05-12 Thread Berker Peksag
Berker Peksag added the comment: There is a patch for Crawl-delay in issue 16099. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21475 ___

[issue21221] Minor struct_time documentation bug

2014-05-12 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21221 ___ ___ Python-bugs-list mailing list

[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___

[issue17756] test_syntax_error fails when run in the installed location

2014-05-12 Thread Michael Foord
Michael Foord added the comment: It looks like the simplest fix would be to change NameError: to NameError, as the problem is that they're (sometimes!?) on separate lines. This still tests what we want to test. -- ___ Python tracker

[issue17756] test_syntax_error fails when run in the installed location

2014-05-12 Thread Matthias Klose
Matthias Klose added the comment: sure, doing this. my follow-up question was if it is necessary to fix anything else in unittest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17756 ___

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Dmitry Andreychuk
New submission from Dmitry Andreychuk: Calls to autospecced mock functions are not recorded to mock_calls list of parent mock. This only happens if autospec is used and the original object is a function. Example: import unittest.mock as mock def foo(): pass parent = mock.Mock()

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9400 ___ ___ Python-bugs-list

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2014-05-12 Thread Martin Dengler
Changes by Martin Dengler mar...@martindengler.com: -- nosy: +mdengler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8296 ___ ___ Python-bugs-list

[issue21198] Minor tarfile documentation bug

2014-05-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag, serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file35223/issue21198.diff ___ Python tracker rep...@bugs.python.org

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-12 Thread mattip
mattip added the comment: Updated patch for default for empty shape, thanks eryksun -- Added file: http://bugs.python.org/file35224/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker rep...@bugs.python.org

[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-05-12 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16099 ___

[issue21479] Document TarFile.open() as a classmethod

2014-05-12 Thread Berker Peksag
New submission from Berker Peksag: The patch also updates the signature of TarFile.open(). -- assignee: docs@python components: Documentation files: tarfile-open-classmethod.diff keywords: patch messages: 218323 nosy: berker.peksag, docs@python, serhiy.storchaka priority: normal

[issue20872] dbm/gdbm/ndbm close methods are not document

2014-05-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review versions: -Python 3.3 Added file: http://bugs.python.org/file35226/issue20872.diff ___ Python tracker rep...@bugs.python.org

[issue21480] A build now requires...

2014-05-12 Thread Skip Montanaro
New submission from Skip Montanaro: It's been awhile since I pulled from Mercurial and built, but I tried today. I almost immediately ran into an error. The configure step worked fine, but make, not so much: % make python ./Tools/scripts/generate_opcode_h.py ./Lib/opcode.py ./Include/opcode.h

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Tal Einat
Tal Einat added the comment: Changes LGTM. This module could certainly use some cleanup and updates. For example, last_changed should be a property and always accessed one way (instead of either .mtime() or .last_changed) and should be initialized to None instead of zero to avoid ambiguity,

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
New submission from Joe Borg: See example: import argparse a = argparse.ArgumentParser() b = a.parse_args([]) if b != None: ... print hey File stdin, line 2 print hey ^ SyntaxError: invalid syntax if b != None: ... print(hey) ... Traceback (most

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
New submission from Joe Chan: cannot return correct gcc version if the path name contains space. Suggest to change to: $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800 +++ cygwinccompiler.py 2014-05-12

[issue21480] A build now requires...

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does make touch work for you as well? -- components: +Devguide nosy: +eli.bendersky, ezio.melotti, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21480

[issue20969] Author of EPUB version of Python docs is set to Unknown instead of PSF

2014-05-12 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. I followed Antoine's name suggestion. PSF would more suitable for the epub_publisher option: http://sphinx-doc.org/config.html#confval-epub_publisher -- keywords: +patch nosy: +berker.peksag stage: needs patch - patch review Added file:

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
Joe Borg added the comment: I believe this comes from doing vars(None). But why would this be happening if Namespace is empty. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21481 ___

[issue21480] A build now requires...

2014-05-12 Thread Eli Bendersky
Eli Bendersky added the comment: Skip, PTAL at the devguide. https://docs.python.org/devguide/setup.html#avoiding-re-creating-auto-generated-files -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21480

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
Joe Chan added the comment: better to parenthesis all three exes[gcc, ld and dllwrap] with %s to better support path names that contain non-alphanumeric characters. $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800

[issue21480] A build now requires...

2014-05-12 Thread Skip Montanaro
Skip Montanaro added the comment: Does make touch work for you as well? Hadn't tried, and wasn't aware of its existence. I searched Makefile for things like AST_H. Perhaps: * Note make touch where the A build now requires... comment exists. That comment currently discourages users, as it

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a much faster patch, around 30x faster than the original code. With exhuma's data set and tester.py, the original code gives: $ time python3.4 tester.py Execution time: 5.949284339199949 seconds real0m30.152s user0m30.104s sys 0m0.016s

[issue12556] Disable size checks in mmap.mmap()

2014-05-12 Thread Josh Triplett
Josh Triplett added the comment: This rejection is indeed problematic. If mmap.mmap receives an explicit size, checking that size against stat will break on devices or special files. It's perfectly reasonable that mmap.mmap's automatic logic when passed length=0 (to map the entire file)

[issue21483] Skip os.utime() test on NFS?

2014-05-12 Thread Skip Montanaro
New submission from Skip Montanaro: I got a strange error during make test in a fresh build (hg clone ; ./configure ; make ; make test) Traceback (most recent call last): File Lib/test/test_import.py, line 293, in test_timestamp_overflow os.utime(source, (2 ** 33 - 5, 2 ** 33 - 5))

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Uh, those measurements are wrong, sorry, since tester.py doesn't consume the iterator. When consuming the iterator, the patch is ~ 4x faster than the original code, which is more reasonable :-) -- ___ Python

[issue21484] More clarity needed about difference between x += e and x = x + e

2014-05-12 Thread Feliks
New submission from Feliks: In Sec. 7.2.1 of the Language Reference, in the description of += we have: Also, when possible, the actual operation is performed in-place, meaning that rather than creating a new object and assigning that to the target, the old object is modified instead. Although

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16531 ___

[issue21484] More clarity needed about difference between x += e and x = x + e

2014-05-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: It seems to me like that is one of the most obvious consequences. How is this not an immediately obvious consequence? -- nosy: +josh.rosenberg ___ Python tracker rep...@bugs.python.org

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems like the speed of Network.supernet() is a bottleneck here. issue16531 would probably allow making supernet() much faster. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20826

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch with more tests, documentation updates, and an optimized version of the supernet() that's now 5x faster than the original. I would like to commit this if there's no further comment. -- Added file:

[issue13742] Add a key parameter (like sorted) to heapq.merge

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___ ___ Python-bugs-list

[issue17794] Add a key parameter to PriorityQueue

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17794 ___ ___ Python-bugs-list

[issue21485] remove unnecesary .flush() calls in the asyncio subprocess code example

2014-05-12 Thread akira
New submission from akira: The current code example contains [1]: print(Python failed with exit code %s: % exitcode) sys.stdout.flush() sys.stdout.buffer.flush() sys.stdout.buffer.write(stdout) sys.stdout.buffer.flush() that looks bizarre. Either a comment should be added

[issue1475692] replacing obj.__dict__ with a subclass of dict

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1475692 ___ ___

[issue21422] int 0: return the number unmodified

2014-05-12 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: Hi, sorry if it's trivial but shouldn't we add a 'shifted_true' test some were to make sure that this behavior change gets noticed next time? def test_shifted_true(self): self.assertEqual(True 0, 1) self.assertEqual(True 1, 2) --

[issue21486] optimize v4 netmask parsing

2014-05-12 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- dependencies: +Allow IPNetwork to take a tuple ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21486 ___

[issue21486] optimize v4 netmask parsing

2014-05-12 Thread Antoine Pitrou
New submission from Antoine Pitrou: Here is a patch to optimize ipv4 netmask parsing by maintaining a cache (there are not many valid ipv4 netmask representations). This should be especially useful with #16531. -- components: Library (Lib) files: v4_netmask.patch keywords: patch

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread pmoody
pmoody added the comment: fine by me. this has been on my todo list forever by $payingjob and $family have prevented me from devoting any time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16531

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e33c343a264 by Antoine Pitrou in branch 'default': Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an (address, netmask) tuple argument, so as to easily construct network objects from existing addresses.

[issue16531] Allow IPNetwork to take a tuple

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the approval, Peter! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16531

[issue21422] int 0: return the number unmodified

2014-05-12 Thread R. David Murray
R. David Murray added the comment: Francisco: I'd say that was a good idea. Would you like to propose a patch? (ie: figure out where it should go) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422

[issue21486] optimize v4 v6 netmask parsing

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch, also optimizing v6 netmask parsing (same principle). Before patch: $ ./python -m timeit -s import ipaddress net = ipaddress.IPv6Network(('2001:db8::', 96)) 1 loops, best of 3: 26.1 usec per loop $ ./python -m timeit -s import ipaddress net

[issue21422] int 0: return the number unmodified

2014-05-12 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Use assertIs, since True == 1, but True is not 1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422 ___

[issue12556] Disable size checks in mmap.mmap()

2014-05-12 Thread Charles-François Natali
Charles-François Natali added the comment: From a cursory inspection, we only check the size for regular files. What exception are you seeing exactly? What does stat return on this file? -- ___ Python tracker rep...@bugs.python.org

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
Joe Chan added the comment: To prevent system crashes, I have to exclude msvc runtime library $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800 +++ cygwinccompiler.py 2014-05-13 02:59:37.870414900 +0800 @@ -341,7

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___ Python-bugs-list mailing

[issue21485] remove unnecesary .flush() calls in the asyncio subprocess code example

2014-05-12 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21485 ___

[issue12556] Disable size checks in mmap.mmap()

2014-05-12 Thread Charles-François Natali
Charles-François Natali added the comment: Scratch that. I'll try to work on a patch that doesn't break guarantees for regular files (we try to limit the possibilities of segfault). -- ___ Python tracker rep...@bugs.python.org

[issue20826] Faster implementation to collapse consecutive ip-networks

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch, a bit faster yet. After issue16531 is committed, it is now ~15x faster than 3.4. -- Added file: http://bugs.python.org/file35233/faster_collapse2.patch ___ Python tracker rep...@bugs.python.org

[issue7776] http.client.HTTPConnection tunneling is broken

2014-05-12 Thread Donald Stufft
Donald Stufft added the comment: Just an update, the issue is fixed in urllib3 and that has been pulled into requests. Requests is currently prepping to release a new version which I'll pull into pip and issue a pip 1.5.6 release which can be pulled into CPython which should fix this.

[issue21469] False positive hazards in robotparser

2014-05-12 Thread Skip Montanaro
Skip Montanaro added the comment: Can this change be (easily) tested? If so, a test case akin to your original example would be nice. -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21469

[issue21487] Assorted ipaddress performance improvements

2014-05-12 Thread Antoine Pitrou
New submission from Antoine Pitrou: Now that issue #16531 has been committed, it becomes possible to make some operations faster. Attached patch makes summarize_address_range() ~2x faster and Network.subnets() ~4x faster. -- components: Library (Lib) files: ipaddr_perf.patch keywords:

[issue21422] int 0: return the number unmodified

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef49aaad3812 by Victor Stinner in branch '3.4': Issue #21422: Add a test to check that bool int and bool int return an int http://hg.python.org/cpython/rev/ef49aaad3812 New changeset 3da4aed1d18a by Victor Stinner in branch 'default': (Merge 3.4)

[issue21422] int 0: return the number unmodified

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: Ok, 3 core dev are opposed to the change, I close the issue. I added a test on bool int and bool int to ensure that the result is an int. -- resolution: - rejected status: open - closed ___ Python tracker

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21478 ___ ___ Python-bugs-list mailing

[issue21420] Optimize 2 ** n: implement it as 1 n

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: My main motivation was to use calloc() (issue #21419) for 2**n. It looks like using calloc() for this is only useful for very rare cases (very large value of n: result larger than 1 MB). I close the issue. -- resolution: - rejected status: open -

[issue21419] Use calloc() instead of malloc() for int int (lshift)

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: The optimization of 2**n looks to be only useful for very large value of n, result larger than 1 MB. This use case is very rare, and you should probably use another library (GMP, numpy, or something else) for such large numbers. I close the issue. --

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Michael Foord
Michael Foord added the comment: Mock objects detect when another mock is added as a child, but they don't currently detect that a function created by autospec has been added. It should be a fairly easy fix. -- assignee: - michael.foord ___ Python

[issue21478] mock calls don't propagate to parent (autospec)

2014-05-12 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: +kushal.das stage: - needs patch versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21478 ___

[issue21422] int 0: return the number unmodified

2014-05-12 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: I Victor you were so fast, I started with one patch also in bool (at least the place was right). The problem is that I was getting some extrage (for me at least). As far I hat: def test_shifted_true(self): with

[issue21422] int 0: return the number unmodified

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: What I was doing wrong? The is operator should only be used to compare identical objects. Small integers (range -5..255 if I remember correctly) are singletons. I prefer to not rely on this implementation detail in a unit test of the Python standard

[issue21384] Windows: Make handle non inheritable by default

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: For example, hCryptProv in Python/random.c is inheritable or not? This is not a standard handle. GetHandleInformation() fails with a Windows error 6 (invalid descriptor). I listed inheritable handles with a loop on range(0, 0x1001): only handles of stdin,

[issue21485] remove unnecesary .flush() calls in the asyncio subprocess code example

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0404f0da01a by Victor Stinner in branch '3.4': Issue #21485: remove unnecesary .flush() calls in the asyncio subprocess code http://hg.python.org/cpython/rev/c0404f0da01a New changeset 3c26389d741c by Victor Stinner in branch 'default': (Merge

[issue21485] remove unnecesary .flush() calls in the asyncio subprocess code example

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: I wrote the example and the first call to buffer.flush() is a mistake. Thanks for your patch, I applied it. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue21470] Better seeding for the random module

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: MT is equidistributed. This a major point in its favor but also implies that there are long stretches of uninteresting sequences. When we seed with only a subset the state space, there is a risk of systematically landing in those stretches. What is an

[issue21455] add default backlog to socket.listen()

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: Py_MIN(SOMAXCONN, 128) On Windows, it's not the best choice to use this hardcoded limit. socket.SOMAXCONN is 2^31-1. listen() documentation says that Windows chooses a reasonable backlog value for you if you pass SOMAXCONN:

[issue21470] Better seeding for the random module

2014-05-12 Thread Tim Peters
Tim Peters added the comment: [haypo] What is an uninteresting sequence? What are the problem of these sequences? A sequence that would greatly surprise a user. For example, if you generate 32-bit ints from the Twister in one obvious way, there are starting places where you'll get 623

[issue21470] Better seeding for the random module

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: A sequence that would greatly surprise a user. No user complained past years. I don't think that we should worry so much, because it looks like reading more data from /dev/urandom can be a more serious and concrete issue. --

[issue21422] int 0: return the number unmodified

2014-05-12 Thread R. David Murray
R. David Murray added the comment: Arfrever's advice was misleading...the test would have needed to be assertIsNot(True 0, 1), but the fact that True is not preserved is not really what we want to test. What we want to test is that the return value is of type 'int', which is what Victor's

[issue21470] Better seeding for the random module

2014-05-12 Thread Tim Peters
Tim Peters added the comment: [haypo] No user complained past years. Raymond said We've previously had this problem with MT (since resolved, where it is was landed in a very non-random zone). Do you believe he was wrong? I don't think that we should worry so much, because it looks like

[issue21455] add default backlog to socket.listen()

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: An article suggests to use max(1024, socket.SOMAXCONN) (to listen() backlog as large as possible) instead of socket.SOMAXCONN because the OS maximum can be larger than SOMAXCONN (and that it's not possible in Python to get the OS value):

[issue21470] Better seeding for the random module

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: There is no useful theory that allows us to predict the characteristics of the produced sequences from a set of possible seeds, so limiting the set of possible seeds is potentially dangerous. I still find it difficult to understand where is the said danger.

[issue21422] int 0: return the number unmodified

2014-05-12 Thread R. David Murray
R. David Murray added the comment: Arfrever pointed out on irc that I misread. It would indeed be assertIs(True 0, 1), but that wouldn't make a good test because the fact that '1 is 1' is an implementation detail of CPython and can't be relied upon. --

[issue21437] document that asyncio.ProactorEventLoop doesn't support SSL

2014-05-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +gvanrossum, haypo, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21437 ___

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset cee528d44b1e by Victor Stinner in branch '3.4': Issue #21418: Fix a crash in the builtin function super() when called without http://hg.python.org/cpython/rev/cee528d44b1e New changeset 53cf343c4fff by Victor Stinner in branch 'default': (Merge

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: While embedding the Python interpreter in an application, I have encountered a crash when the built-in function 'super' is invoked with no arguments. This is not supported. When super() is invoked with no arguments, the class is retrieved (indirectly) from

[issue21418] Segv during call to super_init in application embedding Python interpreter.

2014-05-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21418 ___

[issue21470] Better seeding for the random module

2014-05-12 Thread Tim Peters
Tim Peters added the comment: [pitrou] I still find it difficult to understand where is the said danger. The theoretical properties that make the Twister so attractive were all proved based on mathematical analysis of its entire period. The only way to get at the whole period is to allow

[issue21488] codecs.encode/decode documentation inconsistency

2014-05-12 Thread Brad Aylsworth
New submission from Brad Aylsworth: The documentation page for codecs (https://docs.python.org/2/library/codecs.html) shows keyword arguments for codecs.encode and codecs.decode, but they throw an error if keyword arguments are used. codecs.decode.__doc__ reports 'decode(obj,

[issue21088] curses addch() argument position reverses in Python3.4.0

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: Can we now close this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21088 ___ ___ Python-bugs-list

[issue21308] PEP 466: backport ssl changes

2014-05-12 Thread Mark Nottingham
Changes by Mark Nottingham m...@mnot.net: -- nosy: +mnot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___ ___ Python-bugs-list mailing list

[issue21470] Better seeding for the random module

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The theoretical properties that make the Twister so attractive were all proved based on mathematical analysis of its entire period. The only way to get at the whole period is to allow for all possible seeds. If the seeds Python can use are drawn from a

[issue21385] in debug mode, compile(ast) fails with an assertion error if an AST node has no line number information

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: With the development version (Python 3.5), I reproduce the crash when Python is compiled in debug mode: $ ./python astlinenotest.py python: Python/compile.c:3975: assemble_lnotab: Assertion `d_lineno = 0' failed. Abandon (core dumped) The problem is that

[issue21470] Better seeding for the random module

2014-05-12 Thread Tim Peters
Tim Peters added the comment: Thanks for the explanation. It's much clearer now. Maybe, but it's also overblown - LOL ;-) That is, no matter what the starting seed, the user will see a microscopically tiny span of the Twister's entire period. So all those provably correct properties that

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
New submission from Matthew Fernandez: Perhaps others wouldn't consider this a bug, but it was definitely surprising to me. When switching between optimisation levels -OO (optimise and strip docstrings) and -O (just optimise), you will find the docstrings are still stripped. E.g. $ ls

[issue21412] core dump in PyThreadState_Get when built --with-pymalloc

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: Victor: sure; see attached. Ok, so the error occurs when Python tries to import the _heapq dynamic module: PyModule_Create2() calls PyThreadState_Get() to retrieve to current thread, but it fails. There is a current thread because PyModule_Create2() is

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not really intentional, it's just a limitation of the current implementation (where the same .pyo files are used for both -O and -OO). Already reported as issue1538778 (which was closed as won't fix). -- nosy: +barry, pitrou superseder: - pyo's are

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89a29e92416f by Victor Stinner in branch '3.4': Issue #21398: Fix an unicode error in the pydoc pager when the documentation http://hg.python.org/cpython/rev/89a29e92416f New changeset 3424d65ad5ce by Victor Stinner in branch 'default': (Merge 3.4)

[issue21398] LC_CTYPE=C: pydoc leaves terminal in an unusable state

2014-05-12 Thread STINNER Victor
STINNER Victor added the comment: I fixed the initial bug and so I close the issue. Open a new issue if you have an idea to restore the terminal state when the pager breaks the terminal. I don't think that it's possible to save/restore the terminal state in a portable way. --

[issue21489] Switching from -OO to -O still uses cached bytecode

2014-05-12 Thread Matthew Fernandez
Matthew Fernandez added the comment: Ah thanks, Antoine. Sorry, failed to find that issue in my prior searching. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21489 ___

[issue21226] PyImport_ExecCodeModuleObject not setting module attributes

2014-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d20e30bd540 by Eric Snow in branch '3.4': Issue #21226: Set all attrs in PyImport_ExecCodeModuleObject. http://hg.python.org/cpython/rev/7d20e30bd540 New changeset bc324a49d0fc by Eric Snow in branch 'default': Merge from 3.4 (for #21226).

[issue21226] PyImport_ExecCodeModuleObject not setting module attributes

2014-05-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21226 ___

  1   2   >