[issue5673] Add timeout option to subprocess.Popen

2010-07-13 Thread Reid Kleckner
Reid Kleckner added the comment: I went through the trouble of building and testing Python on Windows Vista, and with some small modifications I got the tests I added to pass. Here's an updated patch. I'm still not really sure how those threads work on Windows, so I'd rather leave that TODO

[issue6033] LOOKUP_METHOD and CALL_METHOD optimization

2010-07-13 Thread Reid Kleckner
Reid Kleckner added the comment: I have an patch for unladen-swallow out for review here: http://codereview.appspot.com/160063/show It resolves the correctness issues I mentioned previously by emitting guards if necessary. If the type is predictable and uses slots, then we don't need to chec

[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2010-07-13 Thread Eric Talevich
New submission from Eric Talevich : In xml.etree, ElementTree and cElementTree implement different interfaces for the iterparse function/class. In ElementTree, the argument "events" must be a tuple of strings: from xml.etree import ElementTree as ET for result in ET.iterparse('example.xml', ev

[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-07-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Extension Modules -ctypes resolution: -> invalid status: open -> pending ___ Python tracker ___ __

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: [copied from pydev post] Summary: adding an autojunk heuristic to difflib without also adding a way to turn it off was a bug because it disabled running code. 2.6 and 3.1 each have, most likely, one final version each. Don't fix for these but add something t

[issue9256] plistlib should create non-naïve datetime objects

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Yes, parsing elements ending with 'Z' into aware datetime objects makes perfect sense, but this should be done carefully because doing so will break any code that mixes the result with naive datetimes. There is a lengthy RFC 3339 discussion in issue 75

[issue9256] plistlib should create non-naïve datetime objects

2010-07-13 Thread Wim
New submission from Wim : The plistlib module parses elements in the plist into datetime objects. (This is good.) However, it produces naïve datetimes, even though the elements include an explicit timezone specification ('Z' for UTC, since they're in ISO 8601 format). Now that issue 5094 ha

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: In issue7989c.diff, I reverted to lazy import of _strptime, added cleanup of _xyz helper functions, and made test_datetime more robust by restoring sys.modules more thoroughly. Unfortunately I've encountered an issue with Rietveld that prevents me from

[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-07-13 Thread ipatrol
ipatrol added the comment: Aren't there two ValueErrors in the file? One is a platform and (in the now-fixed version) the other would indicate a problem with I/O or vcvars execution (like permissions). -- ___ Python tracker

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread R. David Murray
R. David Murray added the comment: "Use it at your own risk" is always an option. Brett is saying that test.support docs need to make it clear that anyone using it is doing so at their own risk: it is for core development only and so we might change anything at any time without considering b

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Issue 8273 is in some sense the opposite of this - it calls for blessing of everything in in test.support while this issue calls for wholesale "unblessing". I don't think either approach is right. While users should definitely never import test_* modu

[issue9253] argparse: optional subparsers

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- stage: -> unit test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue9253] argparse: optional subparsers

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue9253] argparse: optional subparsers

2010-07-13 Thread R. David Murray
R. David Murray added the comment: I've added Steven as nosy so he knows this was reposted here. I've also set the priority to low. Personally I'm at least -0 on this, since if I use a command that has subcommands I expect to get an error if I supply an invalid subcommand. As you say, howe

[issue9243] sndhdr erroneously detects files as vox

2010-07-13 Thread STINNER Victor
STINNER Victor added the comment: > Oh, and the reason it got changed to startswith is probably > a micro-optimization: startswith is more efficient than doing > a slice-and-compare. Not really. I changed it because it's more readable (it's easier to understand that the code). -- James: I c

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread R. David Murray
R. David Murray added the comment: Alexander: issue8273 addresses this, but I don't think Brett's doc change should be held up pending the resolution of that issue. Also, the entire set of test.support documentation should move to a set of 'developer' docs (which I think Brett plans to write

[issue9254] __import__ docstring should recommend importlib.import_module()

2010-07-13 Thread Éric Araujo
Éric Araujo added the comment: More rationale for not using a dummy fromlist, from Brett Cannon: “Pulling from sys.modules is the correct way to do this. There are subtle issues when using a bunk fromlist argument (empty modules, double initialization, etc.). If one does not use importlib.impor

[issue7584] datetime.rfcformat() for Date and Time on the Internet

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Adding issue 7989 as a dependency because having pure python implementation in the CPython tree will make it much easier to experiment with new datetime features. I am still -1 on adding specialized formatting methods to the datetime class. I think th

[issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It would be nice if at the same time the facilities available in test.support and test.regrtest were reviewed and some promoted to user facing unittest package. They can even be placed in unittest.support and unittest.regrtest modules for easy discover

[issue7384] curses crash on FreeBSD

2010-07-13 Thread STINNER Victor
STINNER Victor added the comment: > "In lt_LT.UTF-8 locale, readline_termcap_lib file contains: > ne dinaminis paleidžiamasis failas" You can run ldd without LANG variable to get the original (english, ascii only) message. -- ___ Python tracker <

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-13 Thread Alex Willmer
Alex Willmer added the comment: On 13 July 2010 22:34, Jonathan Halcrow wrote: > The most recent version on pypi (20100709) seems to be missing _regex_core > from py_modules in setup.py. Sorry, my fault. I've uploaded a corrected version http://pypi.python.org/pypi/regex/0.1.20100709.1 -

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9255] document that the 'test' package is for core developers only

2010-07-13 Thread Brett Cannon
New submission from Brett Cannon : The documentation for the 'test' package should specify that the things that are documented are really meant for people contributing to Python and not for personal use. This will help lead to people no longer using the package outside of Python itself and eve

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks for your comments, that was fast! I will skip using the test package then. -- status: pending -> open ___ Python tracker ___

[issue9254] __import__ docstring should recommend importlib.import_module()

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> d...@python components: +Documentation nosy: +d...@python stage: -> needs patch type: -> feature request ___ Python tracker __

[issue9254] __import__ docstring should recommend importlib.import_module()

2010-07-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : On Tue, Jul 13, 2010 at 4:52 PM, Brett Cannon wrote [1]: .. > I say this every time I give an import talk and it has been brought up here > before but obviously not everyone catches it (which is understandable as I > think when it came up on python-dev i

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-07-13 Thread Jonathan Halcrow
Jonathan Halcrow added the comment: The most recent version on pypi (20100709) seems to be missing _regex_core from py_modules in setup.py. Currently import regex fails, unable to locate _regex_core. -- nosy: +jhalcrow ___ Python tracker

[issue9253] argparse: optional subparsers

2010-07-13 Thread Vincent Driessen
Vincent Driessen added the comment: Changed the title, so it shows that the feature request is for argparse. -- title: optional subparsers -> argparse: optional subparsers ___ Python tracker ___

[issue9253] optional subparsers

2010-07-13 Thread Vincent Driessen
New submission from Vincent Driessen : **NOTE**: This is a re-post of http://code.google.com/p/argparse/issues/detail?id=47 What steps will reproduce the problem? parser = argparse.ArgumentParser() sub = parser.add_subparsers() sub.add_parser("info") parser.add_argument("paths", "+") parser.par

[issue9245] "from itertools imoprt *" crashes 2to3

2010-07-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: Star import problem was already fixed. Snared the other one in r82855. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread R. David Murray
R. David Murray added the comment: Autotest runs the Python regression suite, it just does it a different way. And it still works on trunk. Since it isn't documented (I wasn't even aware it existed), maybe we should just delete it. :) Note that I'm not saying there's no bug here. But import

[issue9252] PyImport_Import calls __import__ with dummy fromlist

2010-07-13 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : I have discovered this issue while working on the unit tests for issue 7989. In the first version of the setUp/tearDown overrides, I made a mistake when restoring sys.modules after the test run. The fix was to do sys.modules.__init__(saved_sys_module

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Brett Cannon
Brett Cannon added the comment: The wording is poor. I'm going to fix them so it's obvious that the test package is meant for core developers only. -- nosy: +brett.cannon ___ Python tracker ___

[issue9251] Test for the import lock

2010-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: test_threaded_import is designed to check the import lock (and it does at least to some degree - I changed runpy's handling of the import lock because my original approach broke that test). (Haven't looked at this patch in detail as yet) --

[issue7384] curses crash on FreeBSD

2010-07-13 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: You shouldn't use ldd. I suggest that setup.py try to link a small executable, which would use a function from libcurses and would be linked against libreadline, but not libcurses. If linking succeeds, then you libreadline is linked again

[issue1581183] pickle protocol 2 failure on int subclass

2010-07-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- components: +Documentation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue7384] curses crash on FreeBSD

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: In Ubuntu I can build just fine with lt_LT.UTF-8. So perhaps this problem should be addressed in Gentoo. -- ___ Python tracker ___

[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-13 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-07-13 Thread Mark Dickinson
Mark Dickinson added the comment: Please read the three sentences directly preceding that table and tell me whether they clear this up for you. -- assignee: theller -> mark.dickinson nosy: +mark.dickinson ___ Python tracker

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +merwok ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue7384] curses crash on FreeBSD

2010-07-13 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: These changes break building of Python 3.* in some locales in Gentoo. running build running build_ext Traceback (most recent call last): File "./setup.py", line 1812, in main() File "./setup.py", line 1807, in main "Tools/scrip

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: Antoine, thanks! Committed in release27-maint (r82853). Zsolt, could you confirm that issue9185-2.patch (or r82853) works for you? -- ___ Python tracker

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Xavier de Gaye
Xavier de Gaye added the comment: http://pyclewn.sourceforge.net uses the regrtest module to run its testsuite. The test package is documented in the Standard Library documentation, quote: "The test package contains all regression tests for Python as well as the modules test.test_support and te

[issue9251] Test for the import lock

2010-07-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file17991/mtimport.py ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue9251] Test for the import lock

2010-07-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file17990/mtimport.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue9251] Test for the import lock

