[issue9335] LC_CTYPE system setting not respected by setlocale()

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

[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: This might be caused by the fix for issue7072 (which is mentioned in the NEWS file). -- ___ Python tracker ___ ___

[issue9354] fire_wrapper fails to provide getsockopt()

2010-07-23 Thread Łukasz Langa
New submission from Łukasz Langa : Tested on Python 3.2a0 on Mac OS 10.6.4. When you specify the most basic `file_dispatcher` and run the loop, `file_wrapper` fails because it doesn't provide the `getsockopt()` to fake being a socket. The code import asyncore import os class FileDi

[issue9026] argparse subcommands not printed in the same order they were added

2010-07-23 Thread Javier Collado
Javier Collado added the comment: The hasattr expressions were added to TestHelpFormattingMetaclass because: - A new attribute (subparsers_signature) was added in test classes that wasn't used in the past. - The new test classes didn't make use of some of the already in place attributes (argum

[issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help

2010-07-23 Thread Steven Bethard
New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=78] What steps will reproduce the problem? 1. Create two mutually exclusive groups: eg agroup = subcmd_parser.add_mutually_exclusive_group() agroup.add_argument('--a1', action='store_true', help=

[issue9354] fire_wrapper fails to provide getsockopt()

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: Here goes the patch. -- keywords: +patch Added file: http://bugs.python.org/file18149/issue9354.diff ___ Python tracker ___ __

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2010-07-23 Thread Steve Holden
Steve Holden added the comment: The test program Larry provided does not appear to function as intended on Windows, and runs without either producing error messages or requiring interactive input. Here's a typical output, in this case from Python 3.1 on Vista: C:\Users\sholden\Documents\issu

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

2010-07-23 Thread Brian Curtin
Brian Curtin added the comment: One additional change was needed to compile on Windows: Index: PC/config.c === --- PC/config.c (revision 83087) +++ PC/config.c (working copy) @@ -116,7 +116,7 @@ {"parser", PyInit_parser},

[issue9354] file_wrapper fails to provide getsockopt()

2010-07-23 Thread Łukasz Langa
Changes by Łukasz Langa : -- title: fire_wrapper fails to provide getsockopt() -> file_wrapper fails to provide getsockopt() ___ Python tracker ___ __

[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: Fixed in r83091. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue9356] Improved tests and style for fnmatch

2010-07-23 Thread Brian Brazil
New submission from Brian Brazil : The attached path adds tests for translate and filter, and also fixes a few style issues in fnmatch itself. -- components: Interpreter Core files: fnmatch_test_and_cleanup.patch keywords: patch messages: 111340 nosy: bbrazil priority: normal severity:

[issue9356] Improved tests and style for fnmatch

2010-07-23 Thread Brian Brazil
Changes by Brian Brazil : Removed file: http://bugs.python.org/file18150/fnmatch_test_and_cleanup.patch ___ Python tracker ___ ___ Python-bugs-

[issue9356] Improved tests and style for fnmatch

2010-07-23 Thread Brian Brazil
Brian Brazil added the comment: It helps if the diff is from the root... -- Added file: http://bugs.python.org/file18151/fnmatch_test_and_cleanup.patch ___ Python tracker ___ ___

[issue9167] argv double encoding on OSX

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Daniele: never mind, you already said you are on OSX 10.4. The current behavior is only a problem when the system default encoding as implied by LANG is different from the fileystem encoding. How to fix this is an entirely different question: most (all?) uni

[issue8879] Implement os.link on Windows

2010-07-23 Thread Brian Curtin
Changes by Brian Curtin : -- dependencies: +Add ntpath.sameopenfile support for Windows ___ Python tracker ___ ___ Python-bugs-list mai

[issue6064] Add "daemon" argument to threading.Thread constructor

2010-07-23 Thread Steven Alderson
Steven Alderson added the comment: Hello, I've taken the liberty of updating the two patch files here for python3.2 at revision 83065. Apologies if I'm treading on anyones toes here. I'm taking part in a europython sprint and this is the first time I've tried this. I've modified the multip

[issue6064] Add "daemon" argument to threading.Thread constructor

2010-07-23 Thread Steven Alderson
Steven Alderson added the comment: Here's the patch for multiprocessing based on python 3 revision 83065, all credit to the original author, all problems probably mine! Steven -- Added file: http://bugs.python.org/file18153/multiprocessing3k.diff __

[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > This might be caused by the fix for issue7072. Ronald, You are absolutely right. Reverting r80178 in the trunk restores the old behavior. > msg103494: > Fixed in r80178 (trunk), r80180 (2.6), r80182 (3.2), r80183 (3.1) I think this can be closed as

[issue6064] Add "daemon" argument to threading.Thread constructor

2010-07-23 Thread Brian Brazil
Brian Brazil added the comment: I've updated the patch for 3.2 and improved the documentation formatting. -- nosy: +bbrazil ___ Python tracker ___ ___

[issue6064] Add "daemon" argument to threading.Thread constructor

2010-07-23 Thread Brian Brazil
Brian Brazil added the comment: Looks like it lost my patch, but Steven's does the same. One tweak: in threading.rst put all of the class signature on one line or the html formatting will be a bit off. -- ___ Python tracker

[issue9344] please add posix.getgrouplist()

2010-07-23 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky components: +Extension Modules stage: -> needs patch type: -> feature request ___ Python tracker ___ __

[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Why do you think this may have security implications? I'm closing this as out of date because the issue is fixed and the fix is imho inappropriate for a backport to 2.6 due to the change in behaviour. -- status: pending -> closed ___

[issue9346] Improve threading tests

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: r83094 and r83095 -- nosy: +brett.cannon resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Accepting binary input where only letters are expected by an application is a very common source of security holes. An application that relies on s.isalpha() to guarantee that s does not contain non-ASCII characters when UTF-8 locale is in use, may ha

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I'll take a look. Mark, "commit review" is a stage after a patch was reviewed by a committer and is deemed appropriate. Usually this comes with an "accepted" resolution. Sometimes "commit review" is skipped for simple patches, but in most cases, at

[issue2304] subprocess under windows fails to quote properly when shell=True

2010-07-23 Thread Mark Lawrence
Mark Lawrence added the comment: @Tim: @Gabriel: test_subprocess has changed a lot since the patch was done. If one of you could provide a new patch for 2.7 and py3k I'll test it, thanks. -- nosy: +BreamoreBoy versions: -Python 2.6 ___ Python trac

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed a port to python3 for os-getgroups-v3.patch in r83088, including test cases (contrary to what I wrote before). Backports: 3.1: r83093 I'll backport to 2.7 and 2.6 tomorrow. To complete the documentation for picking this patch: I've spoken with an

[issue9357] Improve queue tests

2010-07-23 Thread Brian Brazil
New submission from Brian Brazil : The attached patch improves the code coverage of queue to 98% by testing empty, full, put_nowait, get_nowait and some error conditions. -- components: Library (Lib) files: test_queue.patch keywords: patch messages: 111354 nosy: bbrazil priority: normal

[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-07-23 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -tjreedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6812] Snow Leopard python program fails because _PyType_Modified is missing from python framework

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Closing as invalid as I cannot reproduce the issue, this seems to be an issue with Apple's copy of Python and the sys.path settings seem odd at best. -- status: open -> closed ___ Python tracker

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

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Brian, thanks for the fix and for testing. I am attaching a commit-ready patch issue7989e.diff, that includes Brian's fix and a few white-space changes. I hope I've resolved the SVN issue: I was working in a read-only checkout while sandbox checkout w

[issue9356] Improved tests and style for fnmatch

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: r83100 and r83101 -- nosy: +brett.cannon resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue9358] Document fnmatch.translate's lack of support for escaping

2010-07-23 Thread Brian Brazil
New submission from Brian Brazil : fnmatch.translate's docstraing says "There is no way to quote meta-characters.", but this isn't in the html docs. The attached patch fixes that. -- assignee: d...@python components: Documentation files: fnmatch_translate_doc.patch keywords: patch mess

[issue9359] Misspelled exception

2010-07-23 Thread Piotr Kasprzyk
New submission from Piotr Kasprzyk : Misspelled: exception -- components: IDLE files: misspelled_exception.diff keywords: patch messages: 111359 nosy: kwadrat priority: normal severity: normal status: open title: Misspelled exception versions: Python 3.2 Added file: http://bugs.python.or

[issue8410] Fix emulated lock to be 'fair'

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: It turns out that posix semaphores aren't supported on OSX. The patch doesn't apply cleanly anymore, and that is not just because of whitespace issues (the patch contains tabs while the tree no longer does). The chunk that affects 'PyThread_acquire_lock_ti

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Peter Donis
Peter Donis added the comment: @Mark, no problem, thanks for keeping up with all my patches. :-) -- ___ Python tracker ___ ___ Python-

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-07-23 Thread Daniel Urban
Daniel Urban added the comment: The attached patch adds the isdisjoint method to dict_keys and dict_items. Pseudocode for the method: def isdisjoint(self, other): if self is other: if len(self) == 0: return True else: return False else: fo

[issue9264] trace.py documentation is incomplete

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: To the doc person who reads this: this patch is only the first for this issue. It is being submitted now since the 2.6.6 release candidate is due in 10 days. Please leave the issue open after committing this. I have read the diff but not the patched result (c

[issue9360] nntplib cleanup

2010-07-23 Thread Dmitry Jemerov
New submission from Dmitry Jemerov : The patch performs an extensive cleanup of nntplib: - Change API methods to return strings instead of bytes. This breaks API compatibility, but given that the parameters need to be passed as strings and many of the returned values would need to be passed to

[issue9357] Improve queue tests

2010-07-23 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue9357] Improve queue tests

2010-07-23 Thread Brett Cannon
Brett Cannon added the comment: r83108 -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue9358] Document fnmatch.translate's lack of support for escaping

2010-07-23 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue4640] optparse doesn’t disallow adding one-da sh long options (“-option”)

2010-07-23 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -tjreedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1441530] socket read() can cause MemoryError in Windows

