[issue7977] I found Python 3.1 xmlrpc lib use param not properly. and i have fixed it.
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: But what if I want to pass a tuple through xmlrpc? The function in the test case: +def execute(server, methodname, *args): +r = getattr(server, methodname)(args) # params become a tuple +return r looks wrong to me. It has the effect to modify the nature of the arguments. If I write instead: +def execute(server, methodname, *args): +r = getattr(server, methodname)(*args) +return r (note the additional '*') the function may receive several arguments, and will call the server method with several arguments as well. Tuple unpacking occurs where tuple packing was made. The library does not need to be changed. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This fileLineIter function looks like a good recipe to me. Can we close the issue then? -- nosy: +amaury.forgeotdarc resolution: - works for me status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I also like the idea; 3 remarks though: - the patch introduces a new function that returns a PyObject*, but returns NULL when the attribute is not found, and the caller should raise AttributeError. This convention is not standard among the Python API and dangerous IMO. This part of the patch is not necessary. PyModule_GetAttr could just call PyObject_GenericGetAttr and override the current exception with a new message. - it's not necessary to expose the function PyModule_GetAttr. It could be renamed to something like module_getattr, and be a static function. Module writers are already used to PyObject_GetAttr to access the module items, this new function brings nothing new. - a minor nit: instead of module object 'mod_name' has no attribute 'xxx' I'd prefer module 'mod_name' has no attribute 'xxx' -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9012] Separate compilation of time and datetime modules
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9012 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6975] symlinks incorrectly resolved on Linux
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6698] IDLE no longer opens only an edit window when configured to do so
Ronald Oussoren ronaldousso...@mac.com added the comment: The current behaviour on OSX for IDLE.app is to always open a shell window, and open edit windows for any files that should be opened during launch. IDLE.app does not open an empty edit window, and I agree that this is sane behaviour. One other thing that might be interesting to know: IDLE.app is already set up to open just a single instance of IDLE when users open python files from the Finder. -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6698 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The two example classes are used exactly the same way, and don't show the differences between them. How about a simple change like: Replace: If the class defines :meth:`next`, then :meth:`__iter__` can just return ``self`` with It may be convenient to define :meth:`next` in the class, and have :meth:`__iter__` just return ``self``; In this case though, the object can be iterated only once. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.symlink() and os.path.islink() support for Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: All patches seems already applied. Should we close this issue? -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5131] pprint doesn't know how to print a defaultdict
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Patch looks good to me. (Some day the pprint module should grow some way to register repr for user types, so we can stop adding special cases; but defaultdict() is a builtin) -- nosy: +amaury.forgeotdarc resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Changes by Matthieu Labbé bugs.python@mattlabbe.com: -- nosy: +matthieu.labbe ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1723038] Curses Menu
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch should be amended for python3, then: - PyType_Ready() should be used instead of ob_type = PyType_Type; - The demo contains Option choisie : which should be translated :-) - the call:: PyErr_SetString(PyExc_RuntimeError, remove_lom: can't find Menu Object); is wrong: the calling function does not check the error condition, it will be ignored in any case because the only called is the tp_dealloc - find_po() is defined but never called - the free() method does not do anything, it contains commented out code. In short, this patch needs work. -- nosy: +amaury.forgeotdarc stage: unit test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1723038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
zenyatta j...@journey.sk added the comment: I work in sidux and my Mercurial currently doesn't work. The python version already contains the fix for this issue (revision 81637) and it crashes Mercurial (authorization failed) whenever a command involves more than 5 requests to the repository. I fixed it by resetting the retry counter upon successful authorization (see patch). Maybe this helps someone in a similar situation. The patch was made against trunk using diff -u. -- keywords: +patch nosy: +zenyatta Added file: http://bugs.python.org/file18121/urllib2-8797-fix-workaround.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3591] elementtree tests do not include bytes handling
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: test_xml_etree.py has some tests about bytes input (check_issue6233) but these are only working cases. Tests with wrong encodings should be added. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
Mads Kiilerich m...@kiilerich.com added the comment: zenyatta: Which Mercurial version? We thought we had implemented a sufficiently ugly workaround in Mercurial. Please file an issue in http://mercurial.selenic.com/bts/ . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9320] os.environ is global for threads
anatoly techtonik techto...@gmail.com added the comment: I have to debug CGIHTTPServer test case that apparently uses threads, and I expected to find at least some pointer about what exactly a thread in Python is. I hope Python Manual is not only for system programmers. They do not need the manual anyway - they already know everything and there are plenty tutorials for them elsewhere. -- please remove http://docs.python.org/ and put in a better documentation, I wasted so much time reading that bad documentation that now I hate it and I will never write code in python (c) Mario Santamaria -- status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9320] os.environ is global for threads
Stefan Krah stefan-use...@bytereef.org added the comment: I agree with Eric, Konstantin, Amaury and Georg. Closing for the third time. -- nosy: +skrah status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9320] os.environ is global for threads
Changes by Stefan Krah stefan-use...@bytereef.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9154] Parser module doesn't understand function annotations.
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The extra space in Grammar was already removed in r82624. The remaining part of the patch looks good to me. The lambda thing is not important, if you get an error when trying to compile the resulting st. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9320] os.environ is global for threads
Georg Brandl ge...@python.org added the comment: Anatoly, I don't think it is a good idea to use signatures in tracker comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9320 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6751] Default return value in ConfigParser
Juan Javier jjdomingu...@gmail.com added the comment: I've applied the enhancement to the three parsers, actually I've made the change to RawconfigParser with a small change to ConfigParser. I've also created some unit tests. -- keywords: +patch Added file: http://bugs.python.org/file18122/configparser.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6751] Default return value in ConfigParser
Changes by Juan Javier jjdomingu...@gmail.com: Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6751 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5135] Expose simplegeneric function in functools module
Paul Moore p.f.mo...@gmail.com added the comment: I don't propose to raise a PEP myself. The issue with ABCs seems to me to be a fundamental design issue, and I think it's better to leave raising any PEP, and managing the subsequent discussion, to someone with a deeper understanding of, and interest in, generic functions. Not sure if the lack of a champion means that this issue should be closed. I'm happy if that's the consensus (but I'm also OK with it being left open indefinitely, until someone cares enough to pick it up). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Nick Coghlan ncogh...@gmail.com added the comment: A recipe in the comments on a tracker item isn't enough reason to close the RFE, no. An entry on the cookbook with a pointer from the docs might be sufficient, although I'm still not averse to the idea of an actual readrecords method (with appropriate tests). -- resolution: works for me - status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5135] Expose simplegeneric function in functools module
Antoine Pitrou pit...@free.fr added the comment: Generic functions are a lesser-known paradigm than OO, and nowhere do common Python documents (including the official docs) try to teach them. That means the first public appearance of generic functions in the stdlib should really be well thought out if we don't want to encourage poor practices. I agree with Guido that a PEP is required to flesh out all the details. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5120] Disabling test_ttk_guionly on mac
Ronald Oussoren ronaldousso...@mac.com added the comment: Mark: maybe, why don't you test this? -- assignee: - ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Ray.Allen ysj@gmail.com added the comment: Amaury: Thanks for reviewing! I quite appreciate your ideas. I was not quite familiar with python source code convention at that time. Here I worked out a new patch based on your ideas. Since py2.7 has released, this feature can only go to py3k. So my new patch is against py3k. Hoping somebody could review it. Thanks all! By the way, I feel if module object's getattr can be customized, other types, like the super object, also needs this. -- Added file: http://bugs.python.org/file18124/issue_8297.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp
zenyatta j...@journey.sk added the comment: See http://mercurial.selenic.com/bts/issue2299 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Profiling only works on functions that actually return; maybe we could add something about this fact in the documentation -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5978 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5774] _winreg.OpenKey() is documented with keyword arguments, but doesn't take them
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Please rename sam to something readable, access for example. And the reserved parameter should really go, at least not be documented. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5774 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5774] _winreg.OpenKey() is documented with keyword arguments, but doesn't take them
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: +1 on better names, -1 on removing the reserved parameter The parameters of OpenKey mirror those of the underlying RegOpenKey call. If we remove the reserved parameter, then: 1) Any code currently using the sam parameter will break, since it's currently only positional 2) If Microsoft later makes the reserved parameter do something, then we will have to reinsert a parameter before sam or have our arguments in a different order than RegOpenKey For what it's worth, RegOpenKey names the parameters: hKey, lpSubKey, ulOptions, and samDesired. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5774 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1506122] Add compose function to the functools
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The proposed code may be useful sometimes, but is not generic enough for the standard library. For example, the f() function can only take one argument, when g() can accept any number. Implementations of this kind are so easy to write, They are better described by their implementation rather than documentation. IMO they show the expressiveness of python, and don't need to be hidden in a C module. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1506122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1506122] Add compose function to the functools
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1506122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Ray.Allen ysj@gmail.com added the comment: I think it's a good idea adding a keyword argument to specify the separator of readlines(). I believe most people can accept the universal meaning of line, which has similar meaning of record, that is a chunk data, maybe from using line separators other than '\n' in perl, or akw, or the find command. Maybe doing this doesn't pollute the meaning of readlines. Splitting the file contents with s special character is really a common usage. Besides, I feel using a line separator other than '\n' doesn't mean we're dealing with binary format, in fact, I often deal with text format with the record separator '\t'. -- nosy: +ysj.ray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1723038] Curses Menu
Changes by Ray.Allen ysj@gmail.com: -- nosy: +ysj.ray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1723038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Barry A. Warsaw ba...@python.org added the comment: Updated patch. -- Added file: http://bugs.python.org/file18125/diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533105] NetBSD build with --with-pydebug causes SIGSEGV
Matt Fleming mattjflem...@googlemail.com added the comment: I'm not really tracking this anymore but i can certainly try to recreate the issue sometime this week if required? On 17 July 2010 14:37, Stefan Krah rep...@bugs.python.org wrote: Stefan Krah stefan-use...@bytereef.org added the comment: Matt, if you still follow this: Does this problem exist in 2.6/2.7/NetBSD? I think this should be set to pending. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533105 ___ -- nosy: +mfleming ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1812] doctest _load_testfile function -- newline handling seems incorrect
Mark Lawrence breamore...@yahoo.co.uk added the comment: The py3k stuff is fine on Windows but the 2.7 maintainance branch now fails. 1 items had failures: 1 of 6 in doctest_testfile.txt ***Test Failed*** 1 failures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6135] subprocess seems to use local 8-bit encoding and gives no choice
Mark Lawrence breamore...@yahoo.co.uk added the comment: Ran new unit test before and after patching subprocess on Windows Vista against 3.1 debug maintenance release, all ok apart from this at end of latter. File test\test_subprocess.py, line 568, in test_encoded_stderr self.assertEqual(p.stderr.read(), send) AssertionError: 'ï[32943 refs]\r\n' != 'ï' I'm sure I've seen a ref to this somewhere, can anyone remember where? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7579] Patch to add docstrings to msvcrt
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- assignee: georg.brandl - d...@python nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module
Mark Lawrence breamore...@yahoo.co.uk added the comment: @Antoine could you respond to msg97699, thanks. -- nosy: +BreamoreBoy versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7699] strptime, strftime documentation
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- assignee: georg.brandl - d...@python nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7699 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module
Antoine Pitrou pit...@free.fr added the comment: @Antoine could you respond to msg97699, thanks. Well my comments and the patch itself are outdated now that 2.7 is in bugfix mode. The socket implementation in 3.2 is slightly different, which means the patch should be updated (it isn't necessarily difficult to do so), and the accept() issue should be examined again. -- components: -IO nosy: +exarkun stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5609] Create Unit Tests for nturl2path module
Mark Lawrence breamore...@yahoo.co.uk added the comment: Maksim could you please respond to the comments on Rietveld, thanks. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5609 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5825] Patch to add remove method to tempfile.NamedTemporaryFile
Mark Lawrence breamore...@yahoo.co.uk added the comment: Can be closed unless someone can justify this change. -- nosy: +BreamoreBoy status: open - pending versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5825 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: The documentation should mention somewhere that timeout can be a float. For example, as in time.sleep docstring: sleep(seconds) Delay execution for a given number of seconds. The argument may be a floating point number for subsecond precision. I would also like to see some discussion of supported precision. Is is the same as for time.sleep()? Does float precision ever affect timeout precision? (On systems with nanosleep it may, but probably this has no practical concequences.) This can be done as a future enhancement, but I would like to see datetime.timedelta as an acceptable type for timeout. This can be done by adding duck-typed code in the error branch which would attempt to call timeout.total_seconds() to extract a float. Looking further, it appears that timeout can be anything that can be added to a float to produce float. Is this an accident of implementation or a design decision? Note that a result Fraction can be used as timeout but Decimal cannot. Zero and negative timeouts are accepted by subprocess.call(), but the result is not documented. It looks like this still starts the process, but kills it immediately. An alternative would be to not start the process at all or disallow negative or maybe even zero timeouts altogether. I don't mind the current choice, but it should be documented at least in Popen.wait(timeout=None) section. +def wait(self, timeout=None, endtime=None): Wait for child process to terminate. Returns returncode attribute. Docstring should describe timeout and endtime arguments. In fact I don't see endtime documented anywhere. It is not an obvious choice that endtime is ignored when timeout is given. An alternative would be to terminate at min(now + timeout, endtime). +delay = 0.0005 # 500 us - initial delay of 1 ms I think this should be an argument to wait() and the use of busy loop should be documented. +delay = min(delay * 2, remaining, .05) Why .05? It would probably be an overkill to make this another argument, but maybe make it an attribute of Popen, say self._max_busy_loop_delay or a shorter descriptive name of your choice. If you start it with '_', you don't need to document it, but users may be able to mess with it if they suspect that 0.05 is not the right choice. +endtime = time.time() + timeout Did you consider using datetime module instead of time module here? (I know, you still need time.sleep() later, but you won't need to worry about variable precision of time.time().) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: s/Note that a result Fraction/Note that as a result, Fraction/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7579] Patch to add docstrings to msvcrt
Changes by Brian Curtin cur...@acm.org: -- assignee: d...@python - brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7579 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9329] freeze tool cannot handle JSON module properly
New submission from Sam Saint-Pettersen s.stpetter...@gmail.com: Freeze tool can generate Makefile and C code for Python programs using the JSON module. The code can be compiled fine, but when a program using the JSON module is run, this is returned: Traceback (most recent call last): 2 File myProgram.py, line 15, in module 3 import json 4 File /usr/local/lib/python2.7/json/__init__.py, line 108, in module 5 from .decoder import JSONDecoder 6 File /usr/local/lib/python2.7/json/decoder.py, line 24, in module 7 NaN, PosInf, NegInf = _floatconstants() 8 File /usr/local/lib/python2.7/json/decoder.py, line 18, in _floatconstants 9 _BYTES = '7FF87FF0'.decode('hex') 10 LookupError: unknown encoding: hex Something to do with .decode('hex') apparently. -- components: Demos and Tools messages: 88 nosy: sam.sp priority: normal severity: normal status: open title: freeze tool cannot handle JSON module properly type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9329 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Douglas Alan darkwate...@gmail.com added the comment: Personally, I think that this functionality should be built into Python's readlines. That's where a typical person would expect it to be, and this is something that is supported by most other scripting language I've used. E.g., awk has the RS variable which lets you set the input record separator, which defaults to newline. And as I previously pointed out, xargs and find provide the option to use null as their line separator. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1718574] build_clib --build-clib/--build-temp option bugs
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Confirmed here: python setup.py build_clib -b/some/dir returns error: option -/ not recognized All other files (build_ext.py, clean.py) have a '=' after these options names. Patch is inlined: Index: Lib/distutils/command/build_clib.py === --- Lib/distutils/command/build_clib.py (révision 82925) +++ Lib/distutils/command/build_clib.py (copie de travail) @@ -32,9 +32,9 @@ description = build C/C++ libraries used by Python extensions user_options = [ -('build-clib', 'b', +('build-clib=', 'b', directory to build C/C++ libraries to), -('build-temp', 't', +('build-temp=', 't', directory to put temporary build by-products), ('debug', 'g', compile with debugging information), -- keywords: +patch nosy: +amaury.forgeotdarc stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1718574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1718574] build_clib --build-clib/--build-temp option bugs
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. It is indeed a stupid typo. Can someone produce a patch against current py3k? Confirmed in distutils2 too, I can fix it there. -- components: +Distutils2 nosy: +merwok resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1718574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7742] please avoid 'which' in Modules/ld_so_aix
Mark Lawrence breamore...@yahoo.co.uk added the comment: @Michael: do you intend putting in a new patch for review as hinted at in msg98071? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9330] assertIn should check for membership support before testing
New submission from Brian Curtin cur...@acm.org: A recent sysconfig test which should have been skipped on Windows (now fixed) exposed a bug in the assertIn/assertNotIn methods. If the container you are testing doesn't support membership testing or iteration, such as None value when a previous call fails, the test is then an error rather than a fail. Before: == ERROR: test_ldshared_value (test.test_sysconfig.TestSysConfig) -- Traceback (most recent call last): File c:\python-dev\py3k\lib\test\test_sysconfig.py, line 285, in test_ldshar ed_value self.assertIn(ldflags, ldshared) File c:\python-dev\py3k\lib\unittest\case.py, line 797, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable I believe this should be a fail with AssertionError, rather than an error with TypeError. == FAIL: test_ldshared_value (test.test_sysconfig.TestSysConfig) -- Traceback (most recent call last): File c:\python-dev\py3k\lib\test\test_sysconfig.py, line 285, in test_ldshar ed_value self.assertIn(ldflags, ldshared) AssertionError: None does not support the `in` operator The patch adds a check that __contains__, __iter__, or __getitem__ exist on the object and fails the test if none of those are found. It also includes a few test updates. -- assignee: michael.foord components: Library (Lib) files: membership_check.diff keywords: needs review, patch, patch messages: 93 nosy: brian.curtin, michael.foord priority: normal severity: normal stage: patch review status: open title: assertIn should check for membership support before testing type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18126/membership_check.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9232] Allow trailing comma in any function argument list.
Mark Dickinson dicki...@gmail.com added the comment: There was one place that needed to be changed in ast.c: namely, the check to make sure that there are keyword-only arguments following a bare star. Here's a new patch, that fixes that issue, updates the grammar in the ast.c comment to match that in Grammar/Grammar, and also updates the production list given in the docs for function definitions. -- Added file: http://bugs.python.org/file18127/trailing_commas2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9213] range purports to implement the Sequence ABC, but is missing index and count methods
Daniel Urban urban.dani...@gmail.com added the comment: Sorry, the previous patch has a reference leak. I'm attaching the fixed patch as issue9213a.diff (I also added a few tests with really big ranges). -- Added file: http://bugs.python.org/file18128/issue9213a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9213 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9232] Allow trailing comma in any function argument list.
Changes by Mark Dickinson dicki...@gmail.com: Added file: http://bugs.python.org/file18129/trailing_commas2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9232] Allow trailing comma in any function argument list.
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file18127/trailing_commas2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9232 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”
Anders Kaseorg ande...@mit.edu added the comment: I don’t think that small change is good enough, if it is still the case that the only provided example is the dangerous one. It would be easy to clarify the differences between the classes: rl = test.ReverseList('spam') [c for c in rl] ['m', 'a', 'p', 's'] [c for c in rl] ['m', 'a', 'p', 's'] ri = iter(rl) ri test.ReverseIterator object at 0x7fa5cbeaec50 [c for c in ri] ['m', 'a', 'p', 's'] [c for c in ri] [] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”
Antoine Pitrou pit...@free.fr added the comment: At least equally useful would be the mention that __iter__ can be a generator, eliminating the need for intermediate objects: class C: ... def __iter__(self): ... yield 1 ... yield 2 ... list(C()) [1, 2] -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why do you call this dangerous? because the object can be iterated only once? But reversed() does the same thing. And all iterators objects must also implement the __iter__ method that return themselves, otherwise they cannot be used in a for loop. Better start with such an object. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9331] sys.setprofile is not described as CPython implementation detail
New submission from Alexander Belopolsky belopol...@users.sourceforge.net: Unlike sys.settrace, sys.setprofile is not described as CPython implementation detail in Doc/library/sys.rst. -- assignee: d...@python components: Documentation messages: 99 nosy: belopolsky, d...@python priority: normal severity: normal stage: needs patch status: open title: sys.setprofile is not described as CPython implementation detail type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Daniel Urban urban.dani...@gmail.com added the comment: According to PEP 7 [1], all declarations must be at the top of a block. So you probably should move the char *mod_name_str and PyModuleObject *module declarations to the beginning of the function's body. [1] http://www.python.org/dev/peps/pep-0007/ -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8376] Tutorial offers dangerous advice about iterator s: “__iter__() can just return self”
Anders Kaseorg ande...@mit.edu added the comment: Antoine: That’s true. Amaury: See my original bug description (“This is reasonable advice for writing an iterator class, but terrible advice for writing a container class…”), and my other comments. There is nothing wrong with explaining how to write an iterator, but the explanation needs to make clear that this is _not_ how you write a container. Currently the section opens with a misleading motivation (“By now you have probably noticed that most container objects can be looped over using a for statement”), but it does actually not explain how to write a container at all. So I proposed some language and an example to fix that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Antoine Pitrou pit...@free.fr added the comment: Personally, I think that this functionality should be built into Python's readlines. That's where a typical person would expect it to be, and this is something that is supported by most other scripting language I've used. Adding it to readline() and/or readlines() would modify the standard IO Abstract Base Classes, and would therefore probably need discussion on python-dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9308] Remove redundant coding cookies from 3.x stdlib
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Is anyone interested in reviewing this patch before it is committed? Since there are no user-visible changes and the only non-trivial change simply adds new tests, I think this can go in. Any refinements can be done later. -- components: +Tests keywords: -needs review stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3196] Option in pydoc to show docs from private methods
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: It looks like OP has lost interest and I don't have time to move it forward. -- assignee: belopolsky - priority: normal - low stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3196 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1738] filecmp.dircmp does exact match only
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: belopolsky - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1738 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9005] Year range in timetuple
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Mark, Do you agree that conditions mentioned in msg109329 and msg109340 are never triggered? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9005 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This looks like something that can become part of PEP 3151. -- assignee: belopolsky - nosy: -Alexander.Belopolsky stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1652] subprocess should have an option to restore SIGPIPE to default action
Changes by Robert Cronk cron...@gmail.com: -- nosy: +rcronk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9332] Document requirements for os.symlink usage on Windows
New submission from Brian Curtin cur...@acm.org: #1578269 introduced os.symlink support for Windows 6.0, but it requires the SeCreateSymbolicLinkPrivilege privilege to be enabled for the calling user, which is not always the case. Documentation needs to be added on the specific details here, possibly including a method to request privilege escalation. -- assignee: brian.curtin components: Documentation messages: 111207 nosy: brian.curtin, jaraco priority: normal severity: normal stage: needs patch status: open title: Document requirements for os.symlink usage on Windows type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.symlink() and os.path.islink() support for Windows
Brian Curtin cur...@acm.org added the comment: Closed. I created #9332 for the remaining side issues. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7742] please avoid 'which' in Modules/ld_so_aix
Stefan Krah stefan-use...@bytereef.org added the comment: I'm not sure this should be changed: 1) Why is .cshrc sourced? It should only get sourced for a login shell. 2) If the user sets a PATH that excludes the compiler, then `which` will also not find the compiler on other systems (like Linux). Why would anyone set a PATH that excludes the compiler? Sridhar, has this ever been a problem for you on AIX? -- nosy: +skrah, srid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9332] Document requirements for os.symlink usage on Windows
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9332 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: [datetime.c] needs to be renamed in Modules/Setup.dist, and most importantly in PC/config.c Fixed in issue7989d.diff, thanks. In order to commit this patch I need an SVN advise. I would like to copy datetime.py from sandbox to py3k in a way that will preserve the history. (I know, this strictly necessary, but I don't want my name on every line in svn blame datetime.py given how little I had to change there.) I tried both svn copy oldpath newpath and svn copy oldurl newpath and it did not work (most likely because sandbox and py3k are independent checkouts.) I don't want to use svn copy oldurl newurl because that would require a separate commit for datetime.py. -- Added file: http://bugs.python.org/file18130/issue7989d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: s/strictly necessary/not strictly necessary/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5135] Expose simplegeneric function in functools module
Ryan Freckleton ryan.freckle...@gmail.com added the comment: An elaborate PEP for generic functions already exists, PEP 3124 [ http://www.python.org/dev/peps/pep-3124/]. Also note the reasons for deferment. I'd be interested in creating a more limited generic function implementation based on this PEP, minus func_code rewriting and the other fancier items. Sadly I won't have any bandwidth to work on it until January of next year. I'd vote for keeping this issue open because of that. On Thu, Jul 22, 2010 at 5:45 AM, Antoine Pitrou rep...@bugs.python.orgwrote: Antoine Pitrou pit...@free.fr added the comment: Generic functions are a lesser-known paradigm than OO, and nowhere do common Python documents (including the official docs) try to teach them. That means the first public appearance of generic functions in the stdlib should really be well thought out if we don't want to encourage poor practices. I agree with Guido that a PEP is required to flesh out all the details. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5135 ___ -- Added file: http://bugs.python.org/file18131/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5135 ___An elaborate PEP for generic functions already exists, PEP 3124 [a href=http://www.python.org/dev/peps/pep-3124/;http://www.python.org/dev/peps/pep-3124//a]. Also note the reasons for deferment. I#39;d be interested in creating a quot;more limitedquot; generic function implementation based on this PEP, minus func_code rewriting and the other fancier items. Sadly I won#39;t have any bandwidth to work on it until January of next year.br brI#39;d vote for keeping this issue open because of that.br brbrdiv class=gmail_quoteOn Thu, Jul 22, 2010 at 5:45 AM, Antoine Pitrou span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; br Antoine Pitrou lt;a href=mailto:pit...@free.fr;pit...@free.fr/agt; added the comment:br br Generic functions are a lesser-known paradigm than OO, and nowhere do common Python documents (including the official docs) try to teach them. That means the first public appearance of generic functions in the stdlib should really be well thought out if we don#39;t want to encourage poor practices. I agree with Guido that a PEP is required to flesh out all the details.br br --br nosy: +pitroubr divdiv/divdiv class=h5br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue5135; target=_blankhttp://bugs.python.org/issue5135/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7989] Add pure Python implementation of datetime module to CPython
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17913/issue9206a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9333] Expose a way to enable os.symlink on Windows
New submission from Brian Curtin cur...@acm.org: As it currently stands, the possibility exists that some users might not have the SeCreateSymbolicLinkPrivilege privilege enabled (depending on security settings, corporate policy, etc). There should be some method of enabling that privilege outside of the way we do it in the tests (using ctypes). Attached is a quick prototype...no docs or tests yet. If you don't have the privilege enabled, os.enable_symlink() will attempt to enable it for you (True if successful, False if not). For the security conscious: The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges -- assignee: brian.curtin components: Extension Modules files: enable_symlink.diff keywords: patch messages: 111213 nosy: brian.curtin, eric.smith, jaraco priority: normal severity: normal status: open title: Expose a way to enable os.symlink on Windows type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18132/enable_symlink.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1396825] subprocess: wait for a period of time
Stefan Krah stefan-use...@bytereef.org added the comment: This is now being addressed in issue 5673, so closing this as a duplicate. astrand, please let me know if I'm wrong about this. -- nosy: +skrah resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Add timeout option to subprocess.Popen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1396825 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +gd2shoe, ragnar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1812] doctest _load_testfile function -- newline handling seems incorrect
Peter Donis peterdo...@alum.mit.edu added the comment: I don't normally run Windows, so it will take a little time for me to set up a Windows build environment. However, I've made a number of other improvements as a result of further testing on Linux, and I've uploaded the improved patch as doctest-fixes6.diff. When I apply this patch to a regular Python 2.7 installation on Windows (Windows 2000 running under VirtualBox on Linux), the tests pass (as well as on my Linux box when applied against the release27-maint SVN branch). Output from testing on Windows: C:\Python27\Lib\testpython test_doctest.py doctest (doctest) ... 66 tests with zero failures doctest (test.test_doctest) ... 443 tests with zero failures C:\Python27\Lib\testpython Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. Hopefully the improved patch will test OK on your box as well. If not, I'll work on testing it in a Windows build environment against an SVN checkout. Improvements in doctest-fixes6.diff: - Uses with statements to guard all file reads (in earlier patches writes were guarded but reads were not); - Saves and restores sys.path the same way as test_importhooks; - Checks for byte-compiled files in __pycache__ when deleting temporary files (this was in the py3k patch already, but reading PEP 3147 it looks like this feature may be backported to 2.7 as well); - Test setup/cleanup is now done in a TestFixture class, for clarity and because it's easier that way to store the original sys.path in the setup and restore it in the cleanup. -- Added file: http://bugs.python.org/file18133/doctest-fixes6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9330] assertIn should check for membership support before testing
Michael Foord mich...@voidspace.org.uk added the comment: No, assertIn is for testing for membership in a container. If you pass it something that isn't a container then it indicates an error in the test (or misuse of the assert!). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9330] assertIn should check for membership support before testing
Brian Curtin cur...@acm.org added the comment: I knew there was a reason I was thinking my whole idea was slightly ridiculous...duh. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9330 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1812] doctest _load_testfile function -- newline handling seems incorrect
Peter Donis peterdo...@alum.mit.edu added the comment: Uploaded revised diff against py3k branch, doctest-fixes6-py3k.diff, with same improvements as doctest-fixes6.diff. Tests still pass on my Linux box. -- Added file: http://bugs.python.org/file18134/doctest-fixes6-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes
Stefan Krah stefan-use...@bytereef.org added the comment: This thread contains a feature request for __int128_t support in icc and a workaround: http://software.intel.com/en-us/forums/showthread.php?t=56652 -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4130 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152248] Enhance file.readlines by making line separator selectable
Nick Coghlan ncogh...@gmail.com added the comment: On Fri, Jul 23, 2010 at 3:54 AM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: Personally, I think that this functionality should be built into Python's readlines. That's where a typical person would expect it to be, and this is something that is supported by most other scripting language I've used. Adding it to readline() and/or readlines() would modify the standard IO Abstract Base Classes, and would therefore probably need discussion on python-dev. That's also the reason why I'm suggesting a separate readrecords() method - the appropriate ABC should be able to implement it as a concrete method based on something like the recipe above. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1152248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
New submission from Anders Kaseorg ande...@mit.edu: Porting the a2x program to argparse from the now-deprecated optparse subtly breaks it when certain options are passed: $ a2x --asciidoc-opts --safe gitcli.txt $ ./a2x.argparse --asciidoc-opts --safe gitcli.txt usage: a2x [-h] [--version] [-a ATTRIBUTE] [--asciidoc-opts ASCIIDOC_OPTS] [--copy] [--conf-file CONF_FILE] [-D PATH] [-d DOCTYPE] [--epubcheck] [-f FORMAT] [--icons] [--icons-dir PATH] [-k] [--lynx] [-L] [-n] [-r PATH] [-s] [--stylesheet STYLESHEET] [--safe] [--dblatex-opts DBLATEX_OPTS] [--fop] [--fop-opts FOP_OPTS] [--xsltproc-opts XSLTPROC_OPTS] [-v] a2x: error: argument --asciidoc-opts: expected one argument Apparently argparse uses a heuristic to try to guess whether an argument looks like an argument or an option, going so far as to check whether it looks like a negative number (!). It should _never_ guess: the option was specified to take an argument, so the following argument should always be parsed as an argument. Small test case: import optparse parser = optparse.OptionParser(prog='a2x') parser.add_option('--asciidoc-opts', ... action='store', dest='asciidoc_opts', default='', ... metavar='ASCIIDOC_OPTS', help='asciidoc options') parser.parse_args(['--asciidoc-opts', '--safe']) (Values at 0x7f585142ef80: {'asciidoc_opts': '--safe'}, []) import argparse parser = argparse.ArgumentParser(prog='a2x') parser.add_argument('--asciidoc-opts', ... action='store', dest='asciidoc_opts', default='', ... metavar='ASCIIDOC_OPTS', help='asciidoc options') parser.parse_args(['--asciidoc-opts', '--safe']) usage: a2x [-h] [--asciidoc-opts ASCIIDOC_OPTS] a2x: error: argument --asciidoc-opts: expected one argument -- components: Library (Lib) messages: 111221 nosy: andersk priority: normal severity: normal status: open title: argparse does not accept options taking arguments beginning with dash (regression from optparse) versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9333] Expose a way to enable os.symlink on Windows
Jason R. Coombs jar...@jaraco.com added the comment: I think we should consider simply calling this function before running os.symlink. It would be nice if the API were as compatible as possible on both unix and Windows. My worry is that where code that works on unix systems is simply: os.symlink(...) But now to support symlinks on Windows, one must write: if hasattr(os, 'enable_symlink') and not os.enable_symlink(): raise WindowsError(...) os.symlink(...) Maybe instead of adding os.enable_symlink, Python should include the above logic before attempting to create a symlink and raise an exception if it fails? This would provide a consistent API across platforms for the most common use-case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Should the change also apply to Windows? on Windows, there is no configure phase, but the file PC/pyconfig.h is maintained manually. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
R. David Murray rdmur...@bitdance.com added the comment: It seems like reasonable request to me to be able to allow such arguments, especially since optparse did and we want people to be able to use argparse as a replacement. Though in general I find argparse's default behavior more useful. Since argparse has been released, I'm thinking this still has to be a feature request, since argparse is *not* a drop-in replacement for optparse. -- nosy: +bethard, r.david.murray stage: - unit test needed type: - feature request versions: -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9333] Expose a way to enable os.symlink on Windows
Brian Curtin cur...@acm.org added the comment: That's a way better idea. It would also cut down some of the code in Lib/test/symlink_support.py. I'll take a whack at that and see how it looks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9333] Expose a way to enable os.symlink on Windows
Eric Smith e...@trueblade.com added the comment: Wouldn't you have to set this, then restore it? This would then open a non thread-safe race condition, assuming this is a per-process setting, not a thread-local setting. Not that I'm necessarily opposed, but it's an issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9333 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Nelson Elhage nelh...@nelhage.com added the comment: For what it's worth, I have trouble seeing this as anything but a bug. I understand the motivation of trying to catch user errors, but in doing so, you're breaking with the behavior of every other option parsing library that I'm aware of, in favor of an arbitrary heuristic that sometimes guesses wrong. That's not the kind of behavior I expect from my Python libraries; I want them to do what I ask them to, not try to guess what I probably meant. -- nosy: +nelhage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Anders Kaseorg ande...@mit.edu added the comment: Though in general I find argparse's default behavior more useful. I’m not sure I understand. Why is it useful for an option parsing library to heuristically decide, by default, that I didn’t actually want to pass in the valid option that I passed in? Shouldn’t that be up to the caller (or up to the program, if it explicitly decides to reject such arguments)? Keep in mind that the caller might be another script instead of a user. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9173] logger statement not guarded in shutil._make_tarball
Fred L. Drake, Jr. fdr...@acm.org added the comment: Patch looks good, but needs a test. -- keywords: +easy nosy: +fdrake ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
Changes by Greg Brockman g...@ksplice.com: -- nosy: +gdb ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)
R. David Murray rdmur...@bitdance.com added the comment: Well, even if you call it a bug, it would be an argparse design bug, and design bug fixes are feature requests from a procedural point of view. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9334 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9329] freeze tool cannot handle JSON module properly
Sam Saint-Pettersen s.stpetter...@gmail.com added the comment: Problem occurs with frozen programs if: from encodings import hex_codec ...is not explicitly written in the script. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9329 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com