2010-07-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : The import lock is lacking tests that it functions properly. Coming up with a way of checking it was unexpectedly hard. I finally managed to write a script which quite reliably fails if you patch Python/import.c to not take the import lock. The script relie

[issue9247] imp.reload() doesn't take import lock

2010-07-13 Thread Brett Cannon
Brett Cannon added the comment: So the import lock is to prevent trying to import the same module, right? If you are doing a reload, the module is basically already there. But what if you context switch while reloading? That would be bad as that would give you inconsistent state. So it proba

[issue2919] Merge profile/cProfile in 3.0

2010-07-13 Thread Brett Cannon
Brett Cannon added the comment: Alexandre has commit privs so he could just go ahead and commit if he wants. I do hope to look at this code at some point in my life. I will see if I can't find time at EuroPython next week, especially if Alexander has fixes to it and still feels the need for a

[issue2919] Merge profile/cProfile in 3.0

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is this a case of pure python implementation with a C speedup? Can you upload the patch to Rietveld? I'll take a look once it is there. -- nosy: +belopolsky ___ Python tracker

[issue2548] Undetected error in exception handling

2010-07-13 Thread Brett Cannon
Brett Cannon added the comment: It theoretically could be backported so it can stay open for now if someone feels adventurous to backport before 2.6.6. Once that's out the door, though, this can get closed. -- ___ Python tracker

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread R. David Murray
R. David Murray added the comment: Why are you importing regrtest? It isn't designed to be imported, really. Or at least, not any more. -- nosy: +r.david.murray type: crash -> behavior ___ Python tracker ___

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nice! The patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: OpenBSD has the same getcwd() bug. It was uncovered by raising current_path_length to 4099 in test_posix. Here is a new patch that enables the changed posix_getcwd() function on Solaris and OpenBSD only. I've tested the patch on Linux, OpenSolaris, OpenBSD and Fr

