[issue12447] ~True is not False
Martin v. Löwis mar...@v.loewis.de added the comment: This is deliberate, and will not be changed (at least not until Python 4, and likely not even then). Please ask on a Python forum about history and motivation of the boolean type in Python if you want to know more. -- nosy: +loewis status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12447 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12448] smtplib's __main__ doesn't flush when prompting
New submission from Matt Joiner anacro...@gmail.com: The smptlib module's __main__ doesn't flush stdout when prompting: sys.stdout.write(prompt + : ) return sys.stdin.readline().strip() stdout is usually line buffered, and so running python3 smptlib.py doesn't actually prompt the user. The line `sys.stdout.flush()` needs to be added. -- components: Library (Lib) messages: 139461 nosy: anacrolix priority: normal severity: normal status: open title: smtplib's __main__ doesn't flush when prompting type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module
Ross Lagerwall rosslagerw...@gmail.com added the comment: The tests seem to be working fine on all the buildbots now... Thanks! -- resolution: - accepted stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi
New submission from Ram Rachum cool...@cool-rr.com: I noticed that in MSI installers downloaded from PyPI don't have an accelerator on the Finish button. Please add an accelerator on it. (I think that F is the accepted one.) -- assignee: tarek components: Distutils messages: 139463 nosy: cool-RR, eric.araujo, tarek priority: normal severity: normal status: open title: Add accelerator F to button Finish in all MSI installers made by bdist_msi type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12446] StreamReader Readlines behavior odd
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #8260. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12446 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #12446. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: Reported by Michael Ford in msg139402: http://www.serpentine.com/blog/2011/06/29/here-be-dragons-advances-in-problems-you-didnt-even-know-you-had/ describes a new algorithm for float-str conversions. It would be interesting to see if it is better/faster than the current dtoa. -- components: Interpreter Core messages: 139466 nosy: amaury.forgeotdarc, mark.dickinson, michael.foord, rhettinger priority: normal severity: normal status: open title: Use the Grisu algorithms to convert floats to strings type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7117] Backport py3k float repr to trunk
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I've filed issue12450 to track this last idea. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12442] shutil.disk_usage()
Giampaolo Rodola' g.rod...@gmail.com added the comment: New patch includes: - Py_BEGIN/END_ALLOW_THREADS around GetDiskFreeSpaceEx() call - use of assertGreaterEqual / assertLessEqual when testing the percentage usage - use of hasattr(shutil, 'disk_usage') for skipping the test - extended url reference in the comments -- Added file: http://bugs.python.org/file22519/diskusage2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
Eric V. Smith e...@trueblade.com added the comment: I see the problems as: 1. Given Python's other overhead, we'd need to profile to show an improvement in the speed of this conversion would make a noticeable impact on any import workload. 2. If we want to keep the shortest-float-repr property for all possible doubles, we'd need to use Grisu3 but still keep our existing code for the fallback cases. This is a big increase in the complexity of an already complex piece of code. I'm not saying don't switch to Grisu2 or use Grisu3 with the fallback to existing code: maybe the speed improvements are worth it, maybe we can say we we can live with 99.5% shortest repr coverage, or maybe the complexity is worth it. I just want to record the issues here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Tomaž Šolc tomaz.s...@tablix.org added the comment: The way I see it is that Charles-François' patch trades a possibility of a deadlock for a possibility of a child process running with inconsistent states due to forcibly reinitialized locks. Personally, I would rather have an occasional deadlock than an occasional random crash. I don't like increasing complexity with fine-grained locking either. While the general case is unsolvable what Giovanni proposed at least solves the specific case where only the basic IO code is involved after a fork. In hindsight the only real life use-case I can find that it would solve is doing an exec() right after a fork(). There are quite a few bugs in the tracker that seem to have this same root cause, so it appears the impossibility of cleanly handling threads and forks is not something people are generally aware of. Since I think we agree you can't just disable fork() when multiple threads are running, how about at least issuing a warning in that case? That would be a two-line change in threading.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7117] Backport py3k float repr to trunk
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11682] PEP 380 reference implementation for 3.3
Nick Coghlan ncogh...@gmail.com added the comment: Renaud has updated the patch on bitbucket to incorporate Greg's tests (still in golden output form, but in a unittest/regrtest compatible way). That's a good enough starting point for me - they can be refactored into proper assert based tests later. The only tweak needed is to explicitly save and restore stdout and stderr, since restoring the OS level ones often does the wrong thing when running the regression test suite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
Raymond Hettinger raymond.hettin...@gmail.com added the comment: FWIW, I don't think this is worth further disruption. We already have an excellent set of float repr routines. There is no problem to be solved here. -- assignee: - rhettinger priority: normal - low versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
New submission from STINNER Victor victor.stin...@haypocalc.com: open() uses the locale encoding in Python 3 when opening text file if the encoding argument is not specified (implicit). Some functions use locale encoding, but it's not the right encoding. I see at least three cases where the encoding should be changed: - UTF-8 should be used instead for portability: it's a bug in the module - ASCII must be used instead: the module doesn't support non-ASCII characters (old file formats, old network protocols, some fields of a document, etc.) - ASCII can be used instead: it's just a micro-optimization, the ASCII encoding is a little bit faster To detect the usage of the implicit locale encoding, some functions can be monkeypatched: - builtins.open, io.open, _pyio.open - io.TextIOWrapper, _pyio.TextIOWrapper - more functions using directly or indirectly open/TextIOWrapper may be patched to emit the warning earlier Attached open_hook.patch implements these hooks (hacks?) in the site module: it emits a ResourceWarning. Use python -Werror to raise an error if the locale encoding is used implicitly. If you really want to use the locale encoding, use encoding='locale' to make quiet the warning. Quite all functions in Python uses the implicit locale encoding. For example, Python doesn't start with the patch and -Werror. If you use -Werror, you have to patch *all* calls to open()/TextIOWrapper to be able to locate real bugs, or the program will stop before hitting the real problems. Each time you have to check what is the real expected encoding, it takes a lot of time. I started this huge project. I'm using ASCII most of the time (especially in Python tests), I don't know if it's correct. It will require a second step to ensure that the function really don't use/support non-ASCII characters. I will use this issue for my commits, attach patches, and more generally discuss this topic. -- components: Unicode files: open_hook.patch keywords: patch messages: 139473 nosy: haypo priority: normal severity: normal status: open title: open: avoid the locale encoding when possible versions: Python 3.3 Added file: http://bugs.python.org/file22520/open_hook.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Charles-François Natali neolo...@free.fr added the comment: The way I see it is that Charles-François' patch trades a possibility of a deadlock for a possibility of a child process running with inconsistent states due to forcibly reinitialized locks. Yeah, that's why I let this stale: that's really an unsolvable problem in the general case. Don't mix fork() and threads, that's it. I don't like increasing complexity with fine-grained locking either. While the general case is unsolvable what Giovanni proposed at least solves the specific case where only the basic IO code is involved after a fork. In hindsight the only real life use-case I can find that it would solve is doing an exec() right after a fork(). Antoine seems to think that you can't release the I/O locks around I/O syscalls (when the GIL is released). But I'm sure that if you come up with a working patch it'll get considered for inclusion ;-) Since I think we agree you can't just disable fork() when multiple threads are running, how about at least issuing a warning in that case? That would be a two-line change in threading.py. You mean a runtime warning? That would be ugly and clumsy. A warning is probably a good idea, but it should be added somewhere in os.fork() and threading documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12442] shutil.disk_usage()
Antoine Pitrou pit...@free.fr added the comment: Why do you return a percentage? People can compute that themselves if they want to. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12442] shutil.disk_usage()
Brian Curtin br...@python.org added the comment: Agreed. I think we should pass on the raw data - how the user wants to format and present that is up to them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset bd73edea78dc by Victor Stinner in branch '3.2': Issue #12451: distutils now opens the setup script in binary mode to read the http://hg.python.org/cpython/rev/bd73edea78dc New changeset 8a7fd54cba01 by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: distutils now opens the setup script in binary mode http://hg.python.org/cpython/rev/8a7fd54cba01 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12450] Use the Grisu algorithms to convert floats to strings
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset 1942f7c8f51c by Victor Stinner in branch '3.2': Issue #12451: pydoc.synopsis() now reads the encoding cookie if available, to http://hg.python.org/cpython/rev/1942f7c8f51c New changeset 3e627877b5a9 by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: pydoc.synopsis() now reads the encoding cookie if http://hg.python.org/cpython/rev/3e627877b5a9 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi
Éric Araujo mer...@netwok.org added the comment: As a new feature, this cannot go into distutils. Would you like to contribute a patch? I have currently no idea about the workings of the MSI code. -- components: +Distutils2 -Distutils nosy: +alexis stage: - needs patch type: behavior - feature request versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12448] smtplib's __main__ doesn't flush when prompting
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Nir Aides n...@winpdb.org added the comment: Well, I ping my view that we should: 1) Add general atfork() mechanism. 2) Dive into the std lib and add handlers one by one, that depending on case, either do the lock/init thing or just init the state of the library to some valid state in the child. Once this mechanism is in place and committed with a few obvious handlers such as the one for the logging library, other handlers can be added over time. Following this path we will slowly resolve the problem, handler by handler, without introducing the invalid state problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12452] reuse plistlib in sysconfig; deprecation process in plistlib
New submission from STINNER Victor victor.stin...@haypocalc.com: sysconfig uses regex to parse the a .plist file (format based on XML), /System/Library/CoreServices/SystemVersion.plist: the plistlib module can be used instead. I rebuild my patched Python from scatch (make distclean) and I didn't notice any bootstrap issue. The platform module does already use plistlib to parse SystemVersion.plist. = sysconfig_plistlib.patch I also noticed that Plist and Dict emit PendingDeprecationWarning since Python 3.1. It's maybe time to switch to DeprecationWarning? test_plistlib doesn't use these classes, and there are not documented. = plistlib_deprecation.patch -- components: Library (Lib) files: sysconfig_plistlib.patch keywords: patch messages: 139481 nosy: haypo priority: normal severity: normal status: open title: reuse plistlib in sysconfig; deprecation process in plistlib versions: Python 3.3 Added file: http://bugs.python.org/file22521/sysconfig_plistlib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12452 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12452] reuse plistlib in sysconfig; deprecation process in plistlib
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file22522/plistlib_deprecation.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12452 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12452] reuse plistlib in sysconfig; deprecation process in plistlib
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12452 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2193] Cookie Colon Name Bug
R. David Murray rdmur...@bitdance.com added the comment: Well, it's been a while since I looked at the cookie code, and I didn't review it when I reviewed your patch. But some time after I hit submit on my message the issue about some stuff getting ignored anyway occurred to me. So given that we are *already* in that situation, applying your patch to avoid bailing on only some invalid cookies makes sense to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
STINNER Victor victor.stin...@haypocalc.com added the comment: pkginfo_utf8.patch: distutils uses UTF-8 to write PKG-INFO and .egg-info, instead of the locale encoding. It should be applied to 2.7, 3.2 and 3.3. packaging_pkginfo_utf8.patch: packaging tests use UTF-8 to write PKG-INFO files, instead of the locale encoding (cosmetic change, the file content is an empty string :-)). It should only be applied to 3.3 (packaging has been introduced in Python 3.3). -- keywords: +patch versions: -Python 3.1 Added file: http://bugs.python.org/file22523/pkginfo_utf8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file22524/packaging_pkginfo_utf8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12445] dict view values objects are missing tp_richcmp and tp_as_number
Julian julian+python@grayvines.com added the comment: Looking over this again with a clear head, adding the number operators is the incorrect thing to do here I think, since that function was also written assuming we had a set-like view object as input. I am inclined to think that the correct behavior here for those operators is to not change that function, but to not make values objects add-able at all, even with other values objects, which would probably be the only other logical choice, so leaving that as it was before (but still making the equality change). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12445 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Tomaž Šolc tomaz.s...@tablix.org added the comment: You mean a runtime warning? That would be ugly and clumsy. A warning is probably a good idea, but it should be added somewhere in os.fork() and threading documentation. I was thinking about a run time warning that is emitted if you call os.fork() while multiple threads are active. It is ugly, but at least it tells you you are doing something that will in most cases not work correctly. I certainly agree that a warning should also be added to os.fork() documentation. I'm attaching an example patch that adds it into _after_fork() in threading.py, but there are a number of other places where it might go instead. I believe that the comp.programming.threads post from David Butenhof linked above explains why adding atfork() handlers isn't going to solve this. -- Added file: http://bugs.python.org/file22525/emit_warning_on_fork.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7846] Fnmatch cache is never cleared during usage
R. David Murray rdmur...@bitdance.com added the comment: Well, it's unnoficially configurable pre-3.2 (set _MAXCACHE on the module). The lru_cache implementation doesn't have such an undocumented way of tweaking the limit. In neither case, however, is it true that nothing is ever cached. You are saying that you are dealing with more than 100 patterns in a single application? (256 if you are using 3.2, and in that case it is an LRU cache and so should perform well unless your more-than-256 patterns are used in a cyclical fashion.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7846 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Éric Araujo mer...@netwok.org added the comment: pkginfo_utf8.patch: distutils uses UTF-8 to write PKG-INFO and .egg-info, instead of the locale encoding. It should be applied to 2.7, 3.2 and 3.3. Okay. I guess you’ll use codecs.open in 2.7; please make sure there is no bootstrapping issue for the build of CPython itself. It would be a good thing to have non-ASCII in the PGK-INFO/METADATA files in the tests; it’s how we caught #12320. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Antoine Pitrou pit...@free.fr added the comment: I was thinking about a run time warning that is emitted if you call os.fork() while multiple threads are active. It is ugly, but at least it tells you you are doing something that will in most cases not work correctly. The problem is that multiprocessing itself, by construction, uses fork() with multiple threads. Perhaps there's a way to use only non-blocking communication instead (rendering the helper threads useless), but that's not a trivial change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Nir Aides n...@winpdb.org added the comment: I believe that the comp.programming.threads post from David Butenhof linked above explains why adding atfork() handlers isn't going to solve this. In Python atfork() handlers will never run from signal handlers, and if I understood correctly, Charles-François described a way to re-initialize a Python lock safely under that assumption. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12444] accept sets or collections for str.strip/lstrip/rstrip
Éric Araujo mer...@netwok.org added the comment: Agreed with Raymond. Is there some way the doc could be improved, or do we just close this report? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12444 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11873] test_regexp() of test_compileall fails occassionally
STINNER Victor victor.stin...@haypocalc.com added the comment: What about Windows? tempfile.mkdtemp(prefix='bar') can generate ...\tmpxxbaxx\... AH! The test failed on x86 XP-4 x86: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4874/steps/test/logs/stdio == FAIL: test_regexp (test.test_compileall.CommandLineTests) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_compileall.py, line 253, in test_regexp self.assertCompiled(self.initfn) File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_compileall.py, line 149, in assertCompiled self.assertTrue(os.path.exists(imp.cache_from_source(fn))) AssertionError: False is not true @r.david.murray: would you like to fix the regex? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12453] test_import.test_failing_import_sticks() sporadic failures
New submission from STINNER Victor victor.stin...@haypocalc.com: The following test fails sometimes. I don't know on which buildbot it occurs. The last failure is on x86 XP-5 3.x: == FAIL: test_failing_import_sticks (test.test_import.ImportTests) -- Traceback (most recent call last): File D:\Buildslave\3.x.moore-windows\build\lib\test\test_import.py, line 185, in test_failing_import_sticks self.assertRaises(ZeroDivisionError, __import__, TESTFN) AssertionError: ZeroDivisionError not raised by __import__ http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/3085/steps/test/logs/stdio -- components: Tests messages: 139492 nosy: haypo priority: normal severity: normal status: open title: test_import.test_failing_import_sticks() sporadic failures versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
STINNER Victor victor.stin...@haypocalc.com added the comment: The test is still failing on many buildbots. x86 Ubuntu Shared 3.x: == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass) -- Traceback (most recent call last): File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_ftplib.py, line 890, in test_ccc self.client.sendcmd('noop') File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/ftplib.py, line 261, in sendcmd return self.getresp() File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/ftplib.py, line 236, in getresp raise error_proto(resp) ftplib.error_proto: eÊc¯öZÖ8N´ýùô PPC Tiger 3.x, AMD64 Leopard 3.x, x86 FreeBSD 6.4 3.x and x86 Tiger 3.x: == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass) -- Traceback (most recent call last): File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_ftplib.py, line 890, in test_ccc self.client.sendcmd('noop') File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ftplib.py, line 261, in sendcmd return self.getresp() File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ftplib.py, line 226, in getresp resp = self.getmultiline() File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ftplib.py, line 212, in getmultiline line = self.getline() File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ftplib.py, line 199, in getline line = self.file.readline() File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/socket.py, line 279, in readinto return self._sock.recv_into(b) File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py, line 392, in recv_into return socket.recv_into(self, buffer, nbytes, flags) socket.timeout: timed out -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7846] Fnmatch cache is never cleared during usage
R. David Murray rdmur...@bitdance.com added the comment: Grr. it is *not* true that nothing is ever cached. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7846 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset bafc5c7d24b2 by Victor Stinner in branch '3.2': Issue #12451: doctest.debug_script() doesn't create a temporary file anymore to http://hg.python.org/cpython/rev/bafc5c7d24b2 New changeset 77c589b27e90 by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: doctest.debug_script() doesn't create a temporary http://hg.python.org/cpython/rev/77c589b27e90 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #9561 for distutils: I just attached a new patch for PKG-INFO / .egg-info files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11873] test_regexp() of test_compileall fails occassionally
Changes by Thomas Holmes tho...@devminded.com: -- nosy: +Thomas.Holmes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11873 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset 45e3dafb3dbe by Victor Stinner in branch '3.2': Issue #12451: The XInclude default loader of xml.etree now decodes files from http://hg.python.org/cpython/rev/45e3dafb3dbe New changeset e8eea84a90dc by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: The XInclude default loader of xml.etree now decodes http://hg.python.org/cpython/rev/e8eea84a90dc -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset 68bc1a29ba5a by Victor Stinner in branch '3.2': Issue #12451: Open files in binary mode in some tests when the text file is not http://hg.python.org/cpython/rev/68bc1a29ba5a New changeset 3969b6377f52 by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: Open files in binary mode in some tests when the text http://hg.python.org/cpython/rev/3969b6377f52 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Giampaolo Rodola' g.rod...@gmail.com added the comment: The culprit here is the dummy FTP test server which does not complete the SSL shutdown procedure successfully. I believe it's better if we remove the self.client.sendcmd('noop') line. That's there in order to check that client and server can still talk after reverting the connection back to clear-text, but making the server doing this right is quite complicated, see for example: http://code.google.com/p/pyftpdlib/source/browse/trunk/pyftpdlib/contrib/handlers.py?spec=svn868r=861#196 I don't want to include and maintain that monster into test_ftplib.py so I think I'll just remove that line from the tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset c4388478f9b2 by Victor Stinner in branch 'default': Issue #12451: Open the test file in binary mode in test_bz2, the text file is http://hg.python.org/cpython/rev/c4388478f9b2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Roundup Robot devnull@devnull added the comment: New changeset 0cef8cac71c8 by Giampaolo Rodola' in branch 'default': Issue 12139: ftplib - remove 'post CCC' test to fix various buildot failures due to dummy test server not properly handling SSL shutdown(), see http://bugs.python.org/msg139499 http://hg.python.org/cpython/rev/0cef8cac71c8 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12454] mailbox: use ASCII to read/write .mh_sequences files
New submission from STINNER Victor victor.stin...@haypocalc.com: The MH class uses the locale encoding to read and write .mh_sequences files. According to R. David Murray, ASCII can be safetly used instead. Extract of our discussion on IRC: bitdancer haypo: that's one of the cases where using locale is probably correct, even though I'd rather it used utf-8. bitdancer haypo: for nmh it is ASCII, for whatever that is worth. bitdancer I base this on the fact that the pick command says that a utf-8 character is invalid. bitdancer for a sequence name. bitdancer Which is the only thing other than numbers that goes in a sequences files. Jerub I concurr (was reading code) -- components: Library (Lib) files: mailbox.patch keywords: patch messages: 139502 nosy: haypo, r.david.murray priority: normal severity: normal status: open title: mailbox: use ASCII to read/write .mh_sequences files versions: Python 3.3 Added file: http://bugs.python.org/file22526/mailbox.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12454] mailbox: use ASCII to read/write .mh_sequences files
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +jerub ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12454 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #12454 for the mailbox module (.mh_sequences). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi
Changes by Thomas Holmes tho...@devminded.com: -- nosy: +thomas.holmes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8501] --dry-run option doesn't work
Changes by Thomas Holmes tho...@devminded.com: -- nosy: +thomas.holmes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by Thomas Holmes tho...@devminded.com: -- nosy: +thomas.holmes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12444] accept sets or collections for str.strip/lstrip/rstrip
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The docs are clear on this topic. No doc change can help someone who skips reading the docs and assumes the method does something different. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12444 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9504] signal.signal/signal.alarm not working as expected
Changes by Antoine Pitrou pit...@free.fr: -- assignee: pitrou - stage: patch review - needs patch versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9504 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12407] test_subinterps fails on Windows
Roundup Robot devnull@devnull added the comment: New changeset 7c60c1b41da9 by Antoine Pitrou in branch '3.2': Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. http://hg.python.org/cpython/rev/7c60c1b41da9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12407] test_subinterps fails on Windows
Roundup Robot devnull@devnull added the comment: New changeset 5cae52417b9d by Antoine Pitrou in branch 'default': Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. http://hg.python.org/cpython/rev/5cae52417b9d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12407] test_subinterps fails on Windows
Antoine Pitrou pit...@free.fr added the comment: Fixed, thank you. -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Antoine Pitrou pit...@free.fr added the comment: I think the question is: will the slowdown apply to module import, or only to explicit uses of the marshal module? If the latter, then I think we can live with it - we discourage using marshal as a general-purpose serialization scheme anyway. As for the patch: - why do the tests have to carry a large chunk of binary data? if some data is needed, at least it would be nice if it were kept small - not sure either why it needs zlib and base64; just use the repr() of the bytestring - assertEqual = self.assertEqual is more of a nuisance than anything else; you're making the code more complicated to read just to save a few keystrokes; same for assertIsInstance = self.assertIsInstance - can you add a comment next to the fields you're adding to the marshal C struct? - if the r_byte macro isn't used anymore, it should be removed, not commented out - in r_string(), what happens if PyBytes_Check(data) is false? there should probably be a TypeError of some sort - in r_string() again, if data is NULL after the read() call, the exception shouldn't be shadowed by an EOFError - why do you call read(1) at the beginning? it seems to make the code more complicated for no useful purpose -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7123] Multiprocess Process does not always exit when run from a thread.
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: My suggestion to this would be that it should be outdated in the same way that Georg Brandl has suggested for changing the default encoding on python-dev [1], and add clear documentation on that, also in respect to the transition phase .. The problem is that multiprocessing itself, by construction, uses fork() with multiple threads. .. and maybe add some switches which allow usage of fork() for the time being. Today a '$ grep -Fir fork' does not show up threading.rst at all, which seems to be little in regard to the great problem. I would add a big fat note that multiprocessing.Process should be used instead today, because how about those of us who are not sophisticated enough to be appointed to standard committees? But anyway we should be lucky: fork(2) is UNIX specific, and thus it can be expected that all thread-safe libraries etc. are aware of the fact that they may be cloned by it. Except mine, of course. ,~) [1] http://mail.python.org/pipermail/python-dev/2011-June/112126.html -- Ciao, Steffen sdaoden(*)(gmail.com) () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Antoine Pitrou pit...@free.fr added the comment: I think the question is: will the slowdown apply to module import, or only to explicit uses of the marshal module? If the latter, then I think we can live with it - we discourage using marshal as a general-purpose serialization scheme anyway. Thanks for reviewing the patch. As to your point - agreed, and as the marshal code is completely broken now, something that works is an improvement, even if it's slower than optimal. If that turns out to be a problem in practice, it can be fixed. As for the patch: - why do the tests have to carry a large chunk of binary data? if some data is needed, at least it would be nice if it were kept small Agreed, I just used the initial file where I had the problem - didn't know where the problem was, initially. Will look at reducing this. - not sure either why it needs zlib and base64; just use the repr() of the bytestring The original data was 53K, so just the repr of the bytestring of the raw data is around 150K. If I zip the data, it's about 4K, but the repr of that data is around 12K. The base64/zlibbed version is 5K. This will be less of an issue when the test data size is reduced. - assertEqual = self.assertEqual is more of a nuisance than anything else; you're making the code more complicated to read just to save a few keystrokes; same for assertIsInstance = self.assertIsInstance I'm not sure how it's more complicated or harder to understand. I didn't do it just to save keystrokes when writing, it's also to avoid noise when reading. IMO this is a question of personal taste, or is this approach proscribed somewhere? I've certainly seen it in other Python code. - can you add a comment next to the fields you're adding to the marshal C struct? Yes, will do. - if the r_byte macro isn't used anymore, it should be removed, not commented out The commenting out is a temporary measure, the comment will be removed before commit. - in r_string(), what happens if PyBytes_Check(data) is false? there should probably be a TypeError of some sort There is a PyBytes_Check in marshal_load which raises a TypeError if it fails. The PyBytes_Check in r_string is only called in the path from marshal_load (because p-readable is only non-NULL in that path) - so for the failure to occur one would need an initial read to deliver bytes, and a subsequent read to deliver non-bytes. Still, I have no problem adding a TypeError raising in r_string if PyBytes_Check fails. - in r_string() again, if data is NULL after the read() call, the exception shouldn't be shadowed by an EOFError Good point, I aim to fix this by changing the lower condition to if (!PyErr_Occurred() (read n)) { ... } which should be sufficient - do you agree? - why do you call read(1) at the beginning? it seems to make the code more complicated for no useful purpose I gave the reasoning in the comment just above the read(1). I agree it makes it a little more complicated, but not onerously so - and the approach fails fast as well as allowing operation with any stream, not just random-seekable ones. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Antoine Pitrou pit...@free.fr added the comment: I would add a big fat note that multiprocessing.Process should be used instead today, because how about those of us who are not sophisticated enough to be appointed to standard committees? How do you think multiprocessing.Process launches a new process? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
New submission from Cal Leeming cal.leem...@simplicitymedialtd.co.uk: I came up against a problem today whilst trying to submit a request to a remote API. The header needed to contain: 'Content-MD5' : md5here But the urllib2 Request() forces capitalize() on all header names, and transformed it into Content-Md5, which in turn made the remote web server ignore the header and break the request (as the remote side is case sensitive, of which we don't have any control over). I attempted to get smart by using the following patch: class _str(str): def capitalize(s): print s return s _headers = {_str(Content-MD5) : 'md5here'} But this failed to work: ---HEADERS--- {'Content-MD5': 'nts0yj7AdzJALyNOxafDyA=='} ---URLLIB2 DEBUG--- send: 'POST /api/v1 m HTTP/1.1\r\nContent-Md5: nts0yj7AdzJALyNOxafDyA==\r\n\r\n\r\n' Upon inspecting the urllib2.py source, I found 3 references to capitalize() which seem to cause this problem, but it seems impossible to monkey patch, nor fix without forking. Therefore, I'd like to +1 a feature request to have an extra option at the time of the request being opened, to bypass the capitalize() on header names (maybe, header_keep_original = True or something). And, if anyone could suggest a possible monkey patch (which doesn't involve forking huge chunks of code), that'd be good too :) Thanks Cal -- components: Library (Lib) messages: 139512 nosy: Cal.Leeming priority: normal severity: normal status: open title: urllib2 Request() forces capitalize() on header names, breaking some requests type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Antoine Pitrou pit...@free.fr added the comment: - assertEqual = self.assertEqual is more of a nuisance than anything else; you're making the code more complicated to read just to save a few keystrokes; same for assertIsInstance = self.assertIsInstance I'm not sure how it's more complicated or harder to understand. I didn't do it just to save keystrokes when writing, it's also to avoid noise when reading. IMO this is a question of personal taste, or is this approach proscribed somewhere? It's not proscribed, but trying to remove the self. because it's supposed to be more readable is a bit of a strange thing to do. Also, people reading the test suite should be accustomed to self.assertEqual anyway, so there's no point trying to hide it. - in r_string(), what happens if PyBytes_Check(data) is false? there should probably be a TypeError of some sort There is a PyBytes_Check in marshal_load which raises a TypeError if it fails. The PyBytes_Check in r_string is only called in the path from marshal_load (because p-readable is only non-NULL in that path) - so for the failure to occur one would need an initial read to deliver bytes, and a subsequent read to deliver non-bytes. Still, I have no problem adding a TypeError raising in r_string if PyBytes_Check fails. Error checking can't just be probabilistic. Perhaps there's a bug in the file-like object; or perhaps it is a non-blocking IO object and read() will return None at times. - why do you call read(1) at the beginning? it seems to make the code more complicated for no useful purpose I gave the reasoning in the comment just above the read(1). I agree it makes it a little more complicated, but not onerously so - and the approach fails fast as well as allowing operation with any stream, not just random-seekable ones. Well, it wouldn't fail any slower if you didn't do it, since you need to call read() very soon anyway (presumably as part of the same call to marshal.load()). Failing fast doesn't seem to bring anything here. My vote is for removing the complication. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
R. David Murray rdmur...@bitdance.com added the comment: Well, three occurrences means you only have three methods to patch (and two of them are trivial). But I agree that copying the non-trivial method doesn't look fun from a maintenance perspective. You could also try using an object that is not a subclass of str. The problem with subclassing str is that some (most?) string methods do not do a subclass check but directly call the C implementation of the method. I think there's an issue in the tracker somewhere about that. The problem with not subclassing string, of course, is that you may end up implementing a lot of methods on your object to get it to play nicely with urllib2's assumption that it *is* a string. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
Cal Leeming cal.leem...@simplicitymedialtd.co.uk added the comment: Sorry, I should clarify.. The str() patch worked, but it failed to work within the realm of urllib2: s = _str(Content-MD5) print Builtin: print plain: %s % ( s ) print capitalized: %s % ( s.capitalize() ) s = str(Content-MD5) print Builtin: print plain: %s % ( s ) print capitalized: %s % ( s.capitalize() ) Builtin: plain: Content-MD5 capitalized: Content-MD5 Builtin: plain: Content-MD5 capitalized: Content-md5 Why it works in the unit test, and not within urllib2, is totally beyond me. Especially since I put a debug call on the method, and it does get called.. yet urllib2 debug still shows it sending the wrong value. --- capitalize() bypassed: sending value: Content-MD5 send: 'POST /api/url\r\nContent-Md5: nts0yj7AdzJALyNOxafDyA==\r\n\r\n' --- I have a feeling that the problem may lie somewhere after the opener (like HTTPConnection or AbstractHTTPHandler), rather than the urllib2 calls to capitalize(), but not having much luck monkey patching those :X -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
R. David Murray rdmur...@bitdance.com added the comment: Well, judging by your test it isn't capitalize that's the issue. capitalize produces Content-md5, whereas debug is showing urllib2 sending Content-Md5. So something else is massaging the header name on send. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5120] Disabling test_ttk_guionly on mac
STINNER Victor victor.stin...@haypocalc.com added the comment: Still crashing on PPC Tiger 3.x buildbot: ... [333/356/2] test_ttk_guionly Fatal Python error: Segmentation fault Current thread 0xa000ed88: File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py, line 47 in _load_tile File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py, line 559 in __init__ File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py, line 614 in __init__ File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_ttk_guionly.py, line 14 in module File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py, line 342 in _load_module File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py, line 141 in decorated File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py, line 437 in load_module File ./Lib/test/regrtest.py, line 1063 in runtest_inner File ./Lib/test/regrtest.py, line 861 in runtest File ./Lib/test/regrtest.py, line 669 in main File ./Lib/test/regrtest.py, line 1648 in module make: *** [buildbottest] Segmentation fault http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/2109/steps/test/logs/stdio Can anyone with a Mac look at this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: test_ttk_guionly is still crashing regulary on PPC Tiger 3.x buildbot, see issue #5120. Can anyone with a Mac look at this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12452] reuse plistlib in sysconfig; deprecation process in plistlib
Changes by Ned Deily n...@acm.org: -- nosy: +ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12452 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
Cal Leeming cal.leem...@simplicitymedialtd.co.uk added the comment: (short answer, I found the cause, and a suitable monkey patch) - below are details of how I did it and steps I took. - Okay so I forked AbstractHTTPHandler() then patched do_request_(), at which point request.headers and request.header_items() have the correct header name (Content-MD5). So I tried this: opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1)) opener.addheaders = [(Content-TE5, 'test'), ] However the headers came back capitalized, so the problem is happening somewhere after addheaders. grep -R addheaders *.py urllib.py:self.addheaders = [('User-Agent', self.version)] urllib.py:self.addheaders.append(args) urllib.py:for args in self.addheaders: h.putheader(*args) urllib.py:for args in self.addheaders: h.putheader(*args) urllib2.py:self.addheaders = [('User-agent', client_version)] urllib2.py:for name, value in self.parent.addheaders: grep -R def putheader *.py httplib.py:def putheader(self, header, value): httplib.py:def putheader(self, header, *values): I also then found: http://stackoverflow.com/questions/3278418/testing-urllib2-application-http-responses-loaded-from-files I then patched this: class HTTPConnection(httplib.HTTPConnection): def putheader(self, header, value): print [header, value] This in turn brought back: ['Content-Md5', 'nts0yj7AdzJALyNOxafDyA=='] Which means it's happening before putheader(). So I patched _send_request() on HTTPConnection(), and that also brought back 'Content-Md5'. Exception trace shows: File /ddcms/dev/webapp/../webapp/sites/ma/management/commands/ddcms.py, line 147, in _send_request _res = opener.open(req) -- CORRECT -- File /usr/local/lib/python2.6/urllib2.py, line 391, in open response = self._open(req, data) -- CORRECT -- File /usr/local/lib/python2.6/urllib2.py, line 409, in _open '_open', req) -- CORRECT -- File /usr/local/lib/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) -- CORRECT -- File /ddcms/dev/webapp/../webapp/sites/ma/management/commands/ddcms.py, line 126, in http_open return self.do_open(HTTPConnection, req) -- CORRECT -- File /usr/local/lib/python2.6/urllib2.py, line 1142, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) -- INVALID -- File /usr/local/lib/python2.6/httplib.py, line 914, in request self._send_request(method, url, body, headers) File /ddcms/dev/webapp/../webapp/sites/ma/management/commands/ddcms.py, line 122, in _send_request raise The line that causes it? headers = dict( (name.title(), val) for name, val in headers.items()) So it would appear that title() also needs monkey patching.. Patched to use: # Patch case sensitive headers (due to reflected API being non RFC compliant, and # urllib2 not giving the option to choose between the two) class _str(str): def capitalize(s): print capitalize() bypassed: sending value: %s % ( s ) return s def title(s): print title() bypassed: sending value: %s % ( s ) return s _headers = {_str('Content-MD5') : _md5_content} capitalize() bypassed: sending value: Content-MD5 title() bypassed: sending value: Content-MD5 send: 'POST /url/api HTTP/1.1\r\nContent-MD5: nts0yj7AdzJALyNOxafDyA==\r\n\r\n' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 Request() forces capitalize() on header names, breaking some requests
Cal Leeming cal.leem...@simplicitymedialtd.co.uk added the comment: So @r.david.murray, it would appear you were right :D Really, I should have looped through each method on str(), and wrapped them all to see which were being called, but lesson learned I guess. Sooo, I guess now the question is, can we possibly get a vote on having a feature which disables this functionality from the opener level. Something like: opener = urllib2.build_opener(urllib2.HTTPHandler(debuglevel=1, keep_original_header_case=True)) But obviously a less tedious attribute name :) In the mean times, if anyone else comes up against this problem, the code I pasted above will work fine for now. Cal -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: How do you think multiprocessing.Process launches a new process? But it's a single piece of code under control and even multi-OS/multi-architecture test-coverage, not a general purpose Joe, you may just go that way and Python will handle it correctly? What i mean is: ten years ago (or so), Java did not offer true selection on sockets (unless i'm mistaken) - servers needed a 1:1 mapping of threads:sockets to handle connections?! But then, a this thread has finished the I/O, let's use it for something different seems to be pretty obvious. This is ok if it's your professor who is forcefully misleading you into the wrong direction, but otherwise you will have problems, maybe sooner, maybe later (, maybe never). And currently there is not a single piece of documentation which points you onto the problems. (And there *are* really people without Google.) The problem is that it looks so simple and easy - but it's not. In my eyes it's an unsolvable problem. And for the sake of resource usage, simplicity and execution speed i appreciate all solutions which don't try to do the impossible. I want to add that all this does not really help just as long just *any* facility which is used by Python *itself* is not under control of atfork. Solaris e.g. uses atfork for it's memory allocator, because that is surely needed if anything else but async-safe facilities are used in the newly forked process. Can Python give that guarantee for all POSIX systems it supports? Good night. -- Ciao, Steffen sdaoden(*)(gmail.com) () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Antoine Pitrou pit...@free.fr added the comment: How do you think multiprocessing.Process launches a new process? But it's a single piece of code under control and even multi-OS/multi-architecture test-coverage, not a general purpose Joe, you may just go that way and Python will handle it correctly? Sorry, how does that make the problem any different? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 forces title() on header names, breaking some requests
R. David Murray rdmur...@bitdance.com added the comment: A feature request for a way to control this is reasonable. However, new features can only go into 3.3. -- stage: - needs patch title: urllib2 Request() forces capitalize() on header names, breaking some requests - urllib2 forces title() on header names, breaking some requests type: behavior - feature request versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 forces title() on header names, breaking some requests
Cal Leeming cal.leem...@simplicitymedialtd.co.uk added the comment: Damn 3.3 huh? Ah well, at least it's in the pipeline ^_^ Thanks for your help on this @r.david.murray! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset 0c49260e85a0 by Victor Stinner in branch 'default': Issue #12451: Add support.create_empty_file() http://hg.python.org/cpython/rev/0c49260e85a0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11999] sporadic failure in test_mailbox
STINNER Victor victor.stin...@haypocalc.com added the comment: Now we see if the buildbots agree with me that this is fixed. There is a new failure today on a Windows Seven buildbot: == FAIL: test_reread (test.test_mailbox.TestMaildir) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_mailbox.py, line 900, in test_reread self.assertFalse(refreshed()) AssertionError: True is not false http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/3353/steps/test/logs/stdio -- resolution: fixed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11999 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Ned Deily n...@acm.org added the comment: I think this issue should be considered a test environment error. Since this buildbot is set up in an environment where it is running headless, that is to say the tests are run under a username that is not logged in to the window server, we should not be trying to run GUI tests there, in particular Tkinter tests. Yes, in a better world, Aqua TK on OS X should not crash in this situation but it is not a Python bug that it does and it's a bit of a hassle to workaround the Tk bug by trying to determine whether the interpreter is indeed running under a user id that is currently also logged in as the primary GUI user. Also note that there has been no update on the status of the Tk bug that Ronald filed a year ago; not surprisingly, it's not considered an important issue by the project and it's likely not that important for them to make the effort to fix it. In the real world, this situation does not happen; you would only be running Tkinter stuff if you are logged in as the current GUI user and then the test does not crash. So, for this and any other OS X buildbot running headless, the buildbot configuration should be changed to skip GUI tests: make buildbottest TESTOPTS='-uall,-gui' Can someone with access to the buildbot configuration make that change and ensure the crash goes away? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
STINNER Victor victor.stin...@haypocalc.com added the comment: Okay. I guess you’ll use codecs.open in 2.7 Oh, Python 2.7... DistributionMetadata of distutils encodes most values to byte strings (get_xxx() methods calls self._encode_field). It would be possible to use codecs.open(), but an Unicode file expects Unicode strings. The problem is that the user may provide arbitrary byte strings, I mean strings not encoded to PKG_INFO_ENCODING. Even if such strings are *wrong* (not correctly encoded), is it a good idea to be more strict in a minor version (2.7.x)? I don't want to be responsible of such tricky change, I prefer to leave distutils unchanged in Python 2.7 (at least for PKG-INFO). please make sure there is no bootstrapping issue for the build of CPython itself. I checked, there is not bootstrap issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11682] PEP 380 reference implementation for 3.3
Renaud Blanch rndbl...@gmail.com added the comment: I've just updated the pep380-test patch to make it slightly simpler (still in golden output form though) https://bitbucket.org/rndblnch/cpython-pep380/src/317eadf5e3e8/pep380-tests -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5120] Change _tkinter initialization for new versions of Aqua Tk on OS X
Ned Deily n...@acm.org added the comment: See comments to Issue8716. Suggest any further comments on the headless crash issue go there and reserve this issue for investigation into the suggested changes to initialization when using Aqua Tk. BTW, the supplied patch has compile time Tk version tests which can be problematic since Aqua Tk is dynamically linked and so the exact patch version cannot be determined at compile time. However, since 8.4.7 is the earliest version we claim to support we could probably dispense with the check, assuming the change is warranted. -- nosy: -BreamoreBoy title: Disabling test_ttk_guionly on mac - Change _tkinter initialization for new versions of Aqua Tk on OS X type: crash - versions: +Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: Since this buildbot is set up in an environment where it is running headless, that is to say the tests are run under a username that is not logged in to the window server, we should not be trying to run GUI tests there, in particular Tkinter tests. If I run test_ttk_guionly in SSH, the process abort. gdb trace: --- ... kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only INIT_Processeses(), could not establish the default connection to the WindowServer. Program received signal SIGABRT, Aborted. 0x9003d66c in kill () (gdb) where #0 0x9003d66c in kill () #1 0x9010e8cf in raise () #2 0x9010d422 in abort () #3 0x917d7dad in RegisterProcess () #4 0x917d7b55 in INIT_Processes () #5 0x918080b6 in ProcessManagerLazyInitialization () #6 0x917d7aa6 in GetCurrentProcess () #7 0x92dd5ef9 in GetSystemUIMode () #8 0x92dd5e86 in IsMenuBarVisible () #9 0x92e2af35 in GetAvailableWindowPositioningBounds () #10 0x0b0a7a31 in TkMacOSXDisplayChanged () #11 0x0b0a7bee in TkpOpenDisplay () #12 0x0b02ace6 in CreateTopLevelWindow () #13 0x0b02b0dd in TkCreateMainWindow () #14 0x0b035115 in CreateFrame () #15 0x0b035544 in TkCreateFrame () #16 0x0b02c564 in Initialize () #17 0x010d2789 in Tcl_AppInit (interp=0x12c6010) at /Users/vstinner/cpython/Modules/tkappinit.c:106 #18 0x010cc000 in Tkapp_New (screenName=0x0, className=0x10d2e8c Tk, interactive=0, wantobjects=0, wantTk=1, sync=0, use=0x0) at /Users/vstinner/cpython/Modules/_tkinter.c:724 #19 0x010d1dcd in Tkinter_Create (self=0x1275838, args=0x517038) at /Users/vstinner/cpython/Modules/_tkinter.c:2938 #20 0x00060241 in PyCFunction_Call (func=0x106c338, arg=0x517038, kw=0x0) at Objects/methodobject.c:81 #21 0x0008de54 in call_function (pp_stack=0xb164, oparg=0) at Python/ceval.c:3957 #22 0x00087f81 in PyEval_EvalFrameEx (f=0x1255d28, throwflag=0) at Python/ceval.c:2663 #23 0x0008bf7d in PyEval_EvalCodeEx (_co=0x7a7df8, globals=0x705428, locals=0x705428, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3393 #24 0x00079362 in PyEval_EvalCode (co=0x7a7df8, globals=0x705428, locals=0x705428) at Python/ceval.c:767 #25 0x000e1a9f in run_mod (mod=0x18bdba0, filename=0x1caac8 string, globals=0x705428, locals=0x705428, flags=0xba34, arena=0x1101470) at Python/pythonrun.c:1793 #26 0x000e17a4 in PyRun_StringFlags (str=0x125f520 import _tkinter; c=_tkinter.create(); print(\a\)\n, start=257, globals=0x705428, locals=0x705428, flags=0xba34) at Python/pythonrun.c:1727 #27 0x000dfe61 in PyRun_SimpleStringFlags (command=0x125f520 import _tkinter; c=_tkinter.create(); print(\a\)\n, flags=0xba34) at Python/pythonrun.c:1300 #28 0x714c in run_command (command=0x11010e0, cf=0xba34) at Modules/main.c:260 #29 0x7f4a in Py_Main (argc=3, argv=0x514028) at Modules/main.c:634 #30 0x24d3 in main (argc=3, argv=0xbb6c) at ./Modules/python.c:59 --- The best would be to fix _tkinter to catch Tk error, but I agree, in a first time we may just try to detect that we cannot create GUI objects. For example, test if the DISPLAY environment variable is present. PPC Tiger 3.x: test_ttk_guionly crashs sometimes, the variable is not set. AMD64 Leopard 3.x: test_tcl, test_tk, test_ttk_guionly and test_ttk_textonly are skipped; the variable is set (e.g. DISPLAY=/tmp/launch-lDC93s/:0). AMD64 Snow Leopard 2 3.x: test_ttk_guionly pass, DISPLAY var is set (e.g. DISPLAY=/tmp/launch-cuyZPv/org.x:0). Attached requires_tkinter.patch file adds the check for test_tk and test_ttk_guionly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file22527/requires_tkinter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12455] urllib2 forces title() on header names, breaking some requests
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12455 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Ned Deily n...@acm.org added the comment: Victor, I don't understand what your patch is trying to accomplish. The problem is not that Tkinter isn't built; the problem is simply at execution time. Yes, you'll see exactly the same behavior if you are logged in via ssh and the usename you are running under is not logged in as the main GUI user. The solution is to not run Tkinter stuff in that situation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: Victor, I don't understand what your patch is trying to accomplish. It skips test_tk and test_ttk_guionly if the DISPLAY environment variable is not set. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Ned Deily n...@acm.org added the comment: It skips test_tk and test_ttk_guionly if the DISPLAY environment variable is not set. Whether DISPLAY is set or not isn't relevant. What's relevant is whether I'm logged in as the GUI user. In this example, I'm logging in through ssh using the same user name that is currently logged in as the main GUI user. $ ssh $ echo $DISPLAY $ /usr/local/bin/python3.2 -m test -u gui test_ttk_guionly [1/1] test_ttk_guionly 1 test OK. It's really not worth trying to fix the tests. The buildbot configuration is incorrect. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: @pitrou: How can we fix the configuration of the buildbot? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file22528/c3ba4f7b5db1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: As discussed on IRC, updated patch skipping test_tk and test_ttk_guionly very early if the gui resource is not set. -- Added file: http://bugs.python.org/file22529/requires_tkinter-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Antoine Pitrou pit...@free.fr added the comment: It's not proscribed, but trying to remove the self. because it's supposed to be more readable is a bit of a strange thing to do. Also, people reading the test suite should be accustomed to self.assertEqual anyway, so there's no point trying to hide it. It wasn't particularly about self - I'm not against it. Anyway, it's not a big deal for me, so I've added the selves back :-) Error checking can't just be probabilistic. Perhaps there's a bug in the file-like object; or perhaps it is a non-blocking IO object and read() will return None at times. You're right, so I've raised a TypeError if PyBytes_Check fails in r_string. Well, it wouldn't fail any slower if you didn't do it, since you need to call read() very soon anyway (presumably as part of the same call to marshal.load()). Failing fast doesn't seem to bring anything here. My vote is for removing the complication. Actually I misremembered the complete reason for the call - it was there to additionally check that the passed object has a read method. I also realised - duh - that I can read zero bytes and still get an empty bytes object back, so I've done that, and it does look cleaner. I've also reorganised the marshal_load function a little so it flows better. Your other points have also all been addressed: I've seen that the original test with the long binary data was exercising the same functionality as Engelbert Gruber's later patch was testing. So I've removed my earlier test entirely and added tuples and lists into the data being marshalled in Engelbert's version of the test. As a result of these changes, the zlib/base64 dependency goes away. The new readable field of the C struct has a comment saying what it is. The commented out r_byte macro has been removed. Thanks, again, for the review! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12449] Add accelerator F to button Finish in all MSI installers made by bdist_msi
Ram Rachum cool...@cool-rr.com added the comment: I can only do wxPython, I have no idea how Python's MSI installers work. I did a quick search for Finish in the codebase but could find any obvious place to add the accelerator. As a new feature, this cannot go into distutils. Seriously? Why? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com