[issue13849] Add tests for NUL checking in certain strs
Martin v. Löwis mar...@v.loewis.de added the comment: If other VMs need this test for some reason, they can easily add a test case themselves. I'm -1 on adding test cases to bug fix releases just for completeness. A lacking test is not a bug, and hence must not be added to a bug fix release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 839fa289e226 by Antoine Pitrou in branch '3.2': Issue #13772: In os.symlink() under Windows, do not try to guess the link http://hg.python.org/cpython/rev/839fa289e226 New changeset a7406565ef1c by Antoine Pitrou in branch 'default': Issue #13772: In os.symlink() under Windows, do not try to guess the link http://hg.python.org/cpython/rev/a7406565ef1c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Antoine Pitrou pit...@free.fr added the comment: Should be fixed now! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13812] multiprocessing package doesn't flush stderr on child exception
Charles-François Natali neolo...@free.fr added the comment: I propose applying the following patch. The test looks good to me (except we don't remove TESTFN explicitely, but I'm not sure it's really necessary). As for the patch, couldn't we put all the file stream flushing in one place? stdout and stderr are already flushed on Unix (which explains why this only happens on Windows: the libc puts non-tty streams in _IOFBF, so this wouldn't work without explicit flushing neither). Lib/multiprocessing/forking.py:Popen.__init__: code = process_obj._bootstrap() sys.stdout.flush() sys.stderr.flush() os._exit(code) Also, there's already a flush() a couple lines above (in _bootstrap): sys.stderr.write(e.args[0] + '\n') sys.stderr.flush() So I'd suggest to just put: sys.stdout.flush() sys.stderr.flush() At the end of _bootstrap, and remove the flushing done by Popen.__init__ on Unix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Antoine Pitrou pit...@free.fr added the comment: Here is a patch for 3.2. importlib doesn't have the issue, so I just added a test. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file24310/imptimestampoverflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13812] multiprocessing package doesn't flush stderr on child exception
Antoine Pitrou pit...@free.fr added the comment: Updated patch sanitizing the various flushes done on exit, as per Charles-François's recommendation. Also removes TESTFN explicitly. -- Added file: http://bugs.python.org/file24311/mpstderrflush2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Xavier Morel xavier.mo...@masklinn.net added the comment: Creating the tables should not be too hard, especially using e.g. org-mode, but: 1. Where should those tables live? The argparse documentation is pretty big and there's no completely obvious place. I would guess table 1. could just replace the list of arguments in http://docs.python.org/py3k/library/argparse.html#the-add-argument-method but things are harder for `action` (as many actions have examples as well, so the listing can't just be replaced) and for `nargs` 2. If the current lists of `argument: role` (in ArgumentParser and add_argument) are not sufficient, why would a table somehow be considering it would *add* visual clutter (table borders, for instance)? Maybe a good alternative would be to build a table style for info fields lists and to use :param: wherever that belongs? Or the doc could be split into a quickstart with just a listing of arguments and a *very simple* example or two, and then the exhaustive documentation, which could even be a separate document? -- nosy: +xmorel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13812] multiprocessing package doesn't flush stderr on child exception
Charles-François Natali neolo...@free.fr added the comment: LGTM. (I just noticed a bug in Rietveld: when one selects expand 10 after, the line right after that marker appears duplicated in the new view). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Nick Coghlan ncogh...@gmail.com added the comment: My specific suggestion is to have a dedicated Quick Reference section before the first example. This section would be aimed at two groups of people: - those wanting a quick overview of the features argparse offers them (This looks complicated, what can it do for me?) - those wanting a reminder of the exact spelling of various items (I know what I want to do, and I know argparse can do it because I've done it before, but how do I tell argparse exactly what I want?) Since the heart of argparse is the ability to map arguments to actions, I'd suggest the quick reference section actually lead with a table of actions that argparse natively supports, along with a final entry pointing to the information on custom actions (i.e. subclasses of argparse.Action). Likely columns for this first table: Action Name, Description, Parameters The Parameters column would span multiple lines, with one parameter and a brief description of the parameter on each line. The second table could then just be a short summary of the various 'nargs' values. Repeating the list of parameters to ArgumentParser in the quick reference section probably isn't necessary, and the short parameter descriptions in the actions table should suffice for add_argument(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13686] Some notes on the docs of multiprocessing
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13686 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so. Precision is not accuracy... -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4966] Improving Lib Doc Sequence Types Section
Nick Coghlan ncogh...@gmail.com added the comment: I realised that the lack of a clear binary/text distinction would make it messy to do the split docs in 2.7, so I made a new branch based on 3.2 instead (link to repo updated accordingly). -- assignee: eric.araujo - ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows
STINNER Victor victor.stin...@haypocalc.com added the comment: GetSystemTimeAsFileTime() represent durations as multiple of 100ns, unfortunately its value is only updated every 15ms or so. Precision is not accuracy... It is possible to improve the accuracy of this clock using the undocumented NtSetTimerResolution() function: http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/Time/NtSetTimerResolution.html There are applications using this undocumented function. For example: http://www.lucashale.com/timer-resolution/ See also the timeBeginPeriod() function: http://msdn.microsoft.com/en-us/library/ms713413%28VS.85%29.aspx The user may have a special hardware (and its driver) or a special softwared (ntpd?) with a better accuracy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Xavier Morel xavier.mo...@masklinn.net added the comment: My specific suggestion is to have a dedicated Quick Reference section before the first example. OK, that looks like a good plan. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13841] multiprocessing should use sys.exit() where possible
sbt shibt...@gmail.com added the comment: Currently, on both Windows and Unix, when the main thread of a child process exits: * atexit callbacks are NOT run (although multiprocessing.util._exit_function IS run), * the main thread does NOT wait for non-daemonic background threads. A simple replacement of ExitProcess() by sys.exit() would change this. Whether that would be a good thing, I don't know. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications. It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call time.clock(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13851] Packaging distutils2 for Fedora
New submission from Vikash Agrawal vikashagrawal1...@gmail.com: Packaging distutils2 for Fedora The spec file, is attached and lack many things. I also need to add files like README, COPYING etc. The problem is, after installtion of the generated rpm, python -distutils2-1.0-0.1.0.a3.fc16.noarch.rpm , distutils2 functionalities (such as pysetup) are still not available in the system, though I could find the distutils2 module in the interpretor Please guide, for the necessary changes/modifications, and I hope to see this package soon in Fedora repository this is my first packaging initiative Regards Vikash Agrawal -- assignee: tarek components: Distutils2 files: python-distutils2.spec messages: 151898 nosy: alexis, eric.araujo, tarek, vikash priority: normal severity: normal status: open title: Packaging distutils2 for Fedora versions: Python 2.7 Added file: http://bugs.python.org/file24312/python-distutils2.spec ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13848] io.open() doesn't check for embedded NUL characters
Hynek Schlawack h...@ox.cx added the comment: I took a deep dive into parts of CPython that were unknown to me :) and dug up the following: Methods like os.stat or even os.open convert the file name using et in PyArg_ParseTuple[AndKeywords]. OTOH, open() and io.open() just hand through the object as O to the respective low-level io module. The result in 2.7 is that file() tries to convert it for it's own usage eventually – which fails as seen. While a more explicit error message wouldn't hurt, this seems safe to me insofar. In 3.3, file() aka Modules/_io/fileio.c , io_open does no such thing because it seems to handle fds as nameobj as well and does a wide range of checks on the argument. After io_open is certain that nameobj is a file name, it uses PyObject_AsCharBuffer()on bytes and PyUnicode_FromObject() + encoding magic on unicode to get an encoded string as a file name. Neither does a check for NUL bytes so the (w)open(er) that follows reacts as demonstrated by Antoine. I presume fixing/breaking PyObject_AsCharBuffer()/PyUnicode_FromObject() is out of question so the most obvious part to fix would be the conversion block inside io_open. Should I have a stab at it or do you disagree with my approach? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13852] Doc fixes with patch
New submission from Boštjan Mejak bostjan.me...@gmail.com: I have collected a small amount of documentation fixes in my patch. Please review it and apply it. No pressure. ;) -- assignee: docs@python components: Documentation files: changes.diff keywords: patch messages: 151900 nosy: Retro, docs@python priority: normal severity: normal status: open title: Doc fixes with patch type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24313/changes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows
STINNER Victor victor.stin...@haypocalc.com added the comment: NtSetTimerResolution is a system-wide change, and may have impact on other running applications. It may be an option to set it during the execution of profile.run() for example, but I would not enable it just to call time.clock(). I was not proposing to call, but it was trying to say that under certain circumstances, you may have a better resolution than 15 ms. Python should not limit the resolution if the OS provides a better resolution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13848] io.open() doesn't check for embedded NUL characters
Antoine Pitrou pit...@free.fr added the comment: Yes, fixing the conversion block is probably the right approach. Apparently posixmodule.c uses PyUnicode_FSConverter, perhaps that would work? (also make sure that the case where a bytes string is given is fixed too: open(b\x00) Traceback (most recent call last): File stdin, line 1, in module FileNotFoundError: [Errno 2] No such file or directory: '' ) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13849] Add tests for NUL checking in certain strs
R. David Murray rdmur...@bitdance.com added the comment: My understanding (and recollection, but I don't have notes I can point at to hand) is that one goal that arose from recent VM and language summits was for the CPython test suite to be used as the validating test suite, with CPython-specific tests marked as such so that the other VMs can easily not conform to those tests. Thus my comment that it is helpful to the other VMs to add tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13849] Add tests for NUL checking in certain strs
R. David Murray rdmur...@bitdance.com added the comment: Oh, and in case it isn't clear, this request is *coming* from one of the other VMs (pypy), so if my summit recollection is correct, they are in fact adding a test that they need by submitting this issue :) (Or at least they will have once Alex posts the patch.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4966] Improving Lib Doc Sequence Types Section
Nick Coghlan ncogh...@gmail.com added the comment: Pushed an initial cut to my sandbox branch. Built HTML is attached so you can get a general idea of how it looks (links, etc, obviously won't work). So far, I have made the split into 3 sections and updated the new (shorter) Sequence Types section. That section now has 6 subsections: - Common Sequence Operations - Immutable Sequence Operations (very short, just mentions hash support) - Mutable Sequence Operations - Lists - Tuples - Ranges I haven't really touched the Text and Binary sections as yet - the only changes there are things that I copied down before removing them from the updated Sequence Types section. -- Added file: http://bugs.python.org/file24314/stdtypes.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13849] Add tests for NUL checking in certain strs
Changes by Hynek Schlawack h...@ox.cx: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13848] io.open() doesn't check for embedded NUL characters
Hynek Schlawack h...@ox.cx added the comment: JFTR, file()'s C equivalent is fileio_init and not io_open, I lost track of all the opens. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13849] Add tests for NUL checking in certain strs
Martin v. Löwis mar...@v.loewis.de added the comment: If so, I think this change should not checked into the 2.7 branch. Instead, a separate branch should be made for changes not intended for CPython, but for Python implementations in general. Making the Python test suite usable for other implementations is certainly not a feature of Python 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13849] Add tests for NUL checking in certain strs
Martin v. Löwis mar...@v.loewis.de added the comment: Reconsidering: I think it shouldn't be checked into the cpython *repository*. Instead, if PyPy developers want to contribute changes to the test suite and standard library to improve the standard library, there should be a separate Mercurial repository for that, and PyPy developers might get a blanket write permission to add changes unless they explicitly feel a need for review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13851] Packaging distutils2 for Fedora
Dave Malcolm dmalc...@redhat.com added the comment: Hi Vikash - thanks for working on this. It's normal when packaging code downstream for Fedora to file a package review request at bugzilla.redhat.com, following the process here: http://fedoraproject.org/wiki/Package_Review_Process (sorry if the process seems byzantine; I can help if need be). I just a did quick search and didn't see one for distutils2 there. Some immediate things struck me about the specfile: * it's normal to linewrap the %description clause (the specfile should be readable in a 80-column display) * you don't need the CFLAGS= stuff for a noarch package As for the question about things like pysetup not being available - are these meant to end up in /usr/bin ? If so, this may indeed be an issue for upstream distutils2 (and hence for this bug tracker). Hope this is helpful Dave -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4966] Improving Lib Doc Sequence Types Section
Nick Coghlan ncogh...@gmail.com added the comment: Note: without the Python docs CSS to create the sidebar, the internal table of contents appears at the *bottom* of the rendered page. Really, reviewing this sensibly is probably going to require building the docs locally after using hg pull to retrieve the changes from my sandbox. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13842] Cannot pickle Ellipsis or NotImplemented
James Sanders bistromath...@gmail.com added the comment: I've submitted a patch that just uses save_global to pickle Ellipsis and NotImplemented, so the resulting pickle should be unpicklable anywhere. I'm completely new to the C API so not sure if the way I am building python strings (to pass to save_global) is correct, but it seems to work. -- keywords: +patch Added file: http://bugs.python.org/file24315/pickling_ellipsis_notimplemented.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: st_atim, st_ctim and st_mtim attributes could be instances of a class (implemented in posixmodule.c) similar to: class timespec(tuple): def __init__(self, arg): if not isinstance(arg, tuple): raise TypeError if len(arg) != 2: raise TypeError if not isinstance(arg[0], int): raise TypeError if not isinstance(arg[1], int): raise TypeError self.sec = arg[0] self.nsec = arg[1] tuple.__init__(self) def __add__(self, other): if not isinstance(other, timespec): raise TypeError ns_sum = (self.sec * 10 ** 9 + self.nsec) + (other.sec * 10 ** 9 + other.nsec) return timespec(divmod(ns_sum, 10 ** 9)) def __sub__(self, other): if not isinstance(other, timespec): raise TypeError ns_diff = (self.sec * 10 ** 9 + self.nsec) - (other.sec * 10 ** 9 + other.nsec) return timespec(divmod(ns_diff, 10 ** 9)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13848] io.open() doesn't check for embedded NUL characters
Hynek Schlawack h...@ox.cx added the comment: So I have good news and bad news. The good is: I fixed it for non-Win platforms and the patch is truly beautiful: Lib/test/test_builtin.py | 6 ++ Modules/_io/fileio.c | 25 - 2 files changed, 10 insertions(+), 21 deletions(-) ;) Two problems: 1. I'm not sure if it's okay for me to put the test where I put it? 2. I'm not sure how to fix it for Win32 (and I also can't test it :(). It's just about the case when it's called with a Unicode path name. The current code looks like as following: if (PyUnicode_Check(nameobj)) { widename = PyUnicode_AsUnicode(nameobj); if (widename == NULL) return -1; } We can't use the nifty PyUnicode_FSConverter because we want to keep Unicode. So I assume the way to go would be the C equivalent of somthing like: if '\0' in widename: raise TypeError() Right? I hope someone would be so kind to implement it, otherwise the patch attached passes all test on Linux and Mac (except for test_recursion_limit but that fails currently for me on the Mac even without my patch). -- keywords: +patch Added file: http://bugs.python.org/file24316/open-nul.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Brett Cannon br...@python.org added the comment: LGTM -- assignee: - pitrou stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a2f3d6986bfa by Antoine Pitrou in branch '3.2': Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. http://hg.python.org/cpython/rev/a2f3d6986bfa New changeset cb13d8cff050 by Antoine Pitrou in branch 'default': Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. http://hg.python.org/cpython/rev/cb13d8cff050 New changeset 0499eed74126 by Antoine Pitrou in branch '2.7': Issue #11235: Fix OverflowError when trying to import a source file whose modification time doesn't fit in a 32-bit timestamp. http://hg.python.org/cpython/rev/0499eed74126 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11235] Source files with date modifed in 2106 cause OverflowError
Antoine Pitrou pit...@free.fr added the comment: Committed, thanks. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11235 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13812] multiprocessing package doesn't flush stderr on child exception
Jon Brandvein jon.brandv...@gmail.com added the comment: Patch looks fine. I like the use of finally for the flush. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Steven Bethard steven.beth...@gmail.com added the comment: Sounds like an excellent plan to me too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13841] multiprocessing should use sys.exit() where possible
Jon Brandvein jon.brandv...@gmail.com added the comment: Good point. I don't think those particular behaviors are documented, so I'm not sure whether we need to worry about breaking them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13853] SystemExit/sys.exit() doesn't print boolean argument
New submission from Jon Brandvein jon.brandv...@gmail.com: Raising SystemExit manually, or calling sys.exit, with an argument of True or False results in no output to the screen. According to Doc/library/exceptions.rst and Doc/library/sys.rst, any object that is not an integer or None should be printed to stderr. Also, I'm not sure whether this is a bug, but raise SystemExit(None) differs from sys.exit(None), in that the former produces an exception with an args tuple of (None,), and the latter produces one with an empty args tuple. -- components: Interpreter Core messages: 151920 nosy: brandj priority: normal severity: normal status: open title: SystemExit/sys.exit() doesn't print boolean argument type: behavior versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13854] multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError
New submission from Jon Brandvein jon.brandv...@gmail.com: In a child process, raising SystemExit or calling sys.exit with a non-integer, non-string argument value causes a TypeError at Lib/multiprocessing/process.py :: _bootstrap. This is from concatenating the argument with '\n' and writing it to stderr. Suggested fix: replace sys.stderr.write(e.args[0] + '\n') with sys.stderr.write(str(e.args[0]) + '\n') This problem also occurs when the value is None, but only for raising SystemExit (not calling sys.exit()). -- components: Library (Lib) messages: 151921 nosy: brandj, jnoller priority: normal severity: normal status: open title: multiprocessing: SystemExit from child with non-int, non-str arg causes TypeError type: behavior versions: Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13854 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13852] Doc fixes with patch
Changes by Boštjan Mejak bostjan.me...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13840] create_string_buffer rejects str init_or_size parameter
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13672] Add co_qualname attribute in code objects
Meador Inge mead...@gmail.com added the comment: On Wed, Dec 28, 2011 at 3:11 PM, Eric Snow rep...@bugs.python.org wrote: One sticky point is that there isn't a guarantee of one-to-one between function object and code object. A code object could be bound to several different functions as happens with function definitions (particularly lambdas) inside comprehensions. Also, if a code object is not associated with a function, i.e. one generated by exec, what should the qualname for the code object be? How about, in CPython, the code objects created for classes and modules? We already these issues with 'co_name', though. These cases can be treated the same as they are for 'co_name': 'listcomp' compile('[i for i in [1, 2]]', 'foo', 'exec').co_consts[0].co_qualname 'listcomp' compile('class T: pass', 'foo', 'exec').co_consts[0].co_qualname 'T' compile('class T: pass', 'foo', 'exec').co_consts[0].co_name 'T' compile('a = 12', 'foo', 'exec').co_name 'module' compile('a = 12', 'foo', 'exec').co_qualname 'module' compile('lambda x: x', 'foo', 'exec').co_consts[0].co_qualname 'lambda' compile('lambda x: x', 'foo', 'exec').co_consts[0].co_name 'lambda' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12501] callable(): remove/amend the deprecation warning in Python 2.7
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 62bd0553693f by Florent Xicluna in branch '2.7': Issue #12501: merge the discordant NEWS entries. http://hg.python.org/cpython/rev/62bd0553693f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13672] Add co_qualname attribute in code objects
Meador Inge mead...@gmail.com added the comment: This seems to be a useful feature to me. Another area where it can help is with fixing function types. Currently the qualname can be lost: def f(): ...def g(): ... pass ...return g ... g = f() g function f.locals.g at 0x7f1dac4d8ba0 types.FunctionType(f.__code__, {}) function f at 0x7f1dac4dfae0 types.FunctionType(g.__code__, {}) There is no way to specify a qualname when constructing a 'FunctionType'. The name is derived from the code object. The qualname could be too if we fix this issue. I will open another issue for the 'FunctionType' problem. I have attached a WIP patch. It passes the full test suite. I am somewhat unsure about the CAPI changes, though. They are a breaking API change. Do we need a *_QualName version instead like we did for 'PyFunction_NewWithQualName'? I think probably so. I will add doc updates to the patch once the API stuff gets worked out. -- keywords: +patch Added file: http://bugs.python.org/file24317/issue13672-v0.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13855] Add qualname support to types.FunctionType
New submission from Meador Inge mead...@gmail.com: As mentioned in issue13672 currently there is no way to specify a qualname on types.FunctionType: def f(): ...def g(): ... pass ...return g ... g = f() g function f.locals.g at 0x7f1dac4d8ba0 types.FunctionType(f.__code__, {}) function f at 0x7f1dac4dfae0 types.FunctionType(g.__code__, {}) If issue13672 is fixed, then the qualname can be derived from the passed in code object like name is. We can also add an optional parameter to the FunctionType constructor for qualname. I am working on a patch relative to the one I just posted for issue13672. -- components: Library (Lib) messages: 151925 nosy: meador.inge, pitrou priority: normal severity: normal stage: needs patch status: open title: Add qualname support to types.FunctionType type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Xavier Morel xavier.mo...@masklinn.net added the comment: The Parameters column would span multiple lines, with one parameter and a brief description of the parameter on each line. I started looking into that, and it turns out that's more annoying than expected: a bunch of parameters are shared by many (to all) actions, leading to lots of duplications in the table. And the full matrix of actions to parameters is not really explained in the doc. In fact, I'm coming around to thinking a matrix of the interaction between actions and arguments could be better and clearer than a table of actions with parameters bunched together at the end. In any case, it would certainly be more maintainable... except for rST not really having support for attributes on data tables, and (as far as I can tell) can't handle horizontal headers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13855] Add qualname support to types.FunctionType
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13846] Add time.monotonic() function
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13846 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13856] xmlrpc / httplib changes to allow for certificate verification
New submission from Nathanael Noblet nathanaelnob...@gmail.com: If I wanted to create a HTTPS connection to a xmlrpc server *and* validate its certificate, I need to override the HTTPSConnection and SafeTransport objects. However it seems like they could easily support both methods. At least it seems to work both ways for me -- files: xmlrpc-http-withcerts.patch keywords: patch messages: 151927 nosy: Nathanael.Noblet, loewis priority: normal severity: normal status: open title: xmlrpc / httplib changes to allow for certificate verification type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file24318/xmlrpc-http-withcerts.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Nick Coghlan ncogh...@gmail.com added the comment: Having a second table of Applicable Parameters could definitely work. I don't think the no horizontal headers limitation should be a big problem - the matrix should be readable even if the action names are just listed in an ordinary column. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7097] urlparse.urljoin of simple http:// and somedomain.com produces incorrect result
Mark Nottingham m...@mnot.net added the comment: http: and http:// are both valid base URIs; see RFC3986. More to the point, it's a useful thing to use a scheme as a base URI; many users omit the HTTP:// from their URIs. -- nosy: +mnot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13850] Summary tables for argparse add_argument options
Raymond Hettinger raymond.hettin...@gmail.com added the comment: +1 from me. The docs in their present form are a great tutorial but are a total failure as a quick reference. Besides having table of parameters, it may also be worthwhile to move some of the examples to a HOWTO document (much as was done with the logging package). -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13840] create_string_buffer rejects str init_or_size parameter
Meador Inge mead...@gmail.com added the comment: The 'create_unicode_buffer' docs are currently wrong too: If the first parameter is a bytes object, it is converted into an unicode string according to ctypes conversion rules. ctypes.create_unicode_buffer(b'foo') Traceback (most recent call last): File stdin, line 1, in module File /home/meadori/src/python/cpython/Lib/ctypes/__init__.py, line 294, in create_unicode_buffer buf.value = init TypeError: unicode string expected instead of bytes instance The attached patch fixes the documentation and exception messages. Although, it might be more friendly to implement things according to the current docs (i.e. do the conversions). -- components: +ctypes keywords: +patch stage: - patch review versions: +Python 3.3 Added file: http://bugs.python.org/file24319/issue13840.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13840 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13857] Add textwrap.indent() as counterpart to textwrap.dedent()
New submission from Nick Coghlan ncogh...@gmail.com: As far I am aware, the simplest way to indent a multi-line string is with the following snippet: '\n'.join((4 * ' ') + x for x in s.splitlines()) It would be a lot simpler and clearer if I could just write that as textwrap.indent(s, 4 * ' '). (i.e. indent would accept a prefix string to be inserted before each line in the supplied string, as in the original comprehension) -- components: Library (Lib) messages: 151932 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add textwrap.indent() as counterpart to textwrap.dedent() type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13858] readline fails on nonblocking, unbuffered io.FileIO objects
New submission from Matt Joiner anacro...@gmail.com: _io._IOBase.readline doesn't seem to like _io.FileIO.read returning None, which occurs when it's unbuffered and nonblocking. (Modules/_io/fileio.c:745 in trunk). Can this be handled some other way? $ python3.3 Python 3.3.0a0 (default:fb0f4fe8123e+, Jan 24 2012, 11:21:36) [GCC 4.6.2] on linux Type help, copyright, credits or license for more information. import os, io r, w = os.pipe2(os.O_NONBLOCK) f = io.open(r, 'rb', 0) f.readline() Traceback (most recent call last): File stdin, line 1, in module OSError: read() should have returned a bytes object, not 'NoneType' -- components: IO, Library (Lib) messages: 151933 nosy: anacrolix priority: normal severity: normal status: open title: readline fails on nonblocking, unbuffered io.FileIO objects type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] Skip test_ssl.test_connect_ex() on connection error
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12804] make test fails on systems without internet access
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 585d3664da89 by Nadeem Vawda in branch 'default': Issue #12804: Fix test failures on systems without internet access. http://hg.python.org/cpython/rev/585d3664da89 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12804] make test fails on systems without internet access
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12804 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com