[issue9250] sys.modules changes size during iteration in regrtest module

2010-07-13 Thread Xavier de Gaye
New submission from Xavier de Gaye : Python 2.7 - svn revision 82852 Bug description === Test script foo.py -- #!/usr/bin/env python import distutils.core import test.regrtest Exception when running foo.py - Traceback (most

[issue4179] pdb: Allow the "list" command to return to the currently debugged line

2010-07-13 Thread R. David Murray
R. David Murray added the comment: I think this sounds like a reasonable suggestion. Adding Georg to nosy since he seems to have had the most interest in pdb features according to the svn log ;) -- nosy: +georg.brandl, r.david.murray ___ Python tr

[issue4112] Subprocess: Popen'ed children hang due to open pipes

2010-07-13 Thread R. David Murray
R. David Murray added the comment: The suggestion looks reasonable to me, and the current behavior does not look like an intentional design. Boye, would you be interested in proposing a patch with unit tests? -- nosy: +r.david.murray stage: -> unit test needed versions: +Python 2.7,

[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-07-13 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: +brian.curtin versions: +Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue4236] Crash when importing builtin module during interpreter shutdown

2010-07-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The bug is still present in 2.7, and 3.2. -- nosy: +belopolsky ___ Python tracker ___ ___ Pyth

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: While looking at your patch in issue 9244, I realized that my code fails to handle an unpickleable task, as in: """ #!/usr/bin/env python import multiprocessing foo = lambda x: x p = multiprocessing.Pool(1) p.apply(foo, [1]) """ This should be fixed by the attac

