[issue8706] accept keyword arguments on most base type methods and builtins
Éric Araujo mer...@netwok.org added the comment: See also #13386 for the doc part. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8706 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8754] quote bad module name in ImportError-like messages
Éric Araujo mer...@netwok.org added the comment: With issue1559549 adding a 'name' argument, I'm going to push to have it gain a reasonable default __str__ if 'name' is set but nothing else. That patch also contains some helper functions which should simplify Eric's patch. Maybe you’re talking about my first patch? The latest one does not touch C code and I don’t see why it depends on the other bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14168] minidom behaves differently in 3.3 compared to 3.2
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The error which prompted this issue was not caused by external code peeking into the internals - it was just my toy test script which did that. The error came up in Django testing: == ERROR: test_secure_urls (regressiontests.syndication.tests.SyndicationFeedTest) -- Traceback (most recent call last): File /Users/vinay/projects/django3/tests/regressiontests/syndication/tests.py, line 255, in test_secure_urls if link.getAttribute('rel') == 'self': File /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/xml/dom/minidom.py, line 727, in getAttribute return self._attrs[attname].value TypeError: 'NoneType' object is not subscriptable So, perhaps there is a missing _ensure_attributes() call somewhere. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14168] minidom behaves differently in 3.3 compared to 3.2
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Upon inspection, _ensure_attributes() is only called in _get_attributes(), setAttributeNode() and _set_attribute_node(). The last of these is only called by setAttributeNode(), and it would appear that setAttributeNode() is only called if there *are* attributes. _get_attributes() is only called by writexml(). So, calls to public methods getAttribute(), getAttributeNS() and a few others are likely to fail because, if there are no attributes in the XML being processed, _ensure_attributes() wouldn't get called. It looks like a bug to me! ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14168] Bug in minidom 3.3 after optimization patch
Éric Araujo mer...@netwok.org added the comment: Agreed :) Needs unit tests that use the public attributes. -- keywords: +easy -3.2regression stage: - needs patch title: minidom behaves differently in 3.3 compared to 3.2 - Bug in minidom 3.3 after optimization patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14168 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14158] test_mailbox fails if file or dir named by support.TESTFN exists
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Is 2.7 not affected? It might be, but the code for regrtest looked somewhat different. I will revisit this once the buildbots have run for a few days with the 3.x changes, to confirm that they are OK. Marking as pending to remind me. -- status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14172] ref-counting leak in buffer usage in Python/marshal.c
New submission from Stefan Behnel sco...@users.sourceforge.net: Line 428 in Python/marshal.c calls pb-bf_releasebuffer() without dec-refing the view.obj field afterwards. I don't think this is really so truly performance critical that it can't accept the couple of nanoseconds that it takes to go through PyBuffer_Release() instead. -- components: Interpreter Core messages: 154755 nosy: scoder priority: normal severity: normal status: open title: ref-counting leak in buffer usage in Python/marshal.c type: behavior versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14170] print unicode string error in win8 cmd console
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Stefan Behnel sco...@users.sourceforge.net added the comment: Thanks Eli. What about the Lightweight DOM implementation, though? Following Martin's comment that performance characteristics (like fast, memory friendly or lightweight) should normally not be documented, I'm still suggesting to replace it with a less easily misinterpreted phrase like W3C DOM implementation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14128] _elementtree should expose types and factory functions consistently with ElementTree
Eli Bendersky eli...@gmail.com added the comment: Attaching a patch that exposes ET.Element as a type, instead of as a factory function. I'd really love to get a review for this, since I'm still relatively inexperienced when it comes to writing C extension code. -- keywords: +patch Added file: http://bugs.python.org/file24702/Element_class_issue14128.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14128 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13462] Improve code and tests for Mixin2to3
Changes by Eli Bendersky eli...@gmail.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13462 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14173] PyOS_FiniInterupts leaves signal.getsignal segfaulty
New submission from Ferringb ferri...@gmail.com: During Py_Finalize (pythonrun.c), it does the following: 1) suppress signal handling PyOs_FiniInterupts 2) clear caches 3) force gc collection; first for objects, then via wiping modules. The problem is that for unix OSs, Modules/signal.c's PyOs_FiniInterrupts leaves itself in a state where its internal Handlers are effectively reset to NULL, except the various functions don't properly handle that scenario. Attached is a test case demonstrating it; it segfaults on every python version I've tested (2.4-3.2; haven't tried 3.3). Since this *only* occurs during the final gc sweep when modules are destroyed, its a bit of a pain in the ass to detect that we're in that scenario, and that we must not touch signal.getsignal lest it segfault the interp. That said, def _SignalModuleUsable(): try: signal.signal(signal.SIGUSR1, signal.signal(signal.SIGUSR1, some_handler)) return True except (TypeError, AttributeError, SystemError): # we were invoked in a module cleanup context. return False does manage to poke the api just right so that it can be detected w/out segfaulting the interp. Finally, note that while folks could point at __del__... its not really at fault. Doing a proper weakref.ref finalizer can trigger the same- the fault is signal.c's PyOs_FiniInterrupts leaving the signal module in a bad state. For the testcase, I used __del__ just because it was quicker/less code to do so. -- components: Interpreter Core files: test.py messages: 154758 nosy: ferringb priority: normal severity: normal status: open title: PyOS_FiniInterupts leaves signal.getsignal segfaulty type: crash versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file24703/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Eli Bendersky eli...@gmail.com added the comment: Stefan, frankly I'm not familiar enough with either xml.dom or xml.dom.minidom to have a solid opinion at this point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Éric Araujo mer...@netwok.org added the comment: I think I’ve always understood “lightweight” to mean “minimal”. xml.dom provides minidom, a basic implementation, pulldom, a different implementation, and other libraries such as 4Dom are full-fledged implementations. So “lightweight” is not a problem to me (but I acknowledge that it might be misleading for other people), especially given that I think that DOM itself is not elegant or lightweight (as in “conceptually small”). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
New submission from Arnout van Meer rr2...@gmail.com: Reproduction case is attached and should speak for itself, but the short brief is that the argparse.REMAINDER behaviour is very inconsistent based on what (potentially) defined argument handlers come before it. Tested this on Python 2.7 on OS X, but also grabbed the latest argparse.py from hg to verify against this. -- components: Library (Lib) files: worker.py messages: 154761 nosy: rr2do2 priority: normal severity: normal status: open title: argparse.REMAINDER fails to parse remainder correctly type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Removed file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Added file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Added file: http://bugs.python.org/file24705/bug_argparse.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Removed file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Removed file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14174] argparse.REMAINDER fails to parse remainder correctly
Changes by Arnout van Meer rr2...@gmail.com: Added file: http://bugs.python.org/file24704/worker.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14174 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14175] broken links on /download/ page
New submission from Florent Xicluna florent.xicl...@gmail.com: The links for the latest RC are broken on the official page. http://www.python.org/download/ And the release page only list 3.2.3 rc1 and forget the other 3: http://www.python.org/download/releases/ -- messages: 154762 nosy: flox priority: normal severity: normal status: open title: broken links on /download/ page type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
New submission from Jean-Michel Fauth wxjmfa...@gmail.com: Now, that the PEP 414 has been accepted, I can only strongly recommend to fix the problem of unicode literals as a partial workaround. print u'abcœé€' abcé If these six characters are not rendered correctly, you shoud read: LATIN SMALL LETTER A LATIN SMALL LETTER B LATIN SMALL LETTER C LATIN SMALL LIGATURE OE LATIN SMALL LETTER E WITH ACUTE EURO SIGN It is not necessary to give here the list of the numerous libs that do not understand u'unicode literals' as shown above. (I wrote all my Py2 code in a u'unicode mode', and I know how hard it is to have to select between the u'' or unicode() variants. Face it. Python has never worked [*], Python does not work, Python will never work. More important, it is more than clear to me, there is no willingness to solve this issue. (The holy compatibilty with not working code). [*] Except the pure ASCII serie (Py 1.5) and the Python 3[0,1,2] serie. No offense. I'm pretty sure the creator of this PEP is not even able to type on his machine the list of the 42 characters supposed to be available it the typographies (plural) used by the different countries speaking French. The whole free/open source software disaster in all its splendor. Regards. jmf -- components: None messages: 154763 nosy: Jean-Michel.Fauth priority: normal severity: normal status: open title: Fix unicode literals (for PEP 414) versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: It occurs to me that one thing that *could* be backported to early versions are some of the documentation improvements on how to correctly handle the lifecycle of fields in Py_buffer. That gets messy though because memoryview doesn't behave nicely in those versions, so we'd be violating our own guidelines. Perhaps the relevant sections should be updated with a reference saying that the semantics have been cleaned up in 3.3, and if in doubt, try to follow the 3.3 documentation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Benjamin Peterson benja...@python.org added the comment: What exactly is the bug you're reporting? Python 2.7.2 (default, Oct 27 2011, 22:35:02) [GCC 4.5.3] on linux2 Type help, copyright, credits or license for more information. print u'abcœé€' abcœé€ -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14133] improved PEP 409 implementation
Changes by Patrick Westerhoff patrickwesterh...@gmail.com: -- nosy: +poke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Unicode -None nosy: +ezio.melotti type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Antoine Pitrou pit...@free.fr added the comment: I think I’ve always understood “lightweight” to mean “minimal”. Then how about saying minimal instead of lightweight? (also, it seems it really means incomplete or partial, which are of course less positive sounding) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Ezio Melotti ezio.melo...@gmail.com added the comment: Minimal sounds good to me, it also matches the name of the module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14173] PyOS_FiniInterupts leaves signal.getsignal segfaulty
Antoine Pitrou pit...@free.fr added the comment: I needed to modify the script to make it crash under 3.2/3.3. Attaching modified version. Here is the relevant part of the gdb traceback: Program received signal SIGSEGV, Segmentation fault. 0x0052b87b in signal_getsignal (self=module at remote 0x77f43a38, args=(1,)) at ./Modules/signalmodule.c:372 372 Py_INCREF(old_handler); Missing debug package(s), you should install: glibc-debug-2.12.1-11.3.mga1.x86_64 (gdb) bt #0 0x0052b87b in signal_getsignal (self=module at remote 0x77f43a38, args=(1,)) at ./Modules/signalmodule.c:372 #1 0x005f520b in PyCFunction_Call (func= built-in method getsignal of module object at remote 0x77f43a38, arg=(1,), kw=0x0) at Objects/methodobject.c:81 -- nosy: +haypo, pitrou versions: +Python 3.3 -Python 2.6, Python 3.1 Added file: http://bugs.python.org/file24706/sig.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14170] print unicode string error in win8 cmd console
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4080] unittest: display time of each test case
Ezio Melotti ezio.melo...@gmail.com added the comment: Because it looks like line noise and doesn't provide an useful information in most of the cases (at least for me), see e.g.: + test_format (__main__.MyTestCase) ... [0.000612s] skipped 'not supported in this library version' + test_nothing (__main__.MyTestCase) ... [0.000486s] skipped 'demonstrating skipping' + test_windows_support (__main__.MyTestCase) ... [0.90s] skipped 'requires Windows' It might still be useful to find the slowest test(s), or for test suites that take a long time (so I'm not opposed to having it as an option that can be enabled if needed), but for most of the tests it will just show an almost meaningless fraction of second. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14170] print unicode string error in win8 cmd console
STINNER Victor victor.stin...@gmail.com added the comment: It looks like a duplicate of the issue #11395 which has been fixed in Python 3.2.1, but not backported to Python 2.7. Can you please try your program with Python 3.2.1? And maybe also attach the whole test script? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4080] unittest: display time used by each test case
Éric Araujo mer...@netwok.org added the comment: Also, when you’re tracking down slow tests, you may want to run your tests with the time needed by each test file and then each test method. Nite that I don’t know of a way to have unittest print each test file to stdout now (i.e. a level of verbosity between “just one dot” and “each method”). -- title: unittest: display time of each test case - unittest: display time used by each test case versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Éric Araujo mer...@netwok.org added the comment: Right, patch for 3.2. Also edited the module docstring (info taken from the docstring of xml.dom). BTW I really think we could have avoided some verbosity by adding the recommendation to use xml.etree in the first paragraph of Doc/library/xml.dom.minidom.rst. -- Added file: http://bugs.python.org/file24707/minidom-desc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Éric Araujo mer...@netwok.org added the comment: s/Mininal/Minimal/ in the synopsis -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11379] Remove lightweight from minidom description
Stefan Behnel sco...@users.sourceforge.net added the comment: Yes, I think that's better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11379 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14172] ref-counting leak in buffer usage in Python/marshal.c
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. -- keywords: +patch nosy: +pitrou, skrah Added file: http://bugs.python.org/file24708/marshalbufs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14172] ref-counting leak in buffer usage in Python/marshal.c
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4080] unittest: display time used by each test case
Pawel Prokop pa...@uek.krakow.pl added the comment: I agree with Ezio, this feature should have an option to enable/disable. Anyway, I use it in different way. Since 2008, I've used this feature for performance comparision, whether some implementation changes in application code did not slow down application. Tests run after each commit. I compare execution time of particular test before and after commit. With additional scripts, I create metrics and charts using gnuplot to visualize how execution time of each test changed during the development. I can ensure the performance stability of the application. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14167] document return statement in finally blocks
Yury Selivanov yseliva...@gmail.com added the comment: Well, I guess the best place to put it would be http://docs.python.org/py3k/reference/compound_stmts.html#finally I've attached the patch, please take a look. If it's possible to make it more clear, feel free to rephrase it. But please include the example, this behaviour needs to be emphasized. -- keywords: +patch Added file: http://bugs.python.org/file24709/finally_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
New submission from Antoine Pitrou pit...@free.fr: marshal.loads('T') True marshal.loads(b'T') True Contrast with: marshal.load(io.BytesIO(b'T')) True marshal.load(io.StringIO('T')) Traceback (most recent call last): File stdin, line 1, in module TypeError: f.read() returned not bytes but str -- components: Extension Modules keywords: easy messages: 154778 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: marshal.loads accepts unicode strings type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14175] broken links on /download/ page
Georg Brandl ge...@python.org added the comment: I fixed the links on /download/ and added the other versions on /releases/. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14178] Failing tests for ElementTree
New submission from Stefan Behnel sco...@users.sourceforge.net: These are tests from lxml's ET compatibility test suite that now fail in ElementTree: def test_delslice_step(self): Element = self.etree.Element SubElement = self.etree.SubElement a = Element('a') b = SubElement(a, 'b') c = SubElement(a, 'c') d = SubElement(a, 'd') e = SubElement(a, 'e') del a[1::2] self.assertEquals( [b, d], list(a)) def test_delslice_step_negative(self): Element = self.etree.Element SubElement = self.etree.SubElement a = Element('a') b = SubElement(a, 'b') c = SubElement(a, 'c') d = SubElement(a, 'd') e = SubElement(a, 'e') del a[::-1] self.assertEquals( [], list(a)) def test_delslice_step_negative2(self): Element = self.etree.Element SubElement = self.etree.SubElement a = Element('a') b = SubElement(a, 'b') c = SubElement(a, 'c') d = SubElement(a, 'd') e = SubElement(a, 'e') del a[::-2] self.assertEquals( [b, d], list(a)) The error messages go like this: del a[1::2] ValueError: attempt to assign sequence of size 0 to extended slice of size 2 del a[::-1] ValueError: attempt to assign sequence of size 0 to extended slice of size 4 del a[::-2] ValueError: attempt to assign sequence of size 0 to extended slice of size 2 Additionally, I get this error: self.assertNotEquals(None, e.code) AttributeError: 'ParseError' object has no attribute 'code' for this test: required_versions_ET['test_feed_parser_error_position'] = (1,3) def test_feed_parser_error_position(self): ParseError = self.etree.ParseError parser = self.etree.XMLParser() try: parser.close() except ParseError: e = sys.exc_info()[1] self.assertNotEquals(None, e.code) self.assertNotEquals(0, e.code) self.assert_(isinstance(e.position, tuple)) self.assert_(e.position = (0, 0)) The complete test suite is here: https://github.com/lxml/lxml/blob/master/src/lxml/tests/test_elementtree.py -- components: Library (Lib), XML messages: 154780 nosy: scoder priority: normal severity: normal status: open title: Failing tests for ElementTree type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14178] Failing tests for ElementTree
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eli.bendersky, ezio.melotti, flox stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0
Joel Verhagen joel.verha...@gmail.com added the comment: There is a difference in what HTTPResponse.getheaders() returns. Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import httplib c = httplib.HTTPConnection('www.joelverhagen.com') c.request('GET', '/sandbox/tests/cookies.php') c.getresponse().getheaders() [('content-length', '0'), ('set-cookie', 'test_cookie1=foobar; expires=Fri, 02-Mar-2012 16:54:15 GMT, test_cookie2=barfoo; expires=Fri, 02-Mar-2012 16:54:15 GMT'), ('vary', 'Accept-Encoding'), ('server', 'Apache'), ('date', 'Fri, 02 Mar 2012 16:53:15 GMT'), ('content-type', 'text/html')] Python 3.2.2 (default, Sep 4 2011, 09:07:29) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. from http import client c = client.HTTPConnection('www.joelverhagen.com') c.request('GET', '/sandbox/tests/cookies.php') c.getresponse().getheaders() [('Date', 'Fri, 02 Mar 2012 16:56:40 GMT'), ('Server', 'Apache'), ('Set-Cookie', 'test_cookie1=foobar; expires=Fri, 02-Mar-2012 16:57:40 GMT'), ('Set-Cookie', 'test_cookie2=barfoo; expires=Fri, 02-Mar-2012 16:57:40 GMT'), ('Vary', 'Accept-Encoding'), ('Content-Length', '0'), ('Content-Type', 'text/html')] As you can see, in 2.7.2 HTTPResponse.getheaders() in 2.7.2 joins headers with the same name by , . In 3.2.2, the headers are kept separate and two or more 2-tuples. This causes problems if you convert the list of 2-tuples to a dict, because the keys collide (causing all but one of the values associated the non-unique keys to be overwritten). It looks like this problem is caused by using the email header parser (which keeps the keys and values as separate 2-tuples). In Python 2.7.2, the HTTPMessage.addheader(...) function does the comma-separating. Is this API change intentional? Should HTTPResponse.getheaders() comma-separate the values like the HTTPResponse.getheader(...) function (in both 2.7.2 and 3.2.2)? See also: https://github.com/shazow/urllib3/issues/3#issuecomment-3008415 -- nosy: +joel.verhagen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Martin v. Löwis mar...@v.loewis.de added the comment: What operating system and what terminal are you using? If Windows: what code page does your terminal run in? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14172] ref-counting leak in buffer usage in Python/marshal.c
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 185a6ae76479 by Antoine Pitrou in branch '3.2': Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). http://hg.python.org/cpython/rev/185a6ae76479 New changeset b1303cf15e01 by Antoine Pitrou in branch 'default': Issue #14172: Fix reference leak when marshalling a buffer-like object (other than a bytes object). http://hg.python.org/cpython/rev/b1303cf15e01 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14172] ref-counting leak in buffer usage in Python/marshal.c
Antoine Pitrou pit...@free.fr added the comment: Fixed. Apparently 2.7 isn't affected. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14172 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14179] Test coverage for lib/re.py
New submission from Florian M florian.mladit...@googlemail.com: I added one small test in lib/test/test_re.py for complete coverage of 're._compile' method. -- components: Tests files: re_coverage.patch keywords: patch messages: 154785 nosy: flomm priority: normal severity: normal status: open title: Test coverage for lib/re.py versions: Python 3.3 Added file: http://bugs.python.org/file24710/re_coverage.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14179 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14179] Test coverage for lib/re.py
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review type: - enhancement versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14179 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14179] Test coverage for lib/re.py
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review type: - enhancement versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14179 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Roger Serwy roger.se...@gmail.com added the comment: I tried your tk_hello.py code and it works on Python 3. The code for creating the QUIT button exceeds 80 columns. I'd insert a \n after the second argument: self.QUIT = tk.Button(self, text = QUIT, fg = red, command = root.destroy) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Roger Serwy roger.se...@gmail.com added the comment: I tried your tk_hello.py code and it works on Python 3. The code for creating the QUIT button exceeds 80 columns. I'd insert a \n after the second argument: self.QUIT = tk.Button(self, text = QUIT, fg = red, command = root.destroy) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14144] urllib2 HTTPRedirectHandler not forwarding POST data in redirect
Jay Deiman ad...@splitstreams.com added the comment: Senthil, The HTTPRedirectHandler is already breaking RFC2616 by it's own admission in the code comments (from the source): # Strictly (according to RFC 2616), 301 or 302 in response # to a POST MUST NOT cause a redirection without confirmation # from the user (of urllib2, in this case). In practice, # essentially all clients do redirect in this case, so we # do the same. # be conciliant with URIs containing a space I can definitely understand the issue with changing the default behavior to redirect the POST data. However, an added option which leaves the current behavior as the default shouldn't hurt. I'm submitting a new patch file (urllib2.py.redirect_option.patch), which will do exactly that. -- Added file: http://bugs.python.org/file24711/urllib2.py.redirect_option.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14144 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Terry J. Reedy tjre...@udel.edu added the comment: Do you know anything about spaces in the button text causing the addition of {bra ces}? I would prefer not to have to use an underscore in Hello_World. I fixed the long line and also updated pack calls pass options by name instead of a dict. -- Added file: http://bugs.python.org/file24712/tk_hello.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Changes by Terry J. Reedy tjre...@udel.edu: Removed file: http://bugs.python.org/file24693/tk_hello.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Roger Serwy roger.se...@gmail.com added the comment: Ah, that's subtle. There's a comma at the end of that [text] line which is making the string a one-element tuple. Removing it fixes the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Changes by Terry J. Reedy tjre...@udel.edu: Removed file: http://bugs.python.org/file24712/tk_hello.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14163] tkinter: problems with hello doc example
Terry J. Reedy tjre...@udel.edu added the comment: G, another but in the original ;-) Thank you! I will incorporate into the doc now. -- Added file: http://bugs.python.org/file24713/tk_hello.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: I deliberately hid the information about the used interactive interpreter; just to show you the experience of new Python user. (This is what I'm showing to potential Python devs who are interested in this tool; I know Python and use it since v. 1.5.6 as a non computer scientist). The interactive interpreter was: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type copyright, credits or license() for more information. In that precise case, it was Windws 7 Pro (Windows 7 Professionnel, in French because of a Swiss French version) and IDLE is just the IDLE an end user see after a fresh installation. I can ensure you, such a behaviour exists / existed on all Windows versions I used (from Win98, win2000, ...) with all the Python 2 versions since the unicode introduction. The technical reasons/aspects: sys.defaultencoding, non iso-8859-1 chars [#], *non working unicode literals*, sys.stdout.encoding = 'cp1252' and so on. [#] For those who do not know, one can not write text in French with Latin-1. Please do not take my aggressive (I recognize it), but sometimes necessary message badly. IDLE is not the cause, I use here IDLE to show as an example the disaster of code containing *unicode literals*. I'm not really happy to see this mess again in Py3.3 [†]; the key point beeing *unicode literals*. The Pandora's box is opened. [†] In fact, I will somehow never see or suffer from it. Decisions have been taken. jmf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Georg Brandl ge...@python.org added the comment: Well, let me soothe your mind then: in Python 3, '...' and u'...' will be absolutely equal, so you won't find any more mess with the changes from PEP 414. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
R. David Murray rdmur...@bitdance.com added the comment: Unless I'm misunderstanding, this is a duplicate of issue 1602. You will note that the problem is *not* with Python (or open source software in general), the problem is that Microsoft treats the command line as a second (or third, or fourth) class citizen. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6784] byte/unicode pickle incompatibilities between python2 and python3
Merlijn van Deen valhall...@gmail.com added the comment: And a complete patch that implements the tests, the python implementation and the C implementation. I'm not completely happy with the code duplication in read_string/read_binstring/read_short_binstring C implementation, so that might be an improvement (however, there is already a lot of code duplication there at the moment). Again: comments would be very welcome... -- Added file: http://bugs.python.org/file24714/pickle_bytestr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: Sorry, I neglected the most important information. Python 3.2 is working perfectly. It is simply impossible to create non valid strings (type/class 'str') from a keyboard. (non programmatically created). Like the limited characters set I used when I wrote my first program on a PDP-8. Porting Py 2 code was a child play. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals (for PEP 414)
R. David Murray rdmur...@bitdance.com added the comment: OK, so I still don't understand what problem it is you are reporting. What do you mean by can't craete non-valid strings? Of course you can't. (I don't see how you could do that programatically, either, although that depends heavily on your definition of non-valid.) Are you reporting that cmd.exe has no support for entering French characters? That wouldn't be a Python bug. Are you reporting that idle lacks the keyboard support for French? (I don't use Idle, so I don't know if that is true or not.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals
R. David Murray rdmur...@bitdance.com added the comment: I'm changing the title since PEP 414 has no bearing here. -- title: Fix unicode literals (for PEP 414) - Fix unicode literals ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14126] Speed up list comprehensions by preallocating the list where possible
Terry J. Reedy tjre...@udel.edu added the comment: I think this proposal should be rejected for three reasons. 1. I believe the idea is faulty in that it can only work if the single source iterable *has* a known length. The compiler cannot, in general, determine that and in practice seldom would be able to. For a comprehension within a function, the source typically is or depends on a passed arg. What happens if you replace 'range(1)' with 'iter(range(1))' in your patched version and rerun? As I remember, Guido has rejected the idea of iterators having length information because in general it is not possible. 2. It adds an opcode for an extremely limited case. In 3.x, there are list, set, dict, and generator expression-comprehensions. Many 2.x uses of list comprehensions are (can be, increasingly will be) replaced by one of the others. In particular, lists long enough for there to be a real time saving tend to be replaced by generator expressions if possible. 3. The relative time saving in this limited case is at best 16% (.9/5.7) in a toy 2.7 example. I suspect it would be less in the more complex 3.x implementation and know it would be less in any realistic example with a real, slower target expression (at minimum try '2*j+1' or 'float(j)') and a slower source producer (such as a file object). And to repeat, a source with millions of items will likely be processed an item at a time without creating an explicit list. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14141] 2.7.2 64-bit Windows library has __impt_Py* for several symbols instead of __imp__Py*
Terry J. Reedy tjre...@udel.edu added the comment: I am building and running 2.7.2 on 64-bit Win 7 from the repository but not linking to anything else. Please look at the 2.7.3 release candidate. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14141 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14146] IDLE: source line in editor doesn't highlight when debugging
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13882] PEP 410: Use decimal.Decimal type for timestamps
STINNER Victor victor.stin...@gmail.com added the comment: The PEP has been rejected, so I close the issue. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14126] Speed up list comprehensions by preallocating the list where possible
Raymond Hettinger raymond.hettin...@gmail.com added the comment: This seems like a reasonable optimization to me. -- assignee: rhettinger - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14169] compiler.compile fails on if statement in attached file
Terry J. Reedy tjre...@udel.edu added the comment: Please provide a *minimal* example that exhibits the problem. 'Minimal' means that if a single line is removed, the problem disappears. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14169 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13981] time.sleep() should use nanosleep() if available
STINNER Victor victor.stin...@gmail.com added the comment: The PEP 410 has been rejected, so I close the issue. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 67d9595a833c by Victor Stinner in branch 'default': Issue #13964: signal.sigtimedwait() timeout is now a float instead of a tuple http://hg.python.org/cpython/rev/67d9595a833c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals
Terry J. Reedy tjre...@udel.edu added the comment: As I explained to J-M when he posted much the same to python-list, Idle's French keyboard support is faulty because tcl/tk's French keyboard support is faulty. A patch for this was recently applied to tcl/tk. I hope it will be in a released version that we can incorporate in 3.3. I am sure we all wish that Microsoft (and Apple) would take more of a lead in moving to a one Unicode world from a 200 encodings and codepages world. I am sometimes as frustrated at the current situation as J-M. But unless he can identify a valid *Python* bug, we should close this. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: You do not get it or I do not explain it correctly. I do not care if Py 3.3 accepts '...' ou u'...'. I'm only affraid, Py 3.3 is suffering from the same non working behaviour Python 2 is suffering. I have seen so many things... I can only use an Py2/Py3 analogy, the types beeing differnt. In Python 2, the u'...' and the unicode('...', 'coding') are not equivalent. This leads and has lead to a lot of non working code. unicode() is always working, while u'...' may not work. A lot of libs, are accepting unicode() and are failing in having to accept u'...'. That would mean in Python 3, '...' works and u'...' will not work. Once again, an *illustration* with IDLE / Py2. import unicodedata as ud for c in u'abc需': print ud.name(c) LATIN SMALL LETTER A LATIN SMALL LETTER B LATIN SMALL LETTER C LATIN SMALL LETTER E WITH ACUTE Traceback (most recent call last): File pyshell#3, line 2, in module print ud.name(c) ValueError: no such name # but import sys for c in unicode('abc需', sys.stdout.encoding): print ud.name(c) LATIN SMALL LETTER A LATIN SMALL LETTER B LATIN SMALL LETTER C LATIN SMALL LETTER E WITH ACUTE LATIN SMALL LIGATURE OE EURO SIGN A course, this is actually a no problem with Py 3. I know nothing about the internal of Python. I have however noticed this guilty behaviour happen especially with non iso-8859-1 chars, valid byte string chars but equivalent chars with unicode code point 255. Infortunately, all these chars which are so important in French. (I heared about similar problems with the mac-roman coding. I do not know the status). So, if this (u'...') works in Py 3.3, the problem can be considered as solved. At least you have been informed about this potential issue. It still remains that this is a serious problem on Py 2. jmf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14176] Fix unicode literals
Terry J. Reedy tjre...@udel.edu added the comment: That would mean in Python 3, '...' works and u'...' will not work. You misunderstand the PEP: in 3.3, '...' and u'...' will be *exactly* the same. The only change is that the interpreter will ignore the u prefix instead of raising SyntaxError. It will be as if 'u' were not there. The only purpose is to let 2.x code run in 3.x without requiring the user to erase the 'u'. I can see how you could misunderstand and think that the 'u' prefix must have some meaning. But is does not. The addition is a bit controversial but Guido approved it with the expectation that it will encourage more conversion of 2.x libraries to run on 3.3. In any case, the tracker is not the place for further discussion of the value of the PEP. Once again, an *illustration* with IDLE / Py2. ... Of course, this is actually a no problem with Py 3. ... It still remains that this is a serious problem on Py 2. We are painfully aware that 2.x has problems with unicode. You do not need to tell us. I believe that most of the problems that could be sensibly fixed in 2.x have been fixed. 3.0 fixed more problems by changing the language. 3.3 fixes still more problems by changing the internal implementation of unicode, along with the C api, and the meaning of the language on some systems. People who want to avoid all the problems that have been fixed should use 3.3 either from the repository or when it is released. So, if this (u'...') works in Py 3.3, the problem can be considered as solved. I am glad you agree and I will close the issue. Please use python-list for any further discussion or questions. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
guilherme-pg guilherme.p.g...@gmail.com added the comment: The attached patch attempts to solve the issue. It makes sure marshal.loads only accepts objects conforming to the buffer protocol, updates the documentation for the method accordingly, adds a test case and updates existing test cases that rely on this issue. Please excuse any obvious mistakes in the patch, this is my first contribution and I'll be glad to iterate until it's good. -- keywords: +patch nosy: +guilherme-pg Added file: http://bugs.python.org/file24715/14177-marshal-loads-deny-strings.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14161] python2 file __repr__ does not escape filename
Philip Jenvey pjen...@underboss.org added the comment: I think you want to decref the result of PyObject_Repr after the fact, too -- nosy: +pjenvey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14161 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
New submission from STINNER Victor victor.stin...@gmail.com: There are various ways to convert a Python int/float to a C time_t, timeval or timespec structure. Attached patch factorize code by adding functions to convert a Python object to a C type (time_t, timeval or timespec). My patch changes how datetime rounds microsecond: round towards zero instead of rounding to nearest with ties going away from zero. I chose this rounding method because it is the method used by int(float) and int(time.time()) is a common in programs (more than round(time.time()). Rounding towards zero avoids also producing timestamps in the future. On overflow, an OverflowError is now raises instead of a ValueError. I prefer OverflowError over ValueError because it is an implementation detail. For example, time_t is 32 bits on Linux 32 bits, 64 bits on Linux 64 bits or on Windows (32 or 64 bits). PyTime_ObjectToXXX() functions are part of Python and so can be used by the posix, time, datetime and select modules. The patch removes _time.c, _time.h and timefunc.h because these files were only used for one function (_PyTime_DoubleToTime_t) which is no more used and it required to link a module to _time.c to get this function. -- If it is a problem to replace ValueError with OverflowError for backward compatibility, it is easy to adapt the patch to raise ValueError instead. timedelta*float and timedelta/float rounding method may also be changed. -- components: Library (Lib) files: pytime.patch keywords: patch messages: 154811 nosy: belopolsky, georg.brandl, gregory.p.smith, haypo priority: normal severity: normal status: open title: Factorize code to convert int/float to time_t, timeval or timespec versions: Python 3.3 Added file: http://bugs.python.org/file24716/pytime.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()
STINNER Victor victor.stin...@gmail.com added the comment: I created the issue #14180 to prepare a refactoring before changing os.*utime*() functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()
Larry Hastings la...@hastings.org added the comment: Um, doesn't the rejection of PEP 410 mean this should be discontinued? -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()
STINNER Victor victor.stin...@gmail.com added the comment: Um, doesn't the rejection of PEP 410 mean this should be discontinued? There is an issue in shutil.copystat() on copying the timestamp: in this specific use case, we need nanosecond resolution. Guido proposes (in a private mail thread) to add st_atime_ns, st_mtime_ns, st_ctime_ns fields to os.stat() and make os.*utime*() functions accept a (sec, nsec) tuple. It would still be possible to pass a number or seconds as an int or float. I plan to implement this request. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13550] Rewrite logging hack of the threading module
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8ec51b2e57c2 by Victor Stinner in branch 'default': Close #13550: Remove the debug machinery from the threading module: remove http://hg.python.org/cpython/rev/8ec51b2e57c2 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept (sec, nsec), drop os.futimens()
Changes by STINNER Victor victor.stin...@gmail.com: -- title: os.utimensat() and os.futimes() should accept Decimal, drop os.futimens() - os.utimensat() and os.futimes() should accept (sec, nsec), drop os.futimens() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
Antoine Pitrou pit...@free.fr added the comment: Thank you. The patch looks almost perfect, just one nit: apparently you changed the documentation for marshal.dumps. Is that intended? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14171] warnings from valgrind about openssl as used by CPython
Martin v. Löwis mar...@v.loewis.de added the comment: Why are you reporting this issue here? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14171 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
guilherme-pg guilherme.p.g...@gmail.com added the comment: Oops, sorry, that was unintended. I uploaded a new version of the patch with the correct documentation update, making it explicit that loads() expects a bytes object. -- Added file: http://bugs.python.org/file24717/14177-marshal-loads-deny-strings-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
Antoine Pitrou pit...@free.fr added the comment: Thank you! What is your full name, for credits? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
guilherme-pg guilherme.p.g...@gmail.com added the comment: Guilherme Gonçalves guilherme.p.g...@gmail.com Thanks for the quick review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14169] compiler.compile fails on if statement in attached file
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14169 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4966907d3661 by Antoine Pitrou in branch '3.2': Issue #14177: marshal.loads() now raises TypeError when given an unicode string. http://hg.python.org/cpython/rev/4966907d3661 New changeset e67b3a9bd2dc by Antoine Pitrou in branch 'default': - Issue #14177: marshal.loads() now raises TypeError when given an unicode http://hg.python.org/cpython/rev/e67b3a9bd2dc -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14177] marshal.loads accepts unicode strings
Antoine Pitrou pit...@free.fr added the comment: I've committed the patch in 3.2 and 3.3. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14177 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14171] warnings from valgrind about openssl as used by CPython
Zooko O'Whielacronx zo...@zooko.com added the comment: Oh, I'm sorry I didn't make that clear at first. First of all, so that others who encounter these warnings can see how I worked-around them so that they can do that as well. Second, because Python comes with a valgrind suppressions file. Here is a patch to that file to suppress these warnings. --- a/Misc/valgrind-python.supp Wed Feb 22 00:28:46 2012 +0100 +++ b/Misc/valgrind-python.supp Fri Mar 02 20:31:55 2012 -0700 @@ -286,6 +286,38 @@ ### fun:MD5_Update ###} +# Fedora's package openssl-1.0.1-0.1.beta2.fc17.x86_64 on x86_64 +# See http://bugs.python.org/issue14171 +{ + openssl 1.0.1 prng 1 + Memcheck:Cond + fun:bcmp + fun:fips_get_entropy + fun:FIPS_drbg_instantiate + fun:RAND_init_fips + fun:OPENSSL_init_library + fun:SSL_library_init + fun:init_hashlib +} + +{ + openssl 1.0.1 prng 2 + Memcheck:Cond + fun:fips_get_entropy + fun:FIPS_drbg_instantiate + fun:RAND_init_fips + fun:OPENSSL_init_library + fun:SSL_library_init + fun:init_hashlib +} + +{ + openssl 1.0.1 prng 3 + Memcheck:Value8 + fun:_x86_64_AES_encrypt_compact + fun:AES_encrypt +} + # # All of these problems come from using test_socket_ssl # -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14171 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14178] Failing tests for ElementTree
Eli Bendersky eli...@gmail.com added the comment: I can confirm that this indeed fails for the C implementation, while succeeding for the Python implementation. The C implementation doesn't appear to support extended slices for getting and setting items. Looking into it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14178] Failing tests for ElementTree
Eli Bendersky eli...@gmail.com added the comment: Correction: extended slices are supported. The problem appears to be just with 'del', because element_ass_subscr doesn't treat it specially and thinks we just want to assign a 0-len value to a non-0-len slice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14178 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14065] Element should support cyclic GC
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14065 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com