2010-07-23 Thread Márcio Faustino
Márcio Faustino added the comment: I got that error on Windows 7 Professional 64 bits, using Python 2.6.4 64 bits. I just changed the "imaplib.IMAP4_SSL" class, by making the "read" and "readline" functions use "cStringIO.StringIO()" instead of an array of strings for "chunks = []".

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-23 Thread Anders Kaseorg
Anders Kaseorg added the comment: > Note that the negative number heuristic you're complaining about > doesn't actually affect your code below. Yes it does: >>> import argparse >>> parser = argparse.ArgumentParser(prog='a2x') >>> parser.add_argument('--asciidoc-opts', ... action='store', d

[issue8507] abc.abstractproperty does not copy docstring

2010-07-23 Thread Daniel Urban
Daniel Urban added the comment: I tried, and wasn't able to reproduce with py3k (r83091), 3.1.2, release27-maint (r83111), release26-maint (r83111). -- nosy: +durban ___ Python tracker

[issue9360] nntplib cleanup

2010-07-23 Thread R. David Murray
R. David Murray added the comment: I haven't looked at the patch in detail, but if my quick skim is correct, it looks like you are decoding using latin1. If you don't provide any way to get at the original bytes (which I presume you don't if you have "converted the API to return strings"), t

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Ron Adam
Ron Adam added the comment: Thank You for the review Mark. It's very much appreciated. I took another look at it and decided to offer another patch that moves the html/text server to the http package where the rest of the server stuff is. I also corrected the example in it. Everything still w

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ron, Can you add a Misc/NEWS entry summarizing your change? Also, please check if any changes need to be made to ReST documentation, Doc/library/pydoc.rst . Ka-Ping, Do you want to hold on to this, you can I take it over? -- nosy: +belopolsk

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: For 2.6 and 3.1, this is a documentation only issue. For 2.7, this is a doc + behavior issue. For 3.2, this is a doc + behavior + new feature issue. For 2.6.6 (release candidate due Aug 2, 10 days), I propose to add the following paragraph after the current 'T

[issue9361] Tests for leapdays in calendar.py module

2010-07-23 Thread John Chandler
New submission from John Chandler : Hi, Attaching a patch for the test_calendar.py file. Adds four tests to provide coverage of the leapdays() function. John -- components: Tests files: test_calendar.diff keywords: patch messages: 111373 nosy: John.Chandler priority: normal severity:

[issue9362] Make exit/quit hint more novice friendly

2010-07-23 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : This bikeshed have been repainted several times already, but here is a true story. Cast: Me = myself Novice = a 14-year-old boy Laptop = a MacBook Air Novice: How do i exit [from python prompt]? Me: What's your best guess? Novice: [typing] exit [pres

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

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r83112. -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Titles that fit in the box, like 'Dict.keys lacks .isjoint method.' are easier to read and keep track of. Unless there is a reason I have missed, I would iterate through the smaller set, which might even be empty or nearly so, rather than either in particular

[issue7566] Add ntpath.sameopenfile support for Windows

2010-07-23 Thread Brian Curtin
Brian Curtin added the comment: Here's a patch implementing ntpath.sameopenfile with _getfileinformation in Modules/posixmodule.c. Martin's suggestion is the best way of doing this, which was the basis for _getfileinformation implementation. It returns a tuple of the three relevant fields, a

[issue9218] pop multiple elements of a list at once

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with Raymond, as did, I believe, most of the participants in the thread beginning with http://mail.python.org/pipermail/python-ideas/2010-July/007563.html -- nosy: +tjreedy resolution: -> rejected stage: -> committed/rejected status: open ->

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Ron Adam
Ron Adam added the comment: Here's the new patch with the Misc/NEWS and pydoc.rst additions added to it. I'm not sure if local_text_server is the best name for the server module. In pydoc it's a local server, but it may not be limited to that use. I've also considered text_server, text_html_s

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jul 23, 2010 at 4:08 PM, Ron Adam wrote: .. > Here's the new patch with the Misc/NEWS and pydoc.rst additions added to it. s/Romoved/Removed/ -- ___ Python tracker

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: s/navagation/navigation/ Please spell-check your changes. -- ___ Python tracker ___ ___ Pytho

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Ron Adam
Ron Adam added the comment: Sorry, will do... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue9360] nntplib cleanup

2010-07-23 Thread Dmitry Jemerov
Dmitry Jemerov added the comment: This is an issue only for the actual article content, right? I'll be happy to extend the API to allow getting the original bytes of the article content, while keeping the rest of API (like group names) string-based. -- ___

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: +:program:`pydoc` :option:`-g` will start the server and additionally open a web +browser to a module index page. Each served page has a navagation bar at the +top where you can 'get' help on a individual item, 'find' all modules with a +keyword in thier

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ron, Your latest patch does not work for me: $ ./python.exe -m pydoc -g Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k-commit/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File

[issue9226] erroneous behavior when creating classes inside a closure

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Chris, when posting something like this, *please* include the output. I had to insert ()s to run this with 3.1. I will upload the py3 version as test3.py. Is your output the same as mine? x: success Test.x: error Test2.y: success Test3.x: error Test3.y: error

[issue2001] Pydoc interactive browsing enhancement

2010-07-23 Thread Ron Adam
Ron Adam added the comment: Ok, spell, check and attribute error corrected. I agree on the -p / -g issue. I'll bring this up on python dev. Thanks for the reviews and feedback. It really helps. -- Added file: http://bugs.python.org/file18165/pydoc_server3.diff

[issue9237] Add sys.call_tracing to on-line sys module documentation

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified that in 3.1, sys.call_tracing exists but is undocumented. I also noticed that the sys doc entries are *almost* in alphabetical order. Out of place: subversion, dont_write_bytecode, api_version Reversed pairs (abbreviated) copyright clearxxx dllxxx

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

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: On WinXP, 3.1, I get ... mkdir: 242 Traceback (most recent call last): File "C:\Programs\Python31\misc\t1.py", line 14, in os.mkdir(s) WindowsError: [Error 206] The filename or extension is too long: 'C:\\Programs\\Python31\\misc\\ab\\ab\\ab\

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

2010-07-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.2: r83072 3.1: r83076 2.7: r83077 -- nosy: +tjreedy ___ Python tracker ___ ___ Python-bugs-list ma

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

2010-07-23 Thread Stefan Krah
Stefan Krah added the comment: Terry J. Reedy wrote: > mkdir: 242 > Traceback (most recent call last): > File "C:\Programs\Python31\misc\t1.py", line 14, in > os.mkdir(s) > WindowsError: [Error 206] The filename or extension is too long: > 'C:\\Programs\\Python31\\misc\\ab\\ab\\

[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Mark Lawrence
Mark Lawrence added the comment: @Alexander: If I understand this correctly it means that there is effectively no distinction betwen "patch review" and "commit review". Hence it is perfectly possible that the work that myself and Peter have put in goes down the drain? This is not acceptable

[issue9264] trace.py documentation is incomplete

2010-07-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: If the changes are to the documentation only, you've confirmed that the docs build in 2.6.6, and you get the changes in before 2.6.6rc1, then you can go ahead and commit them. I don't need to review them too closely - I trust you - but if you want me to do

[issue4629] getopt should not accept no_argument that ends with '='

2010-07-23 Thread Mark Lawrence
Mark Lawrence added the comment: msg84276 "the patch is good". What is the problem with committing this? -- ___ Python tracker ___ __

[issue9359] Misspelled exception

2010-07-23 Thread Brian Curtin
Brian Curtin added the comment: Fixed by Ezio Melotti in r83103. -- nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker _

[issue9363] data_files are not installed relative to sys.prefix

2010-07-23 Thread rioch
New submission from rioch : In the disutils documentation for data_files, it states: "If directory is a relative path, it is interpreted relative to the installation prefix (Python’s sys.prefix for pure-Python packages, sys.exec_prefix for packages that contain extension modules)." However,

[issue4510] ValueError for list.remove() not very helpful

2010-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Amaury, I agree about having a limit. It is a really bad idea to dump the full list repr for a potentially huge list or even for a small list of objects with huge individual reprs. We should limit the output to just a few characters at most or risk spew

[issue9359] Misspelled exception

2010-07-23 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks Piotr for the patch and Brian for closing the issue! -- nosy: +ezio.melotti ___ Python tracker ___

[issue7113] ConfigParser load speedup

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: Won't happen for Python 2.x but the idea is good. The original patch won't apply for Py3k so I implemented this approach from scratch for Python 3.2. Patch included. Some microbenchmarks of mine show: - a 3-5% slowdown for very small files (we can ignore this s

[issue1506122] Add "compose" function to the functools

2010-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree with Amaury that this should be closed. It has been previously discussed and rejected in other forums. One the issues is that the usual mathematical order is unintuitive and not self-documenting -- i.e. is compose(f,g) the same as f(g(x)) or g(

[issue7830] Flatten nested functools.partial

2010-07-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine> Flattening should only happen for instances of the exact type. FWIW, I agree with Antoine. You cannot know in advance whether a partial-subclass has semantics that need to be preserved when flattening. -- nosy: +rhettinger ___

[issue9167] argv double encoding on OSX

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: > This may be very hard to fix I wrote a patch to fix this problem: see #8775. -- ___ Python tracker ___ __

[issue5673] Add timeout option to subprocess.Popen

2010-07-23 Thread Reid Kleckner
Reid Kleckner added the comment: On Thu, Jul 22, 2010 at 9:05 AM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > The documentation should mention somewhere that timeout can be a float.  For > example, as in time.sleep docstring: > > """ >    sleep(seconds) > >    

[issue9360] nntplib cleanup

2010-07-23 Thread R. David Murray
R. David Murray added the comment: Correct, if by 'article content' you mean what is returned by the article command. So I think it is necessary to be able to get bytes for two commands: article and body. Then for symmetry it should also be possible to get bytes from the head command. (It

[issue4686] Exceptions in ConfigParser don't set .args

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: Sound argument. I've prepared a patch for Py3k that adds `args` for all exceptions. Unit tests were modified as to check whether the `args` are set correctly (which helped finding a couple of flaky assertions in the tests themselves :)). Brett, the code change

[issue4629] getopt should not accept no_argument that ends with '='

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: Fixed in 3.2 (r83116), 2.7 (r83117), 3.1 (r83118) and 2.6 (r83119). -- resolution: accepted -> fixed status: open -> closed ___ Python tracker _

[issue1682942] ConfigParser support for alt delimiters

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: Part of the patch has already been independently implemented (support for custom `dict_type`s). As for the custom delimiters the patch is somewhat incomplete. Let's take for instance delimiting by space characters (e.g. `delimiters = (" ", )`). ConfigParser wou

[issue9283] buggy repr for os.environ

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: Patch to fix _Environ.__repr__(), regression introduced by #8603. -- keywords: +patch Added file: http://bugs.python.org/file18168/os_environ_repr.patch ___ Python tracker

[issue231540] threads and profiler don't work together

2010-07-23 Thread Ned Batchelder
Ned Batchelder added the comment: Isn't this problem solved by the threading.settrace and threading.setprofile functions? -- nosy: +nedbat ___ Python tracker ___ _

[issue8888] Promote SafeConfigParser and warn about ConfigParser

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: This issue is superseeded by issue #6517 (because the other has an actual patch). Brett, shall we close this as duplicate and resolve the original? -- nosy: +brett.cannon, lukasz.langa ___ Python tracker

[issue6517] configparser: add possibility to escape formatstrings

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: This issue superseeds # because of the patches attached. Brett, there are two ways we can solve this issue: 1. Rewrite the documentation so it clearly puts more emphasis on the fact that SafeConfigParser is the one to choose. 2. We deprecate ConfigParser in

[issue3022] mailbox module, two small fixes

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: self.get_sequences() => self.get_sequences().iteritems() was fixed in trunk (r71046) and py3k (r71067). The patch on .get_sequences() has no test: (test_get_message_with_sequences() doesn't fail without the patch. --

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

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: Patch based on Python 2 source code, but raises a MemoryError (instead of an OSError) on memory allocation failure. With my patch, bigpath.py ends with "cwd: 1028 ...aab/ab" with Python Python 3.2. Same result with Python 2.6. 1028 is bigger than 1026 (pr

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

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure that PyMem_Realloc(NULL, size) is always equivalent to PyMem_Malloc(size). And I don't really know why I'm using PyMem_* instead of malloc() / free() :-) I suppose that Python has a faster memory allocator, or that it has better checks when compi

[issue7519] ConfigParser can't read files with BOM markers

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: This is a sign of a broaded issue and should either be closed as invalid or superseeded by the main BOM issue. Brett, I would close it. -- nosy: +brett.cannon, lukasz.langa ___ Python tracker

[issue7651] Python3: guess text file charset using the BOM

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: I agree with MvL that this is a broader issue that shouldn't be patched in user code (e.g. #7519) but on the codec level. The sniff codec idea seems neat. -- nosy: +lukasz.langa ___ Python tracker

[issue2204] document ConfigParser behaviour when a file has same section multiple times

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: I personally would keep the current behaviour so that: - creating a duplicate section programatically invokes an error - reading a file which has duplicate sections causes an implicit merge without any exceptions This is quite understandable, more so when you co

[issue2651] Strings passed to KeyError do not round trip

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: Alexander, Brett, I could update the patch but first I need thumbs up that this is going to be accepted and some eventual code breaks will be patched (again, I can do that but it has to be accepted on time). Brett, what to do? -- nosy: +brett.cannon, l

[issue9101] reference json format in file formats chapter

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: 1: Agreed. 2: Would use wording like: "The json module can also be used for this purpose." Can be used does not imply that it is its main function but it hints in the right direction. -- nosy: +lukasz.langa ___ Pyth

[issue5412] extend configparser to support [] syntax

2010-07-23 Thread Łukasz Langa
Łukasz Langa added the comment: I'd say we go for it. At the moment most (if not all) "drop-in replacements" for ConfigParser support this functionality. It's backwards compatible and useful. One might argue than it's more pythonic than getfloat() & co. I'd also add attribute-like syntax but

[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: jhylton> Committed revision 70643. I backported the fix to 2.7 (r83122). It's required to fix #9032 (XML-RPC bugà in 2.7. I don't think that it should be backported to 2.6 or 3.1, so I close the issue. -- nosy: +haypo resolution: accepted -> fixed st

[issue9032] xmlrpc: Transport.request() should also catch socket.error(EPIPE)

2010-07-23 Thread STINNER Victor
STINNER Victor added the comment: I fixed the bug in 2.7 (r83123) and 3.2 (r83120). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

<    1   2   3   >