[issue9243] sndhdr erroneously detects files as vox

2010-07-13 Thread James Lee
James Lee added the comment: Thanks for the update... The link was actually just a "diff to previous" of the changelist that caused the problem (r56987), sorry for the confusion. :) Attached is a quick and dirty unittest complete with some test files. It only tests the format of the file thou

[issue5544] test_fileio fails on windows MSVC Assertion

2010-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: Closed as stated fixed in revision 70582. -- nosy: +BreamoreBoy resolution: -> fixed stage: -> committed/rejected ___ Python tracker ___ __

[issue4841] io's close() not handling errors correctly

2010-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: Please note the comment from Victor:- "Python 3.x is also affected by this issue: file_init() and dircheck() ignore self->closefd." -- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python track

[issue9244] multiprocessing.pool: Worker crashes if result can't be encoded

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: This looks pretty reasonable to my untrained eye. I successfully applied and ran the test suite. To be clear, the errback change and the unpickleable result change are actually orthogonal, right? Anyway, I'm not really familiar with the protocol here, but a

[issue1596321] KeyError at exit after 'import threading' in other thread

2010-07-13 Thread Laurent Mazuel
Laurent Mazuel added the comment: Another solution for cx-freeze problem: http://code.google.com/p/modwsgi/issues/detail?id=197#c5 Which can be added in ConsoleKeepPath.c for instance -- nosy: +Laurent.Mazuel ___ Python tracker

[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-07-13 Thread hannes reuter
New submission from hannes reuter : on http://docs.python.org/library/struct.html in section 7.3.2.2. Format Characters in the table one can find that L -> unsigned long -> integer-> should have a 4 byte dataspace. (same applies for l), which seems to be correct -> 32bit/8=4 On a Ubuntu 64 ,

[issue876421] logging handlers raise exception on level

2010-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: - Original Message > Mickey Killianey added the comment: > > Or were you suggesting logging.basicConfig? The limitation of basicConfig >seems to be that it only works on an unconfigured root logger, not on a named >logger, and it doesn't work if a

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +bethard versions: +Python 3.2 -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue3620] test_smtplib is flaky

