[issue16979] Broken error handling in codecs.unicode_escape_decode()
New submission from Serhiy Storchaka: An error handler in unicode_escape_decode() eats at least one byte (or more) after illegal escape sequence. import codecs codecs.unicode_escape_decode(br'\u!@#', 'replace') ('�', 5) codecs.unicode_escape_decode(br'\u!@#$', 'replace') ('�@#$', 6) raw_unicode_escape_decode() works right: codecs.raw_unicode_escape_decode(br'\u!@#', 'replace') ('�!@#', 5) codecs.raw_unicode_escape_decode(br'\u!@#$', 'replace') ('�!@#$', 6) See also issue16975. -- assignee: serhiy.storchaka components: Unicode messages: 180077 nosy: ezio.melotti, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Broken error handling in codecs.unicode_escape_decode() type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16979 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16975] Broken error handling in codecs.escape_decode()
Serhiy Storchaka added the comment: See also issue16979. -- assignee: - serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9501] Logging shutdown regressions with weakrefs
Vinay Sajip added the comment: Thanks for hunting these down. With the latest version, neither variant of the teardown script produces any error message on my system, either with 3.3 or 3.4 (default). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Roundup Robot added the comment: New changeset 733bb4fd9888 by Stefan Krah in branch '3.3': Issue #16422: Use strings for rounding mode constants for better readability http://hg.python.org/cpython/rev/733bb4fd9888 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9501] Logging shutdown regressions with weakrefs
Xavier de Gaye added the comment: Yes, my last two messages refer to python 3.3.0 only. The changes logged in http://bugs.python.org/issue9501#msg180039 do fix the behavior of both versions of teardown_module.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16975] Broken error handling in codecs.escape_decode()
Serhiy Storchaka added the comment: Here is a patch which fixes error handling in codecs.escape_decode(). codecs.escape_decode(r'[\x1]\x2', 'replace') (b'[?]?', 8) New tests for escape_decode() added. -- keywords: +patch nosy: +doerwalter, lemburg stage: needs patch - patch review Added file: http://bugs.python.org/file28749/escape_decode_error_handling.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16975] Broken error handling in codecs.escape_decode()
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28750/escape_decode_error_handling-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16974] when python -c command does a traceback, it open the file string
R. David Murray added the comment: Ideally there would be an unambiguous way to know if the object came from a file or some other source (say, __file__ is None and another special attribute gives the clue to the actual source), but that's not the way things work now, and for backward compatibility reasons I doubt that we can change it. I'm sure there are programs that depend on at least 'string', if not some of the other places where a similar thing is done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16974] when python -c command does a traceback, it open the file string
R. David Murray added the comment: Hmm. A backward compatible fix would be to add an attribute that indicates whether or not the __file__ attribute is supposed to be pointing to a real file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Stefan Krah added the comment: In the version I committed the string constants are interned, so anything but legacy strings should be reasonably fast. -- assignee: - skrah components: +Extension Modules resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16974] when python -c command does a traceback, it open the file string
Ramchandra Apte added the comment: +1 On 16 January 2013 17:43, R. David Murray rep...@bugs.python.org wrote: R. David Murray added the comment: Ideally there would be an unambiguous way to know if the object came from a file or some other source (say, __file__ is None and another special attribute gives the clue to the actual source), but that's not the way things work now, and for backward compatibility reasons I doubt that we can change it. I'm sure there are programs that depend on at least 'string', if not some of the other places where a similar thing is done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16974 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5773] Crash on shutdown after os.fdopen(2) in debug builds
Ramchandra Apte added the comment: Though it may be valid in Python 2.7 still. On 16 January 2013 10:53, Ramchandra Apte rep...@bugs.python.org wrote: Ramchandra Apte added the comment: Is this still valid because this seems fixed in latest Python 3.4 tip. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5773 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10701] Error pickling a dict
Charles-François Natali added the comment: It's interesting. The example behaves unstable on 3.3+ with C implementation of picle, sometimes works, sometimes fails. With Python implementation and on 3.2 it works always. On 2.7 it fails always. That's hash randomization. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10701 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16980] SystemError in codecs.unicode_escape_decode()
New submission from Serhiy Storchaka: import codecs codecs.unicode_escape_decode(b'\\\x80') Traceback (most recent call last): File stdin, line 1, in module SystemError: invalid maximum character passed to PyUnicode_New -- assignee: serhiy.storchaka components: Unicode keywords: 3.3regression messages: 180089 nosy: ezio.melotti, serhiy.storchaka priority: high severity: normal stage: needs patch status: open title: SystemError in codecs.unicode_escape_decode() type: crash versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16980] SystemError in codecs.unicode_escape_decode()
Serhiy Storchaka added the comment: Here is a fix. The complete test suite will be in issue16979. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file28751/unicode_escape_decode_escaped_nonascii.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16979] Broken error handling in codecs.unicode_escape_decode()
Serhiy Storchaka added the comment: Here is a patch for 3.4. Patches for other versions will be different a lot. -- dependencies: +SystemError in codecs.unicode_escape_decode() keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file28752/unicode_escape_decode_error_handling-3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16979 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3585] pkg-config support
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16981] ImportError hides real error when there too many open files during an import
New submission from Brian Sutherland: When running Python inside PostgreSQL using plpython on OSX 10.7.5 I started coming across very strange and apparently random ImportErrors. For example, failing to find the stat module while importing site: Traceback (most recent call last): File /Users/jinty/.buildout/eggs/setuptools-0.6c11-py2.7.egg/site.py, line 73, in module __boot() File /Users/jinty/.buildout/eggs/setuptools-0.6c11-py2.7.egg/site.py, line 2, in __boot import sys, imp, os, os.path File /Users/jinty/src/mp/lib/python2.7/os.py, line 49, in module import posixpath as path File /Users/jinty/src/mp/lib/python2.7/posixpath.py, line 15, in module import stat ImportError: No module named stat I debugged this by using PYTHONVERBOSE and modifying import.c with the attached patch. I found that stat.py was not found because fopen() failed with Too many open files. There were not enough open files because OSX has insanely low limits and PostgreSQL was using a large chunk of that. ulimit -n 4096 resolved the errors. I spent a LOT of time trying to figure that out (see the thread at http://www.postgresql.org/message-id/20130114163014.GA600@Brians-MacBook-Air.local). The bug I wish to report is that the real error (Too many open files) is hidden by ImportError: No module named stat. For anyone who does not want to modify import.c and rebuild python, it is almost impossible to figure out what is really happening. -- files: patch-Python-import.c.diff keywords: patch messages: 180092 nosy: jinty priority: normal severity: normal status: open title: ImportError hides real error when there too many open files during an import type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28753/patch-Python-import.c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16981] ImportError hides real error when there too many open files during an import
R. David Murray added the comment: I wonder if importlib replicates this behavior, it may need fixing as well. -- nosy: +brett.cannon, eric.snow, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16982] _ssl not built --without-threads
New submission from Stefan Krah: _ssl is not built on the Fedora buildbot: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/3798/steps/test/logs/stdio building '_ssl' extension gcc -fPIC -Wno-unused-result -g -O0 -Wall -Wstrict-prototypes -I./Include -I. -IInclude -I/usr/local/include -I/home/buildbot/buildarea/3.x.krah-fedora/build/Include -I/home/buildbot/buildarea/3.x.krah-fedora/build -c /home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.c -o build/temp.linux-x86_64-3.4-pydebug/home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.o /home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.c: In function ‘_servername_callback’: /home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.c:2398:5: warning: implicit declaration of function ‘PyGILState_Ensure’ [-Wimplicit-function-declaration] /home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.c:2403:9: warning: implicit declaration of function ‘PyGILState_Release’ [-Wimplicit-function-declaration] gcc -shared build/temp.linux-x86_64-3.4-pydebug/home/buildbot/buildarea/3.x.krah-fedora/build/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-3.4-pydebug/_ssl.cpython-34dm.so *** WARNING: renaming _ssl since importing it failed: build/lib.linux-x86_64-3.4-pydebug/_ssl.cpython-34dm.so: undefined symbol: PyGILState_Release Python build finished, but the necessary bits to build these modules were not found: _lzma _multiprocessing To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _ssl -- components: Extension Modules messages: 180094 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: _ssl not built --without-threads type: compile error versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1483 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2175] Expat sax parser silently ignores the InputSource protocol
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: docs@python - serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16981] ImportError hides real error when there too many open files during an import
Brett Cannon added the comment: A quick trace through importlib._bootstrap through hg.python.org would suggest that the OSError would propagate when accessing source (OSError is swallowed when you try and write bytecode, but that's legitimate semantics). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16893] Create IDLE help.txt from Doc/library/idle.rst
Zachary Ware added the comment: Sorry, I wasn't as clear as I meant to be in my last message, I was suddenly rushed and didn't realize I'd left out what I meant to say, which was: Now that Andrew has committed Todd's fix to issue 5066, idle.rst and help.txt are very well-aligned. I believe the transition could be made now with no negative impact on the quality or usefulness of help.txt. Here now is a patch to Doc/Makefile and Doc/make.bat to add an 'idledoc' target. I haven't been able to test the Makefile change yet, but as it's a direct quote of your suggestion (with correction), Georg, I figure it ought to work :). I have tested the make.bat change, though, and it works well for me. -- Added file: http://bugs.python.org/file28754/issue16893_makefiles.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13028] python wastes linux users time by checking for dylib on each dynamic library load
Brett Cannon added the comment: Since this has been pending for over two months I'm claiming it's outdated. -- resolution: - out of date status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4347] Circular dependency causes SystemError when adding new syntax
Brett Cannon added the comment: Since this has been sitting here for two months as pending I'm closing as won't fix since mucking with the grammar is such a rarity and getting the build rules right is so complicated it isn't worth changing. -- resolution: - wont fix status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10535] Enable warnings by default in unittest
Brett Cannon added the comment: Ezio, do you want to create separate issues for any of the TODOs you wanted in http://bugs.python.org/issue10535#msg122779 so we can close this bug? -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10535] Enable warnings by default in unittest
Changes by Brett Cannon br...@python.org: -- status: pending - open versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11729] libffi assembler relocation check is not robust, fails with clang
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Antoine Pitrou added the comment: It doesn't actually fix the bug and makes hash inconsistent with cmp. The only constraint is that a == b imply hash(a) == hash(b). But the converse doesn't have to be true, i.e. if it perfectly possible to have hash(a) == hash(b) and a != b (pretty much by definition of a hash function, actually). What Brett's change means is that the hash function isn't as fine-grained as it could be, but I'm not sure it's very important for code objects. Of course, that Brett's commit doesn't fix the original bug (if confirmed) is a more annoying issue :-) -- nosy: +brett.cannon, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Antoine Pitrou added the comment: Woops, I saw Brett unnosied himself, sorry for nosying him by mistake. -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12939] Add new io.FileIO using the native Windows API
Guido van Rossum added the comment: Just a note of support for Richard -- having I/O use the native APIs directly rather than via emulation or other wrappers is a good idea, because the emulations / wrappers usually add restrictions that are not present in the native API. This is also the reason why we dropped going through stdio -- it did not give enough control over buffering and made integration with (UNIX native) file descriptors complex. Integration with native I/O primitives on Windows seems sense in the light of e.g. PEP 3156. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11729] libffi assembler relocation check is not robust, fails with clang
Stefan Krah added the comment: In 3.3 libffi has been updated to 3.0.11. Our clang buildbot does not show this particular warning, but still fails to compile libffi: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%203.3/builds/320/steps/compile/logs/stdio It would help if you provided a link to the upstream patch. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16893] Create IDLE help.txt from Doc/library/idle.rst
Georg Brandl added the comment: I did test the Makefile change, so this should be good to go. I'll upate PEP 101 once it's in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11729] libffi assembler relocation check is not robust, fails with clang
Ismail Donmez added the comment: See http://sourceware.org/ml/libffi-discuss/2011/msg00024.html for the libffi patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10535] Enable warnings by default in unittest
Changes by Brett Cannon br...@python.org: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10535 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Brett Cannon added the comment: Making as pending for someone to prove my fix is bad for the problem (since it passes an explicit test), else I will close it in the near-ish future. -- nosy: +brett.cannon status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10590] Parameter type error for xml.sax.parseString(string, ...)
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16978] fix grammar in 'threading' documentation
New submission from Tshepang Lekhonkhobe: Also, sentence starting with Due to the does not flow so nice for me... maybe a comma is needed after CPython? -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16978 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16983] header parsing could apply postel's law to encoded words inside quotes
New submission from R. David Murray: It has come to my attention that at least some mail agents apply postel's law to addresses like the following: From: =?utf-8?Q?not_really_valid?= f...@example.com Since encountering something that looks like an encoded word but that is not is a very unlikely occurrence, we could go ahead and decode such strings, resulting in not really valid f...@example.com a defect would be registered, and some sort of 'strict' policy mode could refuse to do the decode (as well as several other non-compliant patterns, such as encoded words not separated by whitespace). I think the decoding should be the default, though. This applies also to other headers where words or phrases can be quoted, such as in filenames. I have also encountered the quoted-encoded-word-as-filename in the wild. -- components: email messages: 180108 nosy: barry, r.david.murray priority: normal severity: normal stage: needs patch status: open title: header parsing could apply postel's law to encoded words inside quotes type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12758] time.time() returns local time instead of UTC
Craig McQueen added the comment: Alexander Belopolsky wrote: No. Seconds since the epoch is neither local nor UTC. It is just an elapsed number of seconds since an agreed upon time called the epoch. This statement just seems wrong. And I have just been confused by the current documentation, hence finding this issue. In what timezone is the epoch? It makes a difference. It seems with the current behaviour, the epoch is _in the local timezone_. So I reckon the documentation is unclear, because the way I read it, I interpretted it to mean UTC. I think it does need to state in local time. However, what I'd really prefer is a new function that returns the seconds since the epoch in UTC. -- nosy: +cmcqueen1975 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12758] time.time() returns local time instead of UTC
Antoine Pitrou added the comment: It makes a difference. It seems with the current behaviour, the epoch is _in the local timezone_. No it isn't. Two different machines: $ LANG=C date Wed Jan 16 21:47:03 UTC 2013 $ python -c import time; print(time.time()) 1358372827.5 $ LANG=C date Wed Jan 16 22:47:21 CET 2013 $ python -c import time; print(time.time()) 1358372848.2 time.time() *is* timezone-independent. Now to your question: However, what I'd really prefer is a new function that returns the seconds since the epoch in UTC. epoch = datetime(1970, 1, 1) (datetime.utcnow() - epoch).total_seconds() 1358372978.448235 time.time() 1358372980.176238 -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16984] idle problem with dark color schemes in kde
New submission from Sureyya Sahin: I am trying to use IDLE in kde linux environment (kubuntu 12.10). I recently switched to a dark color scheme from kde settings and discovered that IDLE is having issues with dark colors. The Completions boxes are not readable, after I switched to the dark color scheme in kde. The completions are white text on white background colored boxes which is making the text unreadable. If I select the options in the completions dialog box, my selection is highlighted and thus I can read the text. -- components: IDLE files: snapshot-idle.png messages: 180111 nosy: sahin priority: normal severity: normal status: open title: idle problem with dark color schemes in kde type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file28755/snapshot-idle.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Roundup Robot added the comment: New changeset 6d06b223c664 by Frank Wierzbicki in branch '2.7': Closed #16886: test_dictcomps no longer depends on dict order http://hg.python.org/cpython/rev/6d06b223c664 New changeset c7dfc307b88e by Frank Wierzbicki in branch '3.2': Closed #16886: test_dictcomps no longer depends on dict order http://hg.python.org/cpython/rev/c7dfc307b88e New changeset 8ab5bd5f95b3 by Frank Wierzbicki in branch '3.3': #16886: merge with 3.2 http://hg.python.org/cpython/rev/8ab5bd5f95b3 New changeset d0cef6c90efc by Frank Wierzbicki in branch 'default': #16886: merge with 3.3 http://hg.python.org/cpython/rev/d0cef6c90efc -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12758] time.time() returns local time instead of UTC
R. David Murray added the comment: On linux/posix, the epoch is *defined* to be 1970, 1, 1 in UTC. Python just uses whatever the OS defines the epoch to be, as far as I know. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11729] libffi assembler relocation check is not robust, fails with clang
Roundup Robot added the comment: New changeset 190a115b7748 by Stefan Krah in branch '3.3': Issue #11729: Backport commit bff052d9 from libffi upstream in order to fix http://hg.python.org/cpython/rev/190a115b7748 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11729] libffi assembler relocation check is not robust, fails with clang
Stefan Krah added the comment: Thanks for the link. The diff was committed last week to the upstream libffi development tree, so I backported it. -- assignee: - skrah resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2226] Small _abcoll Bugs / Oddities
Changes by Daniel Stutzbach stutzb...@google.com: -- assignee: stutzbach - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2226 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16795] Patch: some changes to AST to make it more useful for static language analysis
Sven Brauch added the comment: I think I got it mostly working now (it was quite simple in fact), but there's one issue which I can't seem to solve. This fails: compile(ast.parse(def fun(): pass), file, exec) Traceback (most recent call last): File stdin, line 1, in module TypeError: required field arg missing from arg However, this succeeds: compile(ast.parse(def fun(*va, **kwa): pass), file, exec) code object module at 0x7fb390323780, file file, line 1 The reason is quite simple: vararg and kwarg are optional in arguments, but they're of type arg, and arg has mandatory attributes (arg, the name of the argument). Still, when calling ast.parse(), Python creates attributes called vararg, kwarg on the attributes object, which are set to None: ast.parse('def fun(): pass').body[0].args.vararg.__repr__() 'None' Thus, when in compile(), the code in Python_ast.c does if ( _PyObject_HasAttrId(obj, PyId_vararg) ) { ... } this check says yes there's a vararg altough there really is none, which leads to the above error message. I checked the asdl file, and in fact I think this is a general issue, which was not noticed so far, since only things without mandatory attributes are used in conjunction with the question mark ? operator there (expr and the integral types identifier, int...). Is this correct? An easy way to solve this problem would be to check whether the attribute is None in Python_ast.c, but I'm everything but sure this is the correct way to fix this. Alternatively, one could not create the attributes on the ast objects when they're not present in the parsed code (i.e. leave the vararg attribute nonexistent instead of setting it to none). What should I do about this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15436] __sizeof__ is not documented
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15436 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Eugene Toder added the comment: My comment will make more sense if you follow the links that I provided. Brett's check-in (http://hg.python.org/cpython-fullhistory/rev/8127a55a57cb) says that it fixes bug #1190011 (http://www.mail-archive.com/python-bugs-list@python.org/msg02440.html). The bug claims that: def f(): return ((lambda x=1: x), (lambda x=2: x)) f1, f2 = f() id(f1.func_code) != id(f2.func_code) The above does not hold true. It should according to test_compile (reported in HEAD as bug #1048870). Certainly comparing co_firstlineno can't fix this, as both lambdas are defined at the same line. There are some more comments by Nick Coghlan on that bug, but I can't find anything clearly stating what the problem is believed to be and what the resolution is. I understand the reason for Brett's fix and why fixing 1190011 literally is not required. The issue was strange debugger/profiler/etc behavior with identical lambdas defined on _different_ lines. Since python tools typically have line resolution (e.g. debugger doesn't know column position of the current statement), merging lambdas defined on the same line is mostly invisible, and does not cause problems. So to clarify my opening comment -- this is mostly a documentation issue. The only documentation for the behavior of code cmp is the comment in Include/code.h, which says: /* The rest doesn't count for hash or comparisons */ Both hash and compare break this in different ways. At a minimum the comment should be fixed. If the current behavior is considered right, this can be it. My other point is that we can have code objects with different co_firstlineno compare equal and still not have them deduplicated by the compiler (thus avoid problems with debugger). This can be done similar to how float -0.0 is equal to 0.0, but still not deduplicated. Separating these concerns can allow both most logical compare behavior and good support for debugging. Re hash legally returning same values for non-equal objects -- sure, only a==b implies hash(a)==hash(b), and not the other way round. But this doesn't mean that we should just return 42 from all hash functions. Not including a field in hash that you include compare needs a very good reason. If there's such a reason in this case, please let me know. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15359] Sockets support for CAN_BCM
Brian Thorne added the comment: Thanks for the review Charles-François. I can't make your suggested bcm_msg_fmt work - it was deadlocking on my machine! -- Added file: http://bugs.python.org/file28756/bcm3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16984] idle problem with dark color schemes in kde
Roger Serwy added the comment: This is a duplicate of issue7949, but for KDE instead of GTK. I will close this report in favor of the prior one. -- nosy: +serwy resolution: - duplicate status: open - closed superseder: - idle does not handle dark gtk color schemes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16984 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7949] IDLE: problems with dark GTK or KDE color schemes
Roger Serwy added the comment: Updated the issue to reflect information from 16984. A screenshot was provided in that report. -- nosy: +sahin, serwy title: idle does not handle dark gtk color schemes - IDLE: problems with dark GTK or KDE color schemes versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com