[issue11798] Test cases not garbage collected after run
Changes by Simon Charette charett...@gmail.com: -- nosy: +charettes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11798 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18606] Add statistics module to standard library
Steven D'Aprano added the comment: To anyone waiting for me to respond to rietveld reviews, I'm trying, I really am, but I keep getting a django traceback. This seems to have been reported before, three months ago: http://psf.upfronthosting.co.za/roundup/meta/issue517 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18606 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18756] os.urandom() fails under high load
STINNER Victor added the comment: Tarek: try to use ssl.RAND_bytes(), it is secure, fast and don't use a file descriptor. IMO if something can be improved, it is in the random.SystemRandom() class: it can keep the FD open. Does the class have a method to generate random bytes? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18756 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Armin Rigo added the comment: Just mentioning it here again, but type(a).__index__(a) is still not perfectly correct. Attached is a case where it differs. I think you get always the correct answer by evaluating range(a).stop. It's admittedly obscure... For example: class A: def __index__(self): return -42**100 a = A() print(range(a).stop) -- nosy: +arigo Added file: http://bugs.python.org/file31334/x.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18767] csv documentation does not note default quote constant
R. David Murray added the comment: Well, it does say that QUOTE_MINIMAL is the default for the dialect 'quoting' attribute. What it doesn't say is that the default dialect (excel) is exactly the documented default values for all the dialect parameters. (Although having said that, I'm not 100% sure it is true, I didn't fully check the correspondence). -- nosy: +r.david.murray versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18756] os.urandom() fails under high load
Donald Stufft added the comment: haypo: It's been suggested by a number of security professionals that using the OpenSSL random (or really any random) instead of urandom is likely to be a smarter idea. The likelyhood that urandom is broken is far less than any other source of random. This can be seen in the recent issues on the Android platform. This is not to say that there's a reason to believe that OpenSSL is broken currently, but that the chances are higher for it to be than /dev/urandom. An example of when this happened was http://www.debian.org/security/2008/dsa-1571. There's no reason to believe that OpenSSL is wrong right now, but the chances of OpenSSL being wrong are greater than the chances of /dev/urandom being There's been a few threads on twitter about it in light of the Android SecureRandom issue (don't need to read these, just here for reference): - https://twitter.com/tqbf/status/368089082800246784 - https://twitter.com/tqbf/status/367793231808843777 - https://twitter.com/tqbf/status/368089362333827072 I don't think it actually matters if os.urandom or random.SystemRandom is the preferred interface that keeps the FD open but I do believe there should be one implementation that will use the OS source of random and maintain a persistent FD. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18756 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Serhiy Storchaka added the comment: The difference doesn't look significant. In all cases the TypeError is raised. But there was other differences between C and Python versions -- when __index__() returns non-integer. Updated patch fixes this. -- Added file: http://bugs.python.org/file31335/operator_index_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18702] Report skipped tests as skipped
Serhiy Storchaka added the comment: I'm not sure I understand you Rietveld comment right Terry. We can get rid of _have_ssl (this is implementation detail and shouldn't be required) and just try import ssl. try: import ssl except ImportError: ssl = None If ssl is not None but nntplib.NNTP_SSL doesn't exist the NetworkedNNTP_SSLTests tests will failed: == ERROR: setUpClass (test.test_nntplib.NetworkedNNTP_SSLTests) -- Traceback (most recent call last): File /home/serhiy/py/cpython/Lib/test/test_nntplib.py, line 298, in setUpClass cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, timeout=TIMEOUT, usenetrc=False) TypeError: 'NoneType' object is not callable -- This doesn't different from a case when some exception is raised in NNTP_SSL constructor. We can add a separate test in MiscTests: @unittest.skipUnless(ssl, 'requires SSL support') def test_ssl_support(self): self.assertTrue(hasattr(nntplib, 'NNTP_SSL')) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18652] Add itertools.first_true (return first true item in iterable)
Hynek Schlawack added the comment: Well that's the point: it's extremely handy but simple. I wish Raymond would pronounce on this. I can keep using the PyPI version for all I care, so I'm not going fight for it. But with one exception there seems to be an agreement that it would be a very fine thing to have. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Mark Dickinson added the comment: Just mentioning it here again, but type(a).__index__(a) is still not perfectly correct. Hmm. type(a).__dict__['__index__'](a) ? (With suitable error checks, as in Serhiy's patch.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Armin Rigo added the comment: The difference doesn't look significant. In all cases the TypeError is raised. Ok, so here is another case. (I won't go to great lengths trying to convince you that there is a problem, because the discussion already occurred several times; google for example for _PyType_Lookup pure Python) -- Added file: http://bugs.python.org/file31336/y.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18702] Report skipped tests as skipped
Terry J. Reedy added the comment: You changed NNTP_CLASS = nntplib.NNTP_SSL, which could potentially fail, to NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None), which cannot fail. Since that was the only thing that previously could fail, the change leaves nothing that can fail, so the test is not a test. I suggested that you either not add the third param, a default, or that you remove the null test completely. If particular, if the only chunk of code in nntplib that is currently being tested is being executed by some other test, then do the latter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18705] Fix typos/spelling mistakes in Lib/*.py files
Roundup Robot added the comment: New changeset d234dd21374a by Ezio Melotti in branch '2.7': #18705: fix a number of typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/d234dd21374a New changeset e07f104133d5 by Ezio Melotti in branch '3.3': #18705: fix a number of typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/e07f104133d5 New changeset a9ee869cae40 by Ezio Melotti in branch 'default': #18705: merge with 3.3. http://hg.python.org/cpython/rev/a9ee869cae40 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18705] Fix typos/spelling mistakes in Lib/*.py files
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18178] Redefinition of malloc(3) family of functions at build time
Roundup Robot added the comment: New changeset f09ca52747a6 by Christian Heimes in branch '3.3': Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke malloc weak symbols. http://hg.python.org/cpython/rev/f09ca52747a6 New changeset bea2f12e899e by Christian Heimes in branch 'default': Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke malloc weak symbols. http://hg.python.org/cpython/rev/bea2f12e899e New changeset d4ac6eee7061 by Christian Heimes in branch '2.7': Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke malloc weak symbols. http://hg.python.org/cpython/rev/d4ac6eee7061 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18741] Fix typos/spelling mistakes in Lib/*/*/.py files
Roundup Robot added the comment: New changeset 5295ed192ffd by Ezio Melotti in branch '2.7': #18741: fix more typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/5295ed192ffd New changeset 9e4685d703d4 by Ezio Melotti in branch '3.3': #18741: fix more typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/9e4685d703d4 New changeset b3236989f869 by Ezio Melotti in branch 'default': #18741: merge with 3.3. http://hg.python.org/cpython/rev/b3236989f869 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18741] Fix typos/spelling mistakes in Lib/*/*/.py files
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18466] Spelling mistakes in various code comments.
Ezio Melotti added the comment: Févry, do you want to make an updated patch that includes also everytime as suggested by Terry? I think some of the typos of the current patch have also been fixed by the other patches you submitted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18764] The pdb print command prints repr instead of str in python3
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, georg.brandl type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18764 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18759] Fix internal doc references for logging package
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18466] Spelling mistakes in various code comments.
Févry Thibault added the comment: Updated the patch. -- Added file: http://bugs.python.org/file31337/typos.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18466] Spelling mistakes in various code comments.
Roundup Robot added the comment: New changeset c75b8d5fa016 by Ezio Melotti in branch '2.7': #18466: fix more typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/c75b8d5fa016 New changeset 61227b4c169f by Ezio Melotti in branch '3.3': #18466: fix more typos. Patch by Févry Thibault. http://hg.python.org/cpython/rev/61227b4c169f New changeset 4cc308acd26d by Ezio Melotti in branch 'default': #18466: merge with 3.3. http://hg.python.org/cpython/rev/4cc308acd26d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18466] Spelling mistakes in various code comments.
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18466 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - test needed versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13107] Text width in optparse.py can become negative
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: needs patch - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9882] abspath from directory
Ezio Melotti added the comment: Was this brought up on python-ideas? If so, what was the outcome? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15248] Better explain TypeError: 'tuple' object is not callable
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - docs@python components: +Documentation keywords: +easy nosy: +docs@python versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6916] Remove deprecated items from asynchat
Ezio Melotti added the comment: What's the status of this? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6916 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12866] Want to submit our Audioop.c patch for 24bit audio
Ezio Melotti added the comment: What's the status of this? -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9741] msgfmt.py generates invalid mo because msgfmt.make() does not clear dictionary
Ezio Melotti added the comment: FWIW now we have Lib/test/test_tools.py. -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10654] test_datetime sometimes fails on Python3.x windows binary
Ezio Melotti added the comment: Is this still an issue? -- nosy: +ezio.melotti type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Serhiy Storchaka added the comment: Hmm. type(a).__dict__['__index__'](a) ? This variant fails on: class A(int): @staticmethod def __index__(): return 42 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12913] Add a debugging howto
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17232] Improve -O docs
Ezio Melotti added the comment: Terry, do you want to update your patch? -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Mark Dickinson added the comment: Serhiy: Yep, or even on bool. Thanks. Armin: I don't think either of us thinks there isn't a problem here. :-) The Google search you suggested didn't turn up a whole lot of useful information for me. Was there a discussion of this on python-dev at some point? (And if not, should there be?) For this *particular* issue, it seems we can't exactly reproduce. type(a).__index__(a) seems like the best practical approximation to the true behaviour. I'm guessing that it's fairly rare to have useful definitions of __index__ on a metaclass. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5720] ctime: I don't think that word means what you think it means.
Ezio Melotti added the comment: What was the outcome? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5720 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16699] Mountain Lion buildbot lacks disk space
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - out of date stage: - committed/rejected status: open - closed type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16699 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13924] Mercurial robots.txt should let robots crawl landing pages.
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13924 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18626] Make python -m inspect name meaningful
Nick Coghlan added the comment: I realised that with the module:qualname syntax, it's straightforward to expand this beyond module introspection to arbitrary objects. What I suggest we could output: - a header with key module info (names taken from PEP 451): Origin Cached Submodule search path Loader (repr output) - for non-module objects, also include the line within the file (if it can be determined) - the output of getsource() if a --source option is given -- title: Make python -m inspect name dump the source of a module - Make python -m inspect name meaningful ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18626 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13822] is(upper/lower/title) are not exactly correct
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18553] os.isatty() is not Unix only
Ezio Melotti added the comment: Are there tests for this? -- components: +Tests keywords: +easy nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18553 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
James Sanders added the comment: I did a bit more digging and I think I've worked out what is going on. The particular bit of tcl initialization code that triggers the problem if it is run before the fork is Tcl_InitNotifier in tclUnixNotify.c. It turns out there is a known problem with this bit of tcl not being process-safe if tcl was built with threading support (this is discussed at https://bugs.archlinux.org/task/16401, for example). The bug doesn't show up in my 8.5 builds as threading support is off by default, though the debian/ubuntu packages apparently have it switched on. Threading was turned on by default in 8.6, but a recent change to tclUnixNotify.c (discussed at https://issues.apache.org/bugzilla/show_bug.cgi?id=55153#c13 - it should be included in 8.6.1 and 8.5.15) appears to have fixed the whole problem anyway. So hopefully the bug should disappear entirely in future releases of tcl, but for now you can work around it by building tcl without threads, calling exec in between the fork and any use of tkinter in the child process, or not importing tkinter until after the fork. I don't know if there should be a note about this somewhere in the tkinter docs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18762] error in test_multiprocessing_forkserver
koobs added the comment: 2 more cases seen here: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/227/steps/test/logs/stdio Note: cc on FreeBSD 10.0-CURRENT is clang and here: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%203.x/builds/1825/steps/test/logs/stdio -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18762 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18768] Wrong documentation of RAND_egd function in ssl module
New submission from Vajrasky Kok: import ssl ssl.RAND_egd.__doc__ RAND_egd(path) - bytes\n\nQueries the entropy gather daemon (EGD) on the socket named by 'path'.\nReturns number of bytes read. Raises SSLError if connection to EGD\nfails or if it does provide enough data to seed PRNG. Compare it to documentation about RAND_egd() function from openssl website (https://www.openssl.org/docs/crypto/RAND_egd.html): RAND_egd() and RAND_egd_bytes() return the number of bytes read from the daemon on success, and -1 if the connection failed or the daemon did not return enough data to fully seed the PRNG. Attached the patch to fix the documentation. I am not sure whether we should put the word fully or not. On the side note: In line 813 in Modules/_ssl.c (the same file where my patch fixed the documentation about RAND_egd function): gntype = name- type; The space between - and type irritates my eyes. Maybe we can fix this while we fix the documentation? Anyway, this is not really important. I just want to expose it to public and think this does not deserve a dedicated ticket. -- assignee: docs@python components: Documentation files: fix_documentation_on_rand_egd_function.patch keywords: patch messages: 195482 nosy: christian.heimes, docs@python, vajrasky priority: normal severity: normal status: open title: Wrong documentation of RAND_egd function in ssl module versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31338/fix_documentation_on_rand_egd_function.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15939] make *.rst files in Doc/ parseable by doctest
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement versions: -Python 3.2 Added file: http://bugs.python.org/file31339/issue15939-ctypes-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18768] Wrong documentation of RAND_egd function in ssl module
Roundup Robot added the comment: New changeset b352a5cb60b6 by Christian Heimes in branch '3.3': Issue #18768: coding style nitpick. Thanks to Vajrasky Kok http://hg.python.org/cpython/rev/b352a5cb60b6 New changeset fe444f324756 by Christian Heimes in branch 'default': Issue #18768: coding style nitpick. Thanks to Vajrasky Kok http://hg.python.org/cpython/rev/fe444f324756 New changeset a8787a6fa107 by Christian Heimes in branch '2.7': Issue #18768: coding style nitpick. Thanks to Vajrasky Kok http://hg.python.org/cpython/rev/a8787a6fa107 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18768] Wrong documentation of RAND_egd function in ssl module
Christian Heimes added the comment: Thanks, I have removed the extra space in gntype = name- type; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18768] Wrong documentation of RAND_egd function in ssl module
Roundup Robot added the comment: New changeset ae91252943bf by Christian Heimes in branch '3.3': Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/ae91252943bf New changeset 5c091acc799f by Christian Heimes in branch 'default': Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/5c091acc799f New changeset 31389495cdbf by Christian Heimes in branch '2.7': Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/31389495cdbf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18768] Wrong documentation of RAND_egd function in ssl module
Christian Heimes added the comment: Thanks :) -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2516] Instance methods are misreporting the number of arguments
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2506] Add mechanism to disable optimizations
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11671] Security hole in wsgiref.headers.Headers
Christian Heimes added the comment: What do the RFCs for RFC-822 and HTTP 1.1 say about \r and \n in header names? -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18747] Re-seed OpenSSL's PRNG after fork
Christian Heimes added the comment: Here is a patch that is based on Apache's mod_ssl code. mod_ssl perturbs the PRNG state more often but I think that's overkill for Python. The new patch only affects the PRNG state of the child process. In my opinion it is the better way to solve this issue. The RAND API does some internal locking. Bad things might happen if one thread of a process calls fork() while another is in the middle of a locked RAND operation. -- Added file: http://bugs.python.org/file31340/openssl_prng_atfork3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18747 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Armin Rigo added the comment: This may have been the most recent discussion of this idea (as far as I can tell): http://mail.python.org/pipermail//python-ideas/2012-August/016036.html Basically, it seems to be still unresolved in the trunk Python; sorry, I thought by now it would have been resolved e.g. by the addition of a method on types or a function in the operator module. In the absence of either, you need either to simulate its behavior by doing this: for t in type(a).__mro__: if '__index__' in t.__dict__: return t.__dict__['__index__'](a) Or you can piggyback on an unrelated call that simply causes the C-level PyNumber_Index() to be called: return range(a).stop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Armin Rigo added the comment: Sorry, realized that my pure Python algorithm isn't equivalent to _PyType_Lookup() --- it fails the staticmethod example of Serhiy. A closer one would be: for t in type(a).__mro__: if '__index__' in t.__dict__: return t.__dict__['__index__'].__get__(a)() But it's still not a perfect match. I think right now the only perfect answer is given by workarounds like range(a).stop... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11671] Security hole in wsgiref.headers.Headers
Devin Cook added the comment: It looks like it's allowed for header line continuation. http://www.ietf.org/rfc/rfc2616.txt HTTP/1.1 header field values can be folded onto multiple lines if the continuation line begins with a space or horizontal tab. All linear white space, including folding, has the same semantics as SP. A recipient MAY replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream. ... A CRLF is allowed in the definition of TEXT only as part of a header field continuation. It is expected that the folding LWS will be replaced with a single SP before interpretation of the TEXT value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18746] test_threading.test_finalize_with_trace() fails on FreeBSD buildbot
koobs added the comment: I'm not sure if this issue is/was related, but it seems the commit addressing #18178 has taken care of the test_finalize_runnning_thread failure. I note that your description specifies test_finalize_with_trace, perhaps suggesting your reproduction case may be something slightly different? FWIW, I don't think I've seen the 'with_trace' test fail on my buildbots (but correct me if I'm wrong) After the commit mentioned above, the FreeBSD 10 buildbot is now green on all branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18746 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18178] Redefinition of malloc(3) family of functions at build time
koobs added the comment: Commit looks good, confirming test suite passing for 3.x, 3.3 and 2.7.on http://buildbot.python.org/all/buildslaves/koobs-freebsd10 Thank you for picking this up and finishing it off Christian. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18769] argparse remove subparser
New submission from Michael Bikovitsky: It might be useful in some circumstances to be able to remove a subparser, however the module does not provide such functionality. The proposed method takes the same arguments as the add_parser method and removes the matching subparser from the map (including aliases). -- components: Library (Lib) files: argparse_remove_parser.patch keywords: patch messages: 195494 nosy: Michael.Bikovitsky, bethard priority: normal severity: normal status: open title: argparse remove subparser type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31341/argparse_remove_parser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12866] Want to submit our Audioop.c patch for 24bit audio
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Serhiy Storchaka added the comment: import tempfile f = tempfile.NamedTemporaryFile(suffix='$') f.name '/tmp/tmpumyks8ju$' I see an effect. -- nosy: +serhiy.storchaka status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Ezio Melotti added the comment: Works for me on Linux too (all branches, with different types of suffix). Maybe it's a Windows issue? -- nosy: +terry.reedy status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18770] Python insert operation on list
New submission from Vivek Ratnaparkhi: Example 1: mylist = ['a','b','c','d','e'] mylist.insert(len(mylist),'f') print(mylist) Output: ['a', 'b', 'c', 'd', 'e', 'f'] Example 2: mylist = ['a','b','c','d','e'] mylist.insert(10,'f') print(mylist) Output: ['a', 'b', 'c', 'd', 'e', 'f'] Why should mylist.insert(len(mylist), x) be equivalent to mylist.insert(len(mylist)+10, x) Excepted Output: Should give index error. -- messages: 195497 nosy: vivek.ratnaparkhi priority: normal severity: normal status: open title: Python insert operation on list type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18770] Python insert operation on list
Ezio Melotti added the comment: The docs say that: l.insert(pos, val) is equivalent to: l[pos:pos] = [val] The docstring also says that the value is inserted before pos, so .insert is working as documented. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17810] Implement PEP 3154 (pickle protocol 4)
Antoine Pitrou added the comment: Alexandre, Stefan, is any of you working on this? If not, could you please expose what the status of the patch is, whose work is the most advanced (Alexandre's or Stefan's) and what should be the plan to move this forward? Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18747] Re-seed OpenSSL's PRNG after fork
Antoine Pitrou added the comment: The patch looks fine on the principle, but you should add a test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18747 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18747] Re-seed OpenSSL's PRNG after fork
Charles-François Natali added the comment: 2013/8/17 Christian Heimes rep...@bugs.python.org: Here is a patch that is based on Apache's mod_ssl code. mod_ssl perturbs the PRNG state more often but I think that's overkill for Python. The new patch only affects the PRNG state of the child process. In my opinion it is the better way to solve this issue. The RAND API does some internal locking. Bad things might happen if one thread of a process calls fork() while another is in the middle of a locked RAND operation. Ouch, this would mean making the interpreter prone to deadlock/crash (since the atfork hook is not async-signal safe) :-\ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18747 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Roundup Robot added the comment: New changeset e2b234f5bf7d by Antoine Pitrou in branch 'default': Issue #16105: When a signal handler fails to write to the file descriptor registered with ``signal.set_wakeup_fd()``, report an exception instead of ignoring the error. http://hg.python.org/cpython/rev/e2b234f5bf7d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10654] test_datetime sometimes fails on Python3.x windows binary
Terry J. Reedy added the comment: test_datetime passes on current 3.3 and 3.4. datetimetest.py now gives the same answer for all 4 classes unsupported operand type(s) for +: 'SubPy' and 'int' unsupported operand type(s) for +: 'int' and 'SubPy' NotImplemented NotImplemented NotImplemented NotImplemented whereas the first line for the two subclasses was previously NotImplemented. I presume the above is the correct behavior, so closing. -- resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10654 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18763] subprocess: file descriptors should be closed after preexec_fn is called
Charles-François Natali added the comment: With patch :) -- Added file: http://bugs.python.org/file31342/subprocess_close.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18763 ___diff -r 5d4fe1da2c90 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Fri Aug 16 23:19:56 2013 +0200 +++ b/Lib/test/test_subprocess.py Sat Aug 17 20:53:01 2013 +0200 @@ -1972,6 +1972,19 @@ self.assertRaises(OSError, os.waitpid, pid, 0) self.assertNotIn(ident, [id(o) for o in subprocess._active]) +def test_close_fds_after_preexec(self): +fd_status = support.findfile(fd_status.py, subdir=subprocessdata) + +# FDs created by preexec_fn should be closed in the child +p = subprocess.Popen([sys.executable, fd_status], + stdout=subprocess.PIPE, close_fds=True, + preexec_fn=os.pipe) +output, ignored = p.communicate() + +remaining_fds = set(map(int, output.split(b','))) + +self.assertTrue(remaining_fds = set([0, 1, 2])) + @unittest.skipUnless(mswindows, Windows specific tests) class Win32ProcessTestCase(BaseTestCase): diff -r 5d4fe1da2c90 Modules/_posixsubprocess.c --- a/Modules/_posixsubprocess.cFri Aug 16 23:19:56 2013 +0200 +++ b/Modules/_posixsubprocess.cSat Aug 17 20:53:01 2013 +0200 @@ -412,17 +412,6 @@ POSIX_CALL(close(errwrite)); } -if (close_fds) { -int local_max_fd = max_fd; -#if defined(__NetBSD__) -local_max_fd = fcntl(0, F_MAXFD); -if (local_max_fd 0) -local_max_fd = max_fd; -#endif -/* TODO HP-UX could use pstat_getproc() if anyone cares about it. */ -_close_open_fd_range(3, local_max_fd, py_fds_to_keep); -} - if (cwd) POSIX_CALL(chdir(cwd)); @@ -451,6 +440,18 @@ /* Py_DECREF(result); - We're about to exec so why bother? */ } +/* close FDs after executing preexec_fn, which might open FDs */ +if (close_fds) { +int local_max_fd = max_fd; +#if defined(__NetBSD__) +local_max_fd = fcntl(0, F_MAXFD); +if (local_max_fd 0) +local_max_fd = max_fd; +#endif +/* TODO HP-UX could use pstat_getproc() if anyone cares about it. */ +_close_open_fd_range(3, local_max_fd, py_fds_to_keep); +} + /* This loop matches the Lib/os.py _execvpe()'s PATH search when */ /* given the executable_list generated by Lib/subprocess.py. */ saved_errno = 0; ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work
Maries Ionel Cristian added the comment: What is the version of your libc library? Try something like dpkg -l libc6. 2.15-0ubuntu10.4 I don't think it's that obscure ... uwsgi has this issue https://www.google.com/search?q=libgcc_s.so.1+must+be+installed+for+pthread_cancel+to+work+uwsgi+site:lists.unbit.it- they cause it probably different but the point is that it's not obscure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
New submission from Raymond Hettinger: I'm working on a patch for the lookkey() functions in Object/setobject.c. The core idea is to follow the probe sequence as usual but to also check an adjacent entry for each probe (i.e. check table[i mask] as usual and then check table[(i mask) ^ 1] before going on the next probes which are scattered around memory). On modern processors (anything in the last decade), this is likely to reduce the cost of hash collisions and reduce the number of cache lines fetched from memory. + Cache line benefit: improves the odds that the adjacent probe will be on the same cache line, thereby reducing the total number of cache lines fetched. This benefit will work for set insertions as well as set lookups (a partial write to a cache line requires that a full cache line be read prior to writing, so it is helpful if we've just examined another slot on the same cache line). + Parallel execution: because the second lookup has no data dependency on the first lookup, some of its instructions can be executed in parallel by the out-of-order engine. + Reduced loop overhead: the second lookup doesn't require a new computation of the index *i* (we just do a XOR 1), a new perturb shift, a new masking of *i*, or a jump to the top of the loop. In other words, it has all the usual benefits of loop unrolling. - On the downside, even this partial unrolling when increase the total code size which has the negative effect of blowing other code out of the I-cache (typically 32kb). ? I'm unsure whether the additional if-statements will have a net positive or net negative effect on branch prediction rates (positive because each branch can be tracked separately or negative because additional branches use up more space in the branch prediction tables). Once the patch is ready, I'll run CacheGrind to get a better sense of what is happening. -- components: Interpreter Core messages: 195506 nosy: haypo, rhettinger priority: normal severity: normal status: open title: Reduce the cost of hash collisions for set objects type: performance versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work
Maries Ionel Cristian added the comment: Correct link https://www.google.com/search?q=libgcc_s.so.1+must+be+installed+for+pthread_cancel+to+work+uwsgi+site:lists.unbit.it -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16105] Pass read only FD to signal.set_wakeup_fd
Antoine Pitrou added the comment: Ok, I pushed the patch to 3.4. Thanks for the report! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18772] Fix test_gdb for new sets dummy object
New submission from Antoine Pitrou: Changeset 2c9a2b588a89 broke the pretty-printing of sets by the gdb plugin. Here is a temptative patch. It works, but I don't know enough to know whether that's the right coding style for a gdb plugin. Dave? -- components: Demos and Tools, Interpreter Core files: gdb_sets_repr.patch keywords: patch messages: 195509 nosy: larry, pitrou priority: release blocker severity: normal stage: patch review status: open title: Fix test_gdb for new sets dummy object type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file31343/gdb_sets_repr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18772] Fix test_gdb for new sets dummy object
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +dmalcolm, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Serhiy Storchaka added the comment: Here is updated patch which uses Armin's algorithm for lookup special methods and adds special case for int subclasses in index(). I have no idea how the documentation should look. -- Added file: http://bugs.python.org/file31344/operator_index_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18772] Fix gdb plugin for new sets dummy object
Changes by Antoine Pitrou pit...@free.fr: -- title: Fix test_gdb for new sets dummy object - Fix gdb plugin for new sets dummy object ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18770] Python insert operation on list
Changes by Brett Cannon br...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
Serhiy Storchaka added the comment: How it will affect a performance of set(range(n))? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18702] Report skipped tests as skipped
Serhiy Storchaka added the comment: You changed NNTP_CLASS = nntplib.NNTP_SSL, which could potentially fail, to NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None), which cannot fail. Since that was the only thing that previously could fail, the change leaves nothing that can fail, so the test is not a test. This statement is not a part of a test. It runs at module import time. As you said in msg194907 the failing here will prohibit the running of all tests (even not SSL related). I suggested that you either not add the third param, a default, getattr(nntplib, 'NNTP_SSL') is same as nntplib.NNTP_SSL. And it will break all tests. or that you remove the null test completely. The purpose of this issue is stopping silence skipping tests. If some tests skipped for some reasons it should be reported. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18712] Pure Python operator.index doesn't match the C version.
Eric Snow added the comment: Couldn't you make use of inspect.getattr_static()? getattr_static(obj.__class__, '__index__').__get__(obj)() getattr_static() does some extra work to get do the right lookup. I haven't verified that it matches _PyType_Lookup() exactly, but it should be pretty close at least. Also, pickle (unfortunately) also does lookup on instances rather than classes for the special methods (issue #16251). -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18770] Python insert operation on list
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Terry J. Reedy added the comment: 'Filename extensions' are a proper subset of 'suffixes'. https://en.wikipedia.org/wiki/Filename_extension Dan 'solutions' indicates that he thinks that the two sets are or should be the same, which they are not. The only thing that is DOS/Windows specific is its more special treatment of '.'. That said, I can see how a Windows user might be confused by the following awkward sentence. If 'suffix' is specified, the file name will end with that suffix, otherwise there will be no suffix. as 'no suffix' is easily read as 'no extension. The manual, but not the docstring, addresses the possible confusion by adding mkstemp() does not put a dot between the file name and the suffix; if you need one, put it at the beginning of suffix. I think the prefix sentence is also a bit awkward. If 'prefix' is specified, the file name will begin with that prefix, otherwise a default prefix is used. I think both parameters should be explained in both docstring and doc with one shorter and clearer entry. The file name will begin with *prefix* (default 'tmp') and end with *suffix* (default ''). The is no automatic addition of a period ('.') before the suffix. -- stage: test needed - needs patch status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18702] Report skipped tests as skipped
Terry J. Reedy added the comment: My original suggestion was to put the possibly failing assignment inside @classmethod def setUpClass: NNTP_CLASS = nntplib.NNTP_SSL so that failure of the assignment would be be reported, but not affect import. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Serhiy Storchaka added the comment: I don't think any explanation is needed. A docstring should be short, we can't duplicate a manual in it. The mentioning suffix default is redundant because it already exposed in the function signature. The mentioning prefix default adds duplication. The purpose of introducing of the template attribute is get rid of such duplication. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18702] Report skipped tests as skipped
Serhiy Storchaka added the comment: Actually you should call parent's setUpClass at the and of declared setUpClass. Therefore you need 4 nontrivial lines instead of 1. The test will fail in setUpClass() in any case because parent's setUpClass() uses NNTP_CLASS. There are no behavior difference between this variants, the variant with getattr just is shorter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period
Terry J. Reedy added the comment: It would be fine with me to shorten the suggestion and not repeat the defaults. They are currently in both doc and docstring, but with *more* words than I used. The file name will begin with *prefix* and end with *suffix*. There is no automatic addition of a period ('.') before the suffix. The explanation of . is already in the doc in a wordier form (too wordy in my view). The above is much shorter than what is currently in the docstring. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks
Michael Foord added the comment: This is done in outcome.testPartExecutor. If you add it in the except clause then it is *only* called on test failure or error. If we call it unconditionally with the result (maybe a sys.exc_info tuple?) then it could have extended use cases (perhaps custom reporting)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18765 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file31345/so.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
Raymond Hettinger added the comment: Serhiy, I've posted a patch so you can examine the effects in detail. For something like set(range(n)), I would expect no change because the dataset is collision free due to Tim's design where hash(someint)==someint. That said, I'm trying to optimize the general case and don't really if rare cases are modestly slowed. The new code only kicks in when there is a collision. The logic for the initial probe is unchanged. The idea is to pickup some of the cache locality benefits of collision resolution by separate chaining, but not incurring the 100% malloc typically associated with chaining. When adjacent entries are in the same cache-line, the cost of the extra adjacent probe is much cheaper (nearly zero) than a probe somewhere else in memory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18747] Re-seed OpenSSL's PRNG after fork
STINNER Victor added the comment: openssl_prng_atfork3.patch: Why not using seconds (only micro or nanoseconds) in the seed? Add a few more bits should not reduce the entropy. OpenSSL does hash all these bytes anyway. +#if 1 +fprintf(stderr, PySSL_RAND_atfork_child() seeds %i bytes in %i\n, +(int)sizeof(seed), seed.pid); +#endif This should be removed from the final patch ;-) The patch is specific to pthread. Do we need something similar on Windows. Windows has no fork, but I don't know if OpenSSL CPRNG state can be inherited somehow? Does Python support other platforms (other than pthread or Windows)? Instead of using pthread_atfork(), we can add an hook in the Python binding of OpenSSL checking the pid. I don't know which functions should be modified. ssl.RAND_bytes() is probably not enough :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18747 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17810] Implement PEP 3154 (pickle protocol 4)
Nick Coghlan added the comment: Potentially relevant to this: we hope to have PEP 451 done for 3.4, which adds a __spec__ attribute to module objects, and will also tweak runpy to ensure -m registers __main__ under it's real name as well. If pickle uses __spec__.name in preference to __name__ when __spec__ is defined, then objects defined in __main__ modules run via -m should start being pickled correctly. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17810 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work
STINNER Victor added the comment: 2013/8/17 Maries Ionel Cristian rep...@bugs.python.org: I don't think it's that obscure ... uwsgi has this issue https://www.google.com/search?q=libgcc_s.so.1+must+be+installed+for+pthread_cancel+to+work+uwsgi+site:lists.unbit.it- they cause it probably different but the point is that it's not obscure. The error message is maybe the same, the reason is completly different: http://lists.unbit.it/pipermail/uwsgi/2013-July/006213.html IT WAS A limit-as issue The root cause is an arbitrary limit on the size of the virtual memory. Here the bug is that a thread B closes a file descriptor opened in a thread B by the glibc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18771] Reduce the cost of hash collisions for set objects
STINNER Victor added the comment: Do you expect visible difference on a microbenchmark? Do you have benchmarks showing the speedup and showing that many collisions are no too much slower? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18771 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work
Maries Ionel Cristian added the comment: Well anyway, is there any way to preload libgcc ? Because in python2.x it wasn't loaded at runtime. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com