2010-07-13 Thread Mark Lawrence
Changes by Mark Lawrence : -- resolution: -> fixed stage: -> committed/rejected type: -> behavior ___ Python tracker ___ ___ Python-

[issue9243] sndhdr erroneously detects files as vox

2010-07-13 Thread R. David Murray
R. David Murray added the comment: Oh, and the reason it got changed to startswith is probably a micro-optimization: startswith is more efficient than doing a slice-and-compare. -- ___ Python tracker _

[issue9243] sndhdr erroneously detects files as vox

2010-07-13 Thread R. David Murray
R. David Murray added the comment: Since email uses this and it doesn't look like anyone else is likely to have much knowledge of this module, I'm going to assign it to myself so I don't forget about it. This module has no unit tests. It would be really great if you could create some to at

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-13 Thread Greg Brockman
Greg Brockman added the comment: > What kind of errors are you having that makes the get() call fail? Try running the script I posted. It will fail with an AttributeError (raised during unpickling) and hang. I'll note that the particular issues that I've run into in practice are: - OOM kill d

[issue9245] "from itertools imoprt *" crashes 2to3

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- type: -> behavior versions: +Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue9245] "from itertools imoprt *" crashes 2to3

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue9246] os.getcwd() hardcodes max path len

2010-07-13 Thread R. David Murray
Changes by R. David Murray : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue3402] test_nis is hanging on Solaris

2010-07-13 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- nosy: -ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I wasn't really precise. The test fails on Linux, but for a different reason. > Linux legitimately sets ENAMETOOLONG and raises OSError. This only becomes > apparent when using 4098 in the test. > > Solaris, on the other hand, does not even raise, since it ke

[issue3402] test_nis is hanging on Solaris

2010-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: This test is still disabled in Python 2.7 and 3.1. -- nosy: +BreamoreBoy, ronaldoussoren ___ Python tracker ___ _

[issue9246] os.getcwd() hardcodes max path len

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Just as a reminder: In 2.x, posix_getcwdu() also uses a buffer of size > 1026. I suppose the implementation was simply copied into py3k, then. Still, it's not a very good idea and it will also be a regression when porting scripts from 2.x to 3.x. --

[issue9248] multiprocessing.pool: Proposal: "waitforslot"

2010-07-13 Thread Ask Solem
Changes by Ask Solem : -- keywords: +patch Added file: http://bugs.python.org/file17985/multiprocessing-tr...@82502-apply-semaphore.patch ___ Python tracker ___ _

[issue9248] multiprocessing.pool: Proposal: "waitforslot"

2010-07-13 Thread Ask Solem
New submission from Ask Solem : This patch adds the `waitforslot` argument to apply_async. If set to `True`, apply_async will not return until there is a worker available to process the job. This is implemented by a semaphore that is released by the result handler whenever a new result is rea

[issue9246] os.getcwd() hardcodes max path len

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: Just as a reminder: In 2.x, posix_getcwdu() also uses a buffer of size 1026. -- versions: +Python 2.7 ___ Python tracker ___ __

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-07-13 Thread Douglas Turk
Changes by Douglas Turk : -- keywords: +patch Added file: http://bugs.python.org/file17984/fix_zipfile_crc_issue_7467.patch ___ Python tracker ___

[issue9247] imp.reload() doesn't take import lock

2010-07-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : I am not sure this is important or now, but reload() (imp.reload() in 3.x) doesn't take the import lock when reloading: $ echo 'import imp; print("lock held =", imp.lock_held())' > foo.py $ ./python -c 'import imp, foo; imp.reload(foo)' lock held = True lock

[issue2919] Merge profile/cProfile in 3.0

