[issue15281] pyvenv --symlinks option is a no-op?
Vinay Sajip added the comment: In this case couldn't symlinks be automatically used on Windows Vista or newer? It seems simpler if the default behaviour is the same on all Windows flavours - you can specify --symlinks if you're on Windows Vista or later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15301] os.chown: OverflowError: Python int too large to convert to C long
Larry Hastings added the comment: Okay, I got inspired and (in the words of Barry Warsaw) JFDI. Attached is my revised patch. I took Serhiy's patch and reworked it quite a bit: * I think it's now easier to follow. In particular: * The most common case (no overflow) is now first. In Serhiy's patch the most common case is buried in the middle of the second if. * I removed some extraneous tests. * I changed the error messages to call the values uid and gid, to match the names of the parameters. * I noticed that _fd_converter had the same bad-idea PyFloat_Check, so I changed it to use PyNumber_Index instead. In the process I also noticed that Serhiy's approach had a resource leak: it never decref'd the result of PyNumber_Index() when successful. To make sure I duplicated Serhiy's semantics, I had a test harness that ran both his and mine and ensured they returned the same thing (or both threw an error). Obviously I removed all that before cutting the patch. -- Added file: http://bugs.python.org/file29860/larry.chown.unsigned.uid.gid.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17731] test_iter_importers intermittent failure in test_pkgutil
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15301] os.chown: OverflowError: Python int too large to convert to C long
Mark Dickinson added the comment: To answer Serhiy's question: I'd say that this level of cleanup is probably only appropriate for 3.4. Larry? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17713] test_logging fails in test_compute_rollover_weekly_attime
Roundup Robot added the comment: New changeset 193e7ad92900 by Vinay Sajip in branch 'default': Issue #17713: Added failure diagnostics to test. http://hg.python.org/cpython/rev/193e7ad92900 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17713 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Vinay Sajip added the comment: This looks to me as if it will need a patch in distutils. Unlike virtualenv, which contains a patched copy of distutils (and hence allows having a .cfg adjacent to it), pyvenv does not create patched modules in the venv. It does not make sense to change this behaviour. The correct solution would appear to be for distutils to ignore certain configuration options (install-lib, but also equivalent options for headers and scripts) when running in a venv. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15301] os.chown: OverflowError: Python int too large to convert to C long
Larry Hastings added the comment: See my comment above (dated 2013-04-14 04:30). I'm passing the buck. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trash can mechanism segfault during interpreter finalization in Python 2.7.4
Marc-Andre Lemburg added the comment: Checked the patch: it fixes the problem. Thanks. Will this go into Python 2.7.5 ? I'm asking because we need to issue a patch level release of egenix-mx-base and if Python 2.7.5 will fix the problem, we'll just add the work-around for Python 2.7.4. Regarding a better cleanup logic: This is available in Python 3.x with the new module init logic and we'll use it there. PS: The approach with doing the cleanup at module startup time won't work, because the still existing objects will reference parts of the already cleaned up interpreter instance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17707] Multiprocessing queue get method does not block for short timeouts
Giampaolo Rodola' added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Also, rathr than using an harcoded delta, we could maybe use a fudger factor, like what's done for threading lock tests. Not sure what you refer to here. Feel free to submit a patch if you want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17731] test_iter_importers intermittent failure in test_pkgutil
Nick Coghlan added the comment: spam is a fairly generic name, so I'm guessing something else is leaving a spam module around in sys.modules - when I run the tests with the order given in RDM's original report, I get the same error. I also get a failure in test_builtin though, which is a little weird. With the attached file, test_builtin fails (so one of the uncommented tests appears to be interfering with that), while test_pkgutil passes (suggesting that the problem there is one the tests flagged with #TEMP# -- Added file: http://bugs.python.org/file29861/test_order_issue17731.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17708] sys.flags.hash_randomization doesn't return correct value
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: That's along the lines of what I've been thinking as I dig into this. I'd love to take a stab at a patch for this if no one else has done so already. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17734] Failure when running test_builtin after test_genexps
New submission from Nick Coghlan: I'm getting a failure in test_builtin when running the following: ./python -m test -w test_genexps test_builtin == FAIL: test_input_tty_non_ascii (test.test_builtin.BuiltinTest) -- Traceback (most recent call last): File /home/ncoghlan/devel/py3k/Lib/test/test_builtin.py, line 1176, in test_input_tty_non_ascii self.check_input_tty(prompté, bquux\xe9, utf-8) File /home/ncoghlan/devel/py3k/Lib/test/test_builtin.py, line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + == FAIL: test_input_tty_non_ascii_unicode_errors (test.test_builtin.BuiltinTest) -- Traceback (most recent call last): File /home/ncoghlan/devel/py3k/Lib/test/test_builtin.py, line 1180, in test_input_tty_non_ascii_unicode_errors self.check_input_tty(prompté, bquux\xe9, ascii) File /home/ncoghlan/devel/py3k/Lib/test/test_builtin.py, line 1167, in check_input_tty self.assertEqual(input_result, expected) AssertionError: 'quux' != 'quux\udce9' - quux + quux\udce9 ? + The problem persists after a make clean and rebuild. -- messages: 186979 nosy: haypo, ncoghlan priority: normal severity: normal stage: test needed status: open title: Failure when running test_builtin after test_genexps type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17731] test_iter_importers intermittent failure in test_pkgutil
Nick Coghlan added the comment: Created #17734 for the weird interference between test_genexps and test_builtin -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17636] Modify IMPORT_FROM to fallback on sys.modules
Changes by Pascal Chambon chambon.pas...@gmail.com: -- nosy: +Pascal.Chambon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17353] Plistlib outputs empty data tags when deeply nested
Ronald Oussoren added the comment: I agree that plistlib shouldn't raise an exception for data that can represented as a valid plist file. I've checked that the Cocoa class for generating plist files will happily create a plist file when the data is nested 100 levels deep. In that case NSData values generate lines of 12 characters long. An unrelated issue: PlistWriter.writeValue should treat bytes instances the same as Data instances in Python 3. That would be a (small) feature enhencement, and hence can only be done for Python 3.4. -- Added file: http://bugs.python.org/file29862/deeply-nested-plist.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17353] Plistlib outputs empty data tags when deeply nested
Ronald Oussoren added the comment: The attach patch should fix the issue (but there needs to be a unittest as well). -- Added file: http://bugs.python.org/file29863/issue-17353.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17735] inspect.findsource throws IndexError
New submission from Kyle Simpson: Here is one way to reproduce this bug: 1. Create a module file (bug.py in this example) def func(): pass 2. Run Python import bug help(bug) 3. Edit bug.py def func(): pass def newfunc(): pass 4. Use the same Python interpreter as in step 2 reload(bug) help(bug) 5. Observe traceback [..snip..] File C:\Python27\lib\inspect.py, line 578, in findsource if pat.match(lines[lnum]): break IndexError: list index out of range Note: A related but different issue is http://bugs.python.org/issue1218234. -- components: Library (Lib) messages: 186983 nosy: Kyle.Simpson priority: normal severity: normal status: open title: inspect.findsource throws IndexError type: behavior versions: Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17731] test_iter_importers intermittent failure in test_pkgutil
Roundup Robot added the comment: New changeset 73c79022977b by Nick Coghlan in branch '3.3': Close #17731: Clean up properly in test_import http://hg.python.org/cpython/rev/73c79022977b New changeset 5d4001e32a31 by Nick Coghlan in branch 'default': Merge fix for #17731 from 3.3 http://hg.python.org/cpython/rev/5d4001e32a31 -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords
New submission from Jonas Wagner: The attached patch corrects a wrong method comment in _elementtree.c. It happened to be at Line 316, and was thus discovered by random sampling. [1] [1] http://www-cs-faculty.stanford.edu/~uno/316.html -- components: Extension Modules files: elementtree_get_attrib_from_keywords.patch keywords: patch messages: 186985 nosy: Sjlver priority: normal severity: normal status: open title: Misleading method comment in _elementtree.c : get_attrib_from_keywords type: enhancement versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29864/elementtree_get_attrib_from_keywords.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case
Pascal Chambon added the comment: (sorry for the long post, but it's a complex issue I guess) I forgot to precise that I have this behaviour with the latest python2.7, as well as python3.3 (I guess other versions behave the same). I agree that having side effects in script imports looks dangerous, but on the other hand it's incredibly handy to use the script behaviour of module so that each one initializes/checks himself, rather than relying on the calling of initialization methods from somewhere else (many web frameworks don't even plan such setup scripts actually, I have a django ticket running on that subject just at the moment). Loads of python modules perform such inits (registration of atexit handlers, setup of loggers, of working/temp directories, or even modifying process-level settings.), so even though we're currently adding protection via exception handlers (and checking the idempotency of our imports, crucial points!), I could not guarantee that none of the modules/packages we use won't have such temporary failures (failures that can't be fixed by the web server, because module trees become forever unimportable). With the video and the importlib code, I'm beginning to have a better understanding on the from..import, and I noticed that actually both import mypkg.module_a and from mypkg import module_a get broken when mypkg raised an exception after successfully loading module_a. It's just that the second form breaks loudly, whereas the first one remains silently corrupted (i.e the variable mypkg.module_a does NOT exist in both cases, so theer are pending AttributeErrors anyway). All comes from the fact that - to talk with importlib/_bootstrap.py terms - _gcd_import() assumes everything is loaded and bound when a chain of modules (eg. mypkg.module_a) is in sys.modules, whereas intermediary bindings (setattr(mypkg, module_a, module_a)) might have been lost due to an import failure (and the removal of the mypkg module). Hum I wonder, could we just recheck all bindings inside that _gcd_import() ? I guess there would be annoying corner cases with circular imports, i.e we could end up creating these bindings whereas they are just pending to be done in parent frames... Issue 17636 might provide a workaround for some cases, but it doesn't fix the root problem of the rolled back import (eg. here the absence of binding between mypkg and module_a, whatever the import form that was used). Imagine a tree mypkg/mypkg2/module.py, if module.py gets well loaded but mypkg and mypkg2 fail, then later, somewhere else in the code, it seems an import mypkg.mypkg2.module will SUCCEED even though the module tree is broken, and AttributeErrors are pending. I guess Nick was right (and me wrong), the cleanest solution seems to enforce an invariant saying that a submodule can NOT fully be in sys.modules if his parent is not either loaded or in the process of loading it (thus if a binding between parent and child is missing, we're simply in the case of circular dependencies). Said another way, the import system should delete all children modules from sys.modules when aborting the import of a parent package. What do you think about it ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17737] test_gdb fails on armv7hl
New submission from Bohuslav Slavek Kabrda: Hi, it seems that test_gdb fails on armv7hl on Fedora 19 and 20 [1] (I'm also tracking my notes of the bug there). Basically, the problem seems to come down to PyObjectPtr.subclass_from_type (file python-gdb.py) returning different values for members of the stack trace (compared to successful builds - see [3] for x86_64 successful build and [4] for armv7hl failed build). The two failed tests fail with: == FAIL: test_up_at_top (test.test_gdb.StackNavigationTests) Verify handling of py-up at the top of the stack -- Traceback (most recent call last): File /builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py, line 678, in test_up_at_top cmds_after_breakpoint=['py-up'] * 4) File /builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py, line 213, in get_stack_trace self.assertEqual(err, '') AssertionError: Python Exception class '__main__.NullPyObjectPtr' __main__.PyFrameObjectPtr [truncated]... != '' - Python Exception class '__main__.NullPyObjectPtr' __main__.PyFrameObjectPtr object at 0x23a6db0: - Error occurred in Python command: __main__.PyFrameObjectPtr object at 0x23a6db0 == FAIL: test_threads (test.test_gdb.PyBtTests) Verify that py-bt indicates threads that are waiting for the GIL -- Traceback (most recent call last): File /builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py, line 759, in test_threads cmds_after_breakpoint=['thread apply all py-bt']) File /builddir/build/BUILD/Python-3.3.1/Lib/test/test_gdb.py, line 213, in get_stack_trace self.assertEqual(err, '') AssertionError: Python Exception class 'gdb.error' There is no member named co_name.: \nError [truncated]... != '' - Python Exception class 'gdb.error' There is no member named co_name.: - Error occurred in Python command: There is no member named co_name. -- The whole build log is accessible at [2]. Any clues would be appreciated. Thanks. [1] https://bugzilla.redhat.com/show_bug.cgi?id=951802 [2] http://arm.koji.fedoraproject.org//work/tasks/2722/1712722/build.log [3] https://gist.github.com/bkabrda/5387906 [4] https://gist.github.com/bkabrda/5387908 -- components: Tests messages: 186987 nosy: bkabrda priority: normal severity: normal status: open title: test_gdb fails on armv7hl versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17708] sys.flags.hash_randomization doesn't return correct value
Changes by Benjamin Peterson benja...@python.org: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17708 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17530] pprint could use line continuation for long bytes literals
Pam McA'Nulty added the comment: Here's a patch. I needed to handle the fact that the repr of a single byte can be 1, 2 or 4 characters long and did not want to wrap in the middle of a byte representation. Note also that bytes literals require a continuation character. In the pathological case where the wrap size is smaller than the representation of a single byte, I chose to always print at least one byte per line. As an aside, I also replaced the str wrapping code's calls to len with the cached _len used in the rest of pprint.py -- keywords: +patch nosy: +Pam.McANulty Added file: http://bugs.python.org/file29865/bytes_pprint.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17530] pprint could use line continuation for long bytes literals
Pam McA'Nulty added the comment: oops, forgot to add some samples: pprint.pprint(b\n\n\n\n\n\n, width=5) b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n'\ b'\n' pprint.pprint({a: b\x00\xff * 20}) {'a': b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00'\ b'\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff'\ b'\x00\xff\x00\xff\x00\xff'} pprint.pprint({a: b\x00\xff * 20}, width=20) {'a': b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'\ b'\x00\xff'} pprint.pprint(b'a\x00\n\\x00', width=20) b'a\x00\n\\x00' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17728] format() default precisions undocumented
Roundup Robot added the comment: New changeset 725d6347ac7e by Eric V. Smith in branch '2.7': Issue #17728: Specify default precision for float.format for presentation types e, f, and g. http://hg.python.org/cpython/rev/725d6347ac7e New changeset ad481c95a1d4 by Eric V. Smith in branch '3.3': Issue #17728: Specify default precision for float.format for presentation types e, f, and g. http://hg.python.org/cpython/rev/ad481c95a1d4 New changeset 413c0b0a105f by Eric V. Smith in branch 'default': Issue #17728: Merge with 3.3. http://hg.python.org/cpython/rev/413c0b0a105f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17728] format() default precisions undocumented
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17737] test_gdb fails on armv7hl
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17737 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17735] inspect.findsource throws IndexError
R. David Murray added the comment: Can you explain what makes this one a different problem? It looks like the same one to me. Or is your intent in this issue just to avoid the exception? In that case it seems to me it would better to fix issue 1218234 if we can. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17735 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17738] Unnecessary if in SHA1_copy
New submission from Jonas Wagner: I'm puzzled by the following code in SHA1_copy (at python/Modules/sha1module.c:320 if (Py_TYPE(self) == SHA1type) { if ( (newobj = newSHA1object())==NULL) return NULL; } else { if ( (newobj = newSHA1object())==NULL) return NULL; } Both branches of the if-statement are identical; it would seem that the if is unnecessary. Its condition does not have any side effect. Attached is a patch that simplifies the code. This code happened to be at Line 316, and was thus discovered by random sampling. [1] [1] http://www-cs-faculty.stanford.edu/~uno/316.html -- components: Extension Modules files: sha1copy.patch keywords: patch messages: 186992 nosy: Sjlver priority: normal severity: normal status: open title: Unnecessary if in SHA1_copy versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file29866/sha1copy.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17530] pprint could use line continuation for long bytes literals
Antoine Pitrou added the comment: I don't understand why you say that bytes literals require a continuation character: (bx ... by) b'xy' [bx ... by] [b'xy'] I think the len caching is a misoptimization, it's useless here (most CPU time will be sent creating and wrapping the representation). Also perhaps it would be nice to refactor things a bit, since we have both _str_parts and _bytes_parts used in exactly the same way (but that can also be done later). As for the doc, the example would probably deserve to be a bit more meaningful :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8876] distutils should not assume that hardlinks will work
sorin added the comment: Can we have this merged, it prevents us form using distutil, especially in a continuous integration environment where you do not have control over the build server. See: https://drone.io/github.com/pycontribs/tendo/1 -- nosy: +sorin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17530] pprint could use line continuation for long bytes literals
Pam McA'Nulty added the comment: - eval expects bytes to have a continuation character and test_str_wrap did an eval check so I figured test_bytes_wrap should as well: # repr some bytes: b = b\x00\xff * 5 b b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' r = repr(b) r b'\\x00\\xff\\x00\\xff\\x00\\xff\\x00\\xff\\x00\\xff' eval(r) b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' # hand-wrap it without the continuation character and it fails to eval (stuck the s = b'\\x00\\xff\\x00\\xff\\x00'\nb'\\xff\\x00\\xff\\x00\\xff' print(s) b'\x00\xff\x00\xff\x00' b'\xff\x00\xff\x00\xff' eval(s) Traceback (most recent call last): File stdin, line 1, in module File string, line 2 b'\xff\x00\xff\x00\xff' ^ SyntaxError: invalid syntax # stick the continuation character in, and it evals properly s = s.replace(\n, \\\n) print(s) b'\x00\xff\x00\xff\x00'\ b'\xff\x00\xff\x00\xff' eval(s) b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff' - I agree about the len v _len, but figured this wasn't all that foolish a consistency issue (i.e. the rest of pprint.py used _len) - I also wanted to refactor _str_parts and _bytes_parts, but couldn't decide on the best course. I was favoring a helper function to run the common loop since the two if issubclass... calls were so different and parameterizing the differences felt like it would obfuscate things too much. - I also agree on the doc. I figured I'd see if there weren't any hidden surprises with the patch before I worked on better doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8876] distutils should not assume that hardlinks will work
Éric Araujo added the comment: I’ll get this in the next bugfix releases. -- keywords: -needs review nosy: +benjamin.peterson, georg.brandl, larry priority: normal - release blocker versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17707] Multiprocessing queue get method does not block for short timeouts
Charles-François Natali added the comment: Maybe I'm misinterpreting what you wrote but the test fails before the patch and succeeds after it so what's the point in adding multiple tests with different timeouts? Well, the test you added tests explicitely for a value 1s because this specific bug was due to a rounding error, but I think it could be interesting to check a couple more values, within a reasonable range (not too long). It's just a matter of calling it in a loop, but if you don't deem it necessary, that's fine with me. Not sure what you refer to here. Feel free to submit a patch if you want. See e.g. : http://hg.python.org/cpython/file/413c0b0a105f/Lib/test/lock_tests.py#l65 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17707 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17530] pprint could use line continuation for long bytes literals
Antoine Pitrou added the comment: Well, but eval works if you put parentheses as required by the grammar: s = (b'xy'\nb'za') eval(s) b'xyza' Yes, _str_parts and _bytes_parts should probably remain separate. It's the higher-level routine that would deserve sharing. Also, perhaps the other wrapping routines (for dict, list...) could get the same treatment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17739] ssl.SSLSocket.getpeercert does not return client certificate
New submission from David D Lowe: The documentation for ssl.SSLSocket.getpeercert states: If the binary_form parameter is True, and a certificate was provided, this method returns the DER-encoded form of the entire certificate as a sequence of bytes, or None if the peer did not provide a certificate. This return value is independent of validation; if validation was required (CERT_OPTIONAL or CERT_REQUIRED), it will have been validated, but if CERT_NONE was used to establish the connection, the certificate, if present, will not have been validated. However, in the case that validation is not required, getpeercert does not return a certificate, even when binary_form is set to True. -- components: Library (Lib) files: test.tar.gz messages: 186999 nosy: Flimm priority: normal severity: normal status: open title: ssl.SSLSocket.getpeercert does not return client certificate type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file29867/test.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17673] add `copy_from` argument to temporaryfile
Kyle Roberts added the comment: I think `copy_from` should be included for mkstemp as well. It provides similar functionality to TemporaryFile and NamedTemporaryFile, but it doesn't delete the temp file on close as the other two do by default. Thoughts? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17734] Failure when running test_builtin after test_genexps
Ezio Melotti added the comment: Isn't this the same as #13886? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17734 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13510] Clarify that readlines() is not needed to iterate over a file
Dan Riti added the comment: Agreed Ezio, I've updated the patch to include the change to Doc/library/io.rst:readlines. -- Added file: http://bugs.python.org/file29868/demote-readlines-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Zachary Ware added the comment: Here's another new version of the patch, addressing Ezio's review comments and a few things I found after giving operator.py a closer look myself. Things changed in operator.py in this version: - all ``__func__ = func`` assignments are moved to the end, after importing * from _operator. With the assignments after each func, __func__ was still the Python version after importing from _operator. I suspect this means that _operator.c could be changed to not mess with creating each __func__ and just let operator.py do it, but not being a native C speaker, I don't know how to do it. Also, there is an added test case to test whether __func__ is func. It passes with the rest of the patch, but would fail on current operator.c; it seems that operator.c actually creates separate __func__ and func functions (that do the same thing). - If importing from _operator succeeds, import __doc__ from _operator as well. The Python implementation has an extra note at the end of __doc__ advertising that it is a Python implementation. Also, after submitting this patch, I'm going to try to clean up the files list on this issue a bit. I'll clear the nosy list while I do so to avoid spamming everybody with messages about it. (At least, I assume I can do so, I haven't tried this before :). If I can't clear the nosy list, I won't bother with cleaning up the files, again to avoid spamming) -- Added file: http://bugs.python.org/file29869/py_operator.v12.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: -Arfrever, brett.cannon, eric.araujo, ezio.melotti, jcea, meador.inge, pitrou, serhiy.storchaka, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28327/operator.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28328/py_operator.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28374/py_operator.v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28388/py_operator.v5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28383/py_operator.v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28522/py_operator.v7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28524/py_operator.v8.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file28532/py_operator.v9.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +Arfrever, brett.cannon, eric.araujo, ezio.melotti, jcea, meador.inge, pitrou, serhiy.storchaka, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Here is a patch that seems to fix the problem. It simply short-circuits distutils options that change directories. This is my first python patch ever, so I'm eager for comments. Is this the right approach? -- keywords: +patch Added file: http://bugs.python.org/file29870/distutilsvenv.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13510] Clarify that readlines() is not needed to iterate over a file
Roundup Robot added the comment: New changeset 1e8be05a4039 by Ezio Melotti in branch '3.3': #13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti. http://hg.python.org/cpython/rev/1e8be05a4039 New changeset 7f4325dc4256 by Ezio Melotti in branch 'default': #13510: merge with 3.3. http://hg.python.org/cpython/rev/7f4325dc4256 New changeset 6a4746b0afaf by Ezio Melotti in branch '2.7': #13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti. http://hg.python.org/cpython/rev/6a4746b0afaf -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13510] Clarify that readlines() is not needed to iterate over a file
Ezio Melotti added the comment: Fixed, thanks for the patch! I also realized I missed Terry suggestion about file.readlines() == list(file), so I added that too. -- assignee: docs@python - ezio.melotti resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13510 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Zachary Ware added the comment: A change that I mentioned in a Rietveld comment on v10, but not in my last message: __all__ in operator.py no longer includes all of the __func__s, as currently doing from operator import * does not import all of the __func__s. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17689] Fix test discovery for test_tarfile.py
Zachary Ware added the comment: That is indeed simpler than what I wrote, and it does work as expected. But, is it preferable to do it this way, or with Ezio's suggested method (``skip_unless_gzip = unittest.skipUnless(gzip, gzip not available)``, and for bz2 and lzma)? I can see merits to both; mine only requires a docstring change if there's a new compression module sometime in the future, but Ezio's is simpler and shorter. Here's another thought; would it be more useful to have a general version of this skip decorator in test.support, something along the lines of: def skipWithoutModule(name): Skip if the named module is not available. try: module = importlib.import_module(name) except ImportError: module = None return unittest.skipUnless(module, {} module not available.format(name)) And, actually, looking through test.support to see if there was anything like this already, I found requires_bz2 and requires_lzma that already exist; should I just add a requires_gzip to test.support and use those three in test_tarfile? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket
New submission from Zachary Ware: In Doc/library/socket.rst, :func:`socket` links to #module-socket, not #socket.socket. The attached patch changes all occurances of :func:`socket` to :func:`~socket.socket`, except the first one which keeps the explicit module name (no ~). -- assignee: docs@python components: Documentation files: socket_func_link.diff keywords: patch messages: 187009 nosy: docs@python, zach.ware priority: normal severity: normal status: open title: :func:`socket` in socket.rst links to socket module, not socket.socket type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file29871/socket_func_link.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file29872/socket_func_link_2.7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: On second thought, there is probably no good reason to ignore the build-* settings. Here is an updated patch. -- Added file: http://bugs.python.org/file29873/distutilsvenv.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket
Ezio Melotti added the comment: I think :func:`.socket` should work too. -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Vinay Sajip added the comment: On second thought, there is probably no good reason to ignore the build-* settings. I was just about to mention this. I'm not an expert on distutils internals and whether this is the best way to accomplish what's needed, but the approach seems reasonable to me. Why the empty list and the extend, though? Why not something like the following? if sys.prefix == sys.base_prefix: # not in venv ignore_options = [] else: # in venv ignore_options = ['install-base', ...] My other comments on the patch are generic, i.e. you need to look at the tests and docs, too. Anyway, thanks for the effort you've spent to come up with a patch. Can I suggest that you sign a PSF contributor form to license your work to the PSF? http://www.python.org/psf/contrib/contrib-form/ -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17740] :func:`socket` in socket.rst links to socket module, not socket.socket
Zachary Ware added the comment: So it does. Would you like a new pair of patches? It is just a search-and-replace from :func:`socket` to :func:`.socket`. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17740 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17706] Segfault in PyErr_SetObject
Orion Poplawski added the comment: Despite numpy not calling the library properly, it stills seems to me that python should not segfault due to not handling a null pointer. But thanks for the help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17706 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4
Changes by Antoine Pitrou pit...@free.fr: -- title: Trash can mechanism segfault during interpreter finalization in Python 2.7.4 - Trashcan mechanism segfault during interpreter finalization in Python 2.7.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4
Changes by Antoine Pitrou pit...@free.fr: -- stage: - commit review type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17710] SystemError in cPickle for incorrect input
Antoine Pitrou added the comment: I was targeting head, not the release branches. Perhaps, but I don't see the point of choosing a different fix in the default branch than in the bugfix branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4
Roundup Robot added the comment: New changeset e814fbd470bf by Antoine Pitrou in branch '2.7': Issue #17703: Fix a regression where an illegal use of Py_DECREF() after interpreter finalization can cause a crash. http://hg.python.org/cpython/rev/e814fbd470bf -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4
Antoine Pitrou added the comment: Committed! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: My thought was that perhaps there will be other circumstances where we may want to ignore options in the future. The idea was that by providing an ignore_options list that can be extended, multiple conditions with different sets of options can be stacked together easily. I was thinking a set might actually be an even better choice than a list. Would love feedback on this approach. Am I over-designing for an unlikely case? I'm happy to use Vinay's suggestion if we don't think it is worth it to consider possible future conflicts with distutils.cfg options. If there is any reason a set would be worse to use, let me know, otherwise my next patch will use a set rather than a list. Another question: should I be checking which config file these come from, or ignoring all occurrences of these options? Seems like setup.cfg at the very least shouldn't have any restrictions. Possibly ~/.pydistutils.cfg too. I'll review tests to see if this necessitates any changes, add a new test that covers this, and I'll make a note in the docs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15301] os.chown: OverflowError: Python int too large to convert to C long
Serhiy Storchaka added the comment: * The most common case (no overflow) is now first. In Serhiy's patch the most common case is buried in the middle of the second if. It's because my implementation is a simplified version of more complicated patch for issue2005, which supports signed uid_t and sizeof(uid_t) sizeof(long). And this support can be added if necessary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4
Marc-Andre Lemburg added the comment: On 15.04.2013 21:21, Antoine Pitrou wrote: Committed! Cool, thanks for the quick turnaround. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17703 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Éric Araujo added the comment: I would ignore options from all config files, and do the simplest thing (i.e. not add the ignore_options attribute). -- assignee: vinay.sajip - eric.araujo components: +Distutils -Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17732 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17710] SystemError in cPickle for incorrect input
Roundup Robot added the comment: New changeset 527b7f88b53c by Antoine Pitrou in branch '2.7': Issue #17710: Fix cPickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/527b7f88b53c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Serhiy Storchaka added the comment: I think Antoine is more appropriate for committing this patch. I waited so long with this because I do not dare to take responsibility for themselves (it's almost like adding a new module). -- assignee: serhiy.storchaka - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17728] format() default precisions undocumented
Georg Brandl added the comment: Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: serhiy.storchaka - alexandre.vassalotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case
Brett Cannon added the comment: Have to think about the whole rollback situation in terms of a failure to import a parent. Whenever you want to change the semantics of import you will break someone's code, it's just a question of how wide the breakage would be and how much of an improvement it will lead to. Probably cheapest way to tell is to implement it and see if the stdlib's test suite still passes. In terms of implementation, I guess you would need to check if the import failed on a package (if possible), and then do a prefix search through all the keys in sys.modules to see if any children made it through, and then drop them and mention their import failure as well (probably through some exception chaining). It obviously makes failed exceptions more expensive, but I don't think people treat them as a cheap form of EAFP like other uses of exceptions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17710] SystemError in cPickle for incorrect input
Roundup Robot added the comment: New changeset 4e412cbaaf96 by Antoine Pitrou in branch '3.3': Issue #17710: Fix pickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/4e412cbaaf96 New changeset 5a16d2992112 by Antoine Pitrou in branch 'default': Issue #17710: Fix pickle raising a SystemError on bogus input. http://hg.python.org/cpython/rev/5a16d2992112 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17710] SystemError in cPickle for incorrect input
Antoine Pitrou added the comment: I've committed the patches. Feel free to improve the default branch if you like. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17671] io.BufferedRWPair can use uninitialized members
Antoine Pitrou added the comment: About the test: +self.assertRaises(Exception, pair.read) +self.assertRaises(Exception, pair.write) First, you should check for the actual RuntimeError. Second, you need to pass the right arguments for these method calls: for example read(1) and write(bx). Otherwise the Exception could correspond to something else. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
New submission from Antoine Pitrou: iterparse() is a blocking operation. It is not really suitable for event-driven applications (e.g. non-blocking I/O). Here is a patch adding a IncrementalParser class. -- components: Library (Lib) files: etree_incparser.patch keywords: patch messages: 187029 nosy: eli.bendersky, flox, pitrou priority: normal severity: normal stage: patch review status: open title: event-driven XML parser type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file29874/etree_incparser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Antoine Pitrou added the comment: Note that basing iterparse() on IncrementalParser and removing the API discrepancy between the Python and C modules helps make the etree code smaller. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17670] Improve str.expandtabs() doc
Ned Deily added the comment: Thanks for the suggested. Here's a revised wording and a slightly more legible example: Return a copy of the string where all tab characters are replaced by zero or more spaces, depending on the current tab column and the given tab size. Starting at the first character of the string, the tab column is set to zero. Whenever a tab character (``\t``) is encountered, space characters are inserted as needed until the next tab position is reached and the tab column is set to that tab position; the tab character itself is not copied. Whenever a newline character (``\n`` or ``\r``) is encountered, it is copied and the tab column is reset to zero. Any other character is copied unchanged and the tab column is incremented by one regardless of how it may be represented when printed. If *tabsize* is not given, a tab size of 8 characters is assumed. '012\t4\t89'.expandtabs(4) '012 4 89' -- Added file: http://bugs.python.org/file29875/issue17670_doc_rev_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17739] ssl.SSLSocket.getpeercert does not return client certificate
Antoine Pitrou added the comment: Thanks for reporting this. This is a documentation issue. As stated in the OpenSSL docs: Due to the protocol definition, a TLS/SSL server will always send a certificate, if present. A client will only send a certificate when explicitly requested to do so by the server (see SSL_CTX_set_verify(3)). (Note that you can use CERT_OPTIONAL on the server. This will let through clients without a certificate, but will reject clients with an invalid certificate.) -- assignee: - docs@python components: +Documentation nosy: +docs@python, pitrou stage: - needs patch versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17739 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible
Zachary Ware added the comment: I caught a small oversight. This new patch changes the example in README.txt to ``make html PYTHON2=C:\Python27\python.exe`` (PYTHON-PYTHON2). Also, I added a bit of backward compatibility to make.bat; %PYTHON2% will default to %PYTHON% if it is set. Otherwise, %PYTHON% is ignored and unchanged. -- Added file: http://bugs.python.org/file29876/win_doc_make.v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17386 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17738] Unnecessary if in SHA1_copy
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gregory.p.smith stage: - patch review versions: +Python 2.7 -Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15281] pyvenv --symlinks option is a no-op?
Piotr Dobrogost added the comment: It's simpler but is it better this way? I doubt. I think we should take advantage of symlinks whenever we can and only fallback to copying if they are not available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17742] Add _PyBytesWriter API
New submission from STINNER Victor: In Python 3.3, I added _PyUnicodeWriter API to factorize code handling a Unicode buffer, just the code to allocate memory and resize the buffer if needed. I propose to do the same with a new _PyBytesWriter API. The API is very similar to _PyUnicodeWriter: * _PyBytesWriter_Init(writer) * _PyBytesWriter_Prepare(writer, count) * _PyBytesWriter_WriteStr(writer, bytes_obj) * _PyBytesWriter_WriteChar(writer, ch) * _PyBytesWriter_Finish(writer) * _PyBytesWriter_Dealloc(writer) The patch changes ASCII, Latin1, UTF-8 and charmap encoders to use _PyBytesWriter API. A second patch changes CJK encoders. I did not run a benchmark yet. I wrote a patch to factorize the code, not the make the code faster. Notes on performances: * I peek the small buffer allocated on the stack idea from UTF-8 encoder, but the smaller buffer is always 500 bytes (instead of a size depending on the Unicode maximum character of the input Unicode string) * _PyBytesWriter overallocates by 25% (when overallocation is enabled), whereas charmap encoders doubles the buffer: /* exponentially overallocate to minimize reallocations */ if (requiredsize 2*outsize) requiredsize = 2*outsize; * I didn't check if the allocation size is the same with the patch. min_size and overallocate attributes should be set correctly to not make the code slower. * The code writing a single into a _PyUnicodeWriter buffer is inlined in unicodeobject.c. _PyBytesWriter API does not provide inlined function for the same purpose. -- files: bytes_writer.patch keywords: patch messages: 187035 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add _PyBytesWriter API versions: Python 3.4 Added file: http://bugs.python.org/file29877/bytes_writer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17742] Add _PyBytesWriter API
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file29878/bytes_writer_cjkcodecs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17742] Add _PyBytesWriter API
STINNER Victor added the comment: See also #17694. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17743] Use extended syntax of `set` command in activate.bat/deactivate.bat batch files.
New submission from Piotr Dobrogost: This makes it possible to handle paths/usernames with special characters - see https://github.com/pypa/virtualenv/pull/352 -- components: Library (Lib) messages: 187037 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Use extended syntax of `set` command in activate.bat/deactivate.bat batch files. type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17743 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17744] Unset VIRTUAL_ENV environment variable in deactivate.bat
New submission from Piotr Dobrogost: activate.bat sets VIRTUAL_ENV environment variable. This variable is treated as a sign that virtualenv is active. For this reason deactivate.bat should unset this variable. See https://github.com/pypa/virtualenv/pull/364 -- components: Library (Lib) messages: 187038 nosy: piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Unset VIRTUAL_ENV environment variable in deactivate.bat type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17744 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17012] Differences between /usr/bin/which and shutil.which()
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17012] Differences between /usr/bin/which and shutil.which()
Barry A. Warsaw added the comment: From a documentation standpoint, path='' is not the same as When no path is specified, so indeed it should return None when path=''. Serhiy's patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17012] Differences between /usr/bin/which and shutil.which()
Changes by Barry A. Warsaw ba...@python.org: -- assignee: - barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17745] packaging no longer planned to be included
New submission from Tshepang Lekhonkhobe: attached patch reflects current reality (me assuming that PEPs are living documents) -- assignee: docs@python components: Documentation files: diff messages: 187040 nosy: docs@python, tshepang priority: normal severity: normal status: open title: packaging no longer planned to be included Added file: http://bugs.python.org/file29879/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17670] Improve str.expandtabs() doc
Eli Bendersky added the comment: It's better, although the distinction between tab column and tab position is not entirely clear. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17741] event-driven XML parser
Eli Bendersky added the comment: Thanks Antoine. This looks interesting - I'm somewhat swamped ATM but will try to review the patch in the next few days. Incidentally, since it is a new feature would it be worthwhile to discuss it on python-ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17741 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16694] Add pure Python operator module
Raymond Hettinger added the comment: I would like to spend some time with this before it goes forward (especially the attrgetter, itemgetter, methodgetter group). Right now, it looks like a nice effort but I don't see how it makes Python any better for adding it. The odds are that this code will add bloat but not benefit any user (it won't get called at all). -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com