2010-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: Is there anyone who could review this, it seems a shame that someone's work has been sitting in limbo for over a year? -- nosy: +BreamoreBoy ___ Python tracker

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Pretty much anything mentioned in PEP 302 is what is being protected. Alright, my question was more along the lines of "what *needs* to be protected". The import lock is currently like the GIL: a very simple (and therefore suboptimal) answer to a complex prob

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou wrote: > > If you change 1027 to 4098, the test currently fails on Linux, too. I > > think the only > > reason why it never failed is that most systems have PATH_MAX=4096. > > Ok, then perhaps the test should be fixed? I wasn't really precise. The

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: Added Guido as well, to see how much he remembers from back when Christian's patch went in. We may want to take this over to python-dev... -- nosy: +gvanrossum ___ Python tracker _

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: Pretty much anything mentioned in PEP 302 is what is being protected. The one which causes most of the grief is the fact that we need to stick a partially initialised module into sys.modules (so the module can find itself if it needs to), then take it out again

[issue2548] Undetected error in exception handling

2010-07-13 Thread Mark Lawrence
Mark Lawrence added the comment: This has been fixed in Python 2.7, I suppose that the code could be backported to 2.6, or is it now too late so this can be closed as "won't fix"? -- nosy: +BreamoreBoy ___ Python tracker

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hm, on Linux I can't use os.getcwd() with paths longer than PATH_MAX > as things are now: Oh, right. I was assuming 1024 for PATH_MAX when doing my tests, but it really is 4096. > > Second, the test_posix change is a bit too tolerant. IMO it should > check t

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is there some documentation somewhere of which global variables the import lock is meant to protect? Perhaps it wouldn't need to be held during the whole module initialization process. -- nosy: +pitrou ___ Python t

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Stefan Krah
Stefan Krah added the comment: Thanks for having a look at the patch! Antoine Pitrou wrote: > I'm not sure I understand the cause of the problem. Does getcwd() fail on > Solaris when the path length is higher than PATH_MAX, even if you pass a big > enough buffer? If the path length exceeds

[issue9241] SAXParseError on unicode (Japanese) file

2010-07-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Your file contains the byte \x1a == EOF. You should not open it in text mode, but in binary mode, otherwise it's truncated. import xml.sax xml.sax.parse(open("ff1a.xml", 'rb'), xml.sax.ContentHandler()) works on all versions I tried. -- nosy: +

[issue9246] os.getcwd() hardcodes max path len

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Even on systems where MAX_PATH is 1024 (a common value), it is still > valid to create paths larger than that (using e.g. os.mkdir()). It seems I am mistaken on that. MAX_PATH is actually 4096 on the Linux system I am testing on. Calling getcwd() in a path l

[issue9245] "from itertools imoprt *" crashes 2to3

2010-07-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: A related issue: from itertools import chain, izip, imap This results in an invalid transformation: -from itertools import chain, izip, imap +from itertools import chain, The translated version is an invalid import statement with a ',' at the end of t

[issue9244] multiprocessing.pool: Worker crashes if result can't be encoded

2010-07-13 Thread Jesse Noller
Changes by Jesse Noller : -- assignee: -> jnoller nosy: +gdb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others.

2010-07-13 Thread Nick Coghlan
Nick Coghlan added the comment: OK, finally tracked down some of the history here. Issue 1567 is the one where Christian developed the relevant patch which was then committed as r59678. Issue 7980 is also potentially related (although that's apparently a Mac OS X crash involving time.strptime

[issue9246] os.getcwd() hardcodes max path len

2010-07-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : In 2.x, os.getcwd() uses a dynamic allocation scheme to accomodate whatever buffer size the current path needs to be represented. In 3.x, the max path length is hardcoded to 1026 bytes or characters, and an error is raised if the current path length is larg

[issue9185] os.getcwd causes infinite loop on solaris

2010-07-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure I understand the cause of the problem. Does getcwd() fail on Solaris when the path length is higher than PATH_MAX, even if you pass a big enough buffer? First, your patch makes getcwd() return an error when the path length is longer than PATH_MA

  1   2   >