[issue10670] Provide search scope limits

2010-12-10 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: When searching docs (e.g. for http://docs.python.org/dev/search.html?q=unicodecheck_keywords=yesarea=default) I'd like to filter out C API. -- assignee: d...@python components: Documentation messages: 123719 nosy: d...@python,

[issue10660] format() to lower and uppercase

2010-12-10 Thread Hervé Cauwelier
Hervé Cauwelier he...@itaapy.com added the comment: Thanks for the example. The Python 2.7 documentation about the mini-language doesn't clearly state that it is extensible and how. we see examples of formatting but not of extending. Your example would be welcome in the documentation.

[issue10667] collections.Counter object in C

2010-12-10 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10667 ___ ___ Python-bugs-list

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Are the warnings originating in your code, or in the standard library, or elsewhere? If in the standard library, please provide specific details. -- nosy: +eric.smith ___ Python tracker

[issue10668] Array tests have nonsense in them

2010-12-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r87156. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10668 ___

[issue10516] Add list.clear() and list.copy()

2010-12-10 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: That's good if it's so... can you explain why list_clear doesn't guarantee that the list is empty? Why would XDECREF populate the list? I don't quite understand it. Does this mean that durning the Py_DECREF progress the list may be populated

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Rusi
Rusi rustompm...@gmail.com added the comment: Hi Eric Sorry for not being clear. This is more of a feature request than a bug report as suggested by Terry Reedy on the python mailing list (see here http://mail.python.org/pipermail/python-list/2010-December/1262149.html The warnings are in my

[issue985064] plistlib crashes too easily on bad files

2010-12-10 Thread Mher Movsisyan
Mher Movsisyan mher.movsis...@gmail.com added the comment: The attached patch fixes crashes on bad input. The patch implements validation for dict and array elements as well as some resource cleanup. The tests are included as well. -- keywords: +patch nosy: +mher Added file:

[issue10611] sys.exit() in a test causes a test run to die

2010-12-10 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: At the moment exception handling for setUp / tearDown / testMethod and cleanUp functions are all handled separately. They all have to call addError and as a result we have inconsistent handling of skips, expected failures (etc). There

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I've added the logging code to implement and use a logger of last resort as discussed on the thread for http://bit.ly/last-resort-handler into the py3k branch, r87157. Gist of differences is available at https://gist.github.com/736120 -

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: s/logger of last resort/handler of last resort/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10626 ___

[issue10671] urllib2 redirect to another host doesn't work

2010-12-10 Thread Kirill Subbotin
New submission from Kirill Subbotin kir...@gmail.com: When you open url which redirects to another host (either with 301 or 302), HTTPRedirectHandler keeps Host header from the previous request, which leads to a error. Instead a host should be taken from a new location url. Attached patch is

[issue10671] urllib2 redirect to another host doesn't work

2010-12-10 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Can you point me to your code and error traceback that was observed and some details about server which gave 301/302 Redirect as what was the hostname and where did it redirect to? I don't see the code changes that you provided in the

[issue10672] [with] new in version 2.6 instead of 2.5

2010-12-10 Thread Mayweed
New submission from Mayweed norman.dena...@atosorigin.com: In the documentation, the statement with is marked as: New in version 2.5. (http://docs.python.org/reference/compound_stmts.html#the-with-statement) This new statement is new in version 2.6 ! -- assignee: d...@python

[issue10672] [with] new in version 2.6 instead of 2.5

2010-12-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: It is in fact new in 2.5, but only available when using from __future__ import with_statement, which the note near the end of the section details. -- nosy: +georg.brandl resolution: - invalid status: open - closed

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread Brian Cain
New submission from Brian Cain brian.c...@gmail.com: When calling Process' join([timeout]) method, the timeout expiration case is indistinguishable from the successful join. I suppose the 'exitcode' attribute can deliver the necessary information, but perhaps join could stand on its own. If

[issue3992] remove custom log module from distutils2

2010-12-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: distutils2.log has been removed in f6ef30a22a24. I’m leaving this open to remind us we want to remove the warn and announce methods. Logging all the way! -- ___ Python tracker rep...@bugs.python.org

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: My guess is it shouldn't, and yes, but I've added the multiprocessing maintainers as nosy and they can answer definitively. -- nosy: +asksol, jnoller, r.david.murray ___ Python tracker

[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2010-12-10 Thread Ask Solem
Ask Solem a...@opera.com added the comment: While it makes sense for `join` to raise an error on timeout, that could possibly break existing code, so I don't think that is an option. Adding a note in the documentation would be great. -- ___ Python

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Hi Gregory, I saw your commit here: http://code.activestate.com/lists/python-checkins/91914/ This basically means that in 3.2 it is mandatory to specify close_fds to avoid a DeprecationWarning. *BUT* there is no good value that works both

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Ori Avtalion
New submission from Ori Avtalion o...@avtalion.name: Using trunk r87157 The Grammar/Grammar file defines a dictmaker symbol that is no longer referenced in any other symbol. It should be removed. -- components: Interpreter Core messages: 123738 nosy: salty-horse priority: normal

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - d...@python components: +Documentation nosy: +d...@python, ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10669

[issue10644] socket loses data, calling send()/sendall() on invalid socket does not report error and returns all bytes as written

2010-12-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10644 ___

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 9, 2010 at 6:10 PM, Martin v. Löwis rep...@bugs.python.org wrote: .. Please, one issue per report and checkin, The s/5.2/6.0/ issue is hardly worth a tracker ticket. I've committed these changes in r87159.

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +ezio.melotti, haypo, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10665 ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: I'd offer two ideas. 1. Add a constant DISREGARD_FDS to the subprocess module could help. It would allow the user to specify his intent, and let the implementation choose the best action. Popen(..., close_fds=subprocess.DISREGARD_FDS)

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: The cloexec approach still doesn't help with issue 2320. In fact, with threading and people calling subprocess from multiple threads, *this* issue wouldn't be fixed with my patch either unless mutexes are used. It's impossible to avoid

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10674 ___ ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Setting CLOEXEC on the pipes seems like a very good fix for this bug. I'm +1 on it, but I think it should be the default; instead, your proposed patch adds a new argument to the public API. Why do you think it's necessary to do so? At

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file1/subprocess-cloexec-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: I'm +1 on it, but I think it should be the default; instead, your proposed patch adds a new argument to the public API. Why do you think it's necessary to do so? I don't think it's necessary. I put it there because when I was

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Jay Moorthi
New submission from Jay Moorthi moor...@gmail.com: It would be useful to have a new assert method in the unittest.TestCase class that checks to see if a value has changed. I wrote a quick and dirty version like so: class MySpecialTestCase(unittest.TestCase): @contextmanager def

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Would you mind elaborating on where is the race condition? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

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

2010-12-10 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: issue2636-20101210.zip is a new version of the regex module. I've extended the additional checks of the previous version. It has been tested with Python 2.5 to Python 3.2b1. -- Added file: http://bugs.python.org/file20001

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: It's almost exactly the same race condition as the one described in issue 2320. The pipes are created and stay without the CLOEXEC flag for a while (until the process has been forked and fcntl has been called). During that time another

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I think this is the kind of thing where you are *much* better off writing a specialized assert method that exactly fits your use case. There are too many variations on this theme, IMO, for it to make sense as an stdlib method.

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10675 ___ ___

[issue10676] Confusing note in Numeric Types

2010-12-10 Thread Philip Bober
New submission from Philip Bober pdbo...@gmail.com: In the Python Standard Library reference, section 5.4: Numeric Types, the table of operators/functions has the following unclear note: (4)Complex floor division operator, modulo operator, and divmod(). Deprecated since version 2.3: Instead

[issue10667] collections.Counter object in C

2010-12-10 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10667 ___ ___

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I concur with David Murray. Usually you care about the specific value changed to, not whether it changed at all. The changed-by variant is even more specialized and you're better of using assertEqual since you know what

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks for submitting the idea though. Perhaps, post it on the ASPN Cookbook or on the newsgroup to see if others are interested. -- ___ Python tracker rep...@bugs.python.org

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: In issue10665.diff, I completed the character examples in the general categories table. -- Added file: http://bugs.python.org/file20002/issue10665.diff ___ Python tracker

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Ned Deily
Ned Deily n...@acm.org added the comment: (Adding the 3.2 release manager: a potential release blocker?) -- nosy: +georg.brandl, ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread SilentGhost
SilentGhost michael.mischurow+...@gmail.com added the comment: Not sure this worth a patch, to me it looks like a removal of a single word. But here it goes anyway. -- nosy: +SilentGhost Added file: http://bugs.python.org/file20003/stdtypes.rst.diff

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Why? I thought release early, release often was a good thing. Create a branch for that, or post an issue on Rietveld. W-I-P IMO confuses people reviewing the patches, running into the same ones over-and-over again, only to find out every

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-10 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: In bltinmodule.c, it looks like some of the indentation doesn't line up? Bikeshedding aside, it looks good to me. I agree with Eric Smith that the first part macro name usually refers to the type of the first argument (or the type the

[issue985064] plistlib crashes too easily on bad files

2010-12-10 Thread Ned Deily
Ned Deily n...@acm.org added the comment: One review comment: the patch adds a new exception class that is used for the errors that are now additionally detected. Elsewhere plistlib uses non-specific exception classes like ValueError. If starting from scratch, it might be better to

[issue10667] collections.Counter object in C

2010-12-10 Thread Justin Peel
Justin Peel pee...@gmail.com added the comment: I've done as Antoine asked and made a pure Python PyCounter class and a C-enhanced Counter class that both use the mixin CounterBase class. I also added to the tests so that both PyCounter and Counter are tested. I left the update_fromsubs()

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Applied in r87162 -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___

[issue10667] collections.Counter object in C

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I would like this API to sit and cook for a good while. There are many possible ways to add more methods and most be end-up being YAGNI. Also, my experience with dict.fromkeys() is that a fair number of people get confused

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: The other major change for ranges is that in and not in are no longer inefficient for actual instances of int (it does an arithmetic calculation instead of a linear search). -- ___ Python tracker

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: I created another patch that attempts to create the pipes atomically. On GNU/Linux, if pipe2 is available, it uses it to create the pipes, and there is no race. On other POSIX platforms, pipe and fcntl are called without releasing the

[issue678250] test_mmap failing on AIX

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed the patch_flush_mmap patch to 3.1 in r87163 and 2.7 in r87164. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue678250

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Is the in/not-in fast path in 2.7? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2690 ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you add a test to your patch? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: issue6697-lsprof.diff: - Oh, I did recently a similar change on PyModule: I created PyModule_GetFilenameObject() - PyObject * mod = PyObject *mod - modname is not initialized if fn-m_module (mod) is NULL = initialize modname to

[issue10667] collections.Counter object in C

2010-12-10 Thread Justin Peel
Justin Peel pee...@gmail.com added the comment: Okay, I was done submitting. I thought that Antoine was asking for a version that kept a pure Python version so I did that. -- ___ Python tracker rep...@bugs.python.org

[issue10642] site.py crashes on python startup due to defective .pth file

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Yes, I patched the C code to not clear exceptions anymore at startup: r78826 (issue #3137). But this issue is different: here the bug is in the 3rd party module (loaded by site.py), not in Python, and Donald proposes to *ignore*

[issue2857] add codec for java modified utf-8

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I wonder if tkinter should use this encoding. Tkinter is used to build graphical interfaces. I don't think that users write nul bytes with their keyboard. But there is maybe a use case? --

[issue10492] test_doctest fails with iso-8859-15 locale

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You can reproduce the bug with: $ lang=fr_fr.iso885...@euro ./python -c 'import pdb; pdb.Pdb(nosigint=True).run(exec(%r) % x=12)' /home/haypo/prog/SVN/py3k/Lib/encodings/iso8859_15.py(15)decode() - return

[issue10515] csv sniffer does not recognize quotes at the end of line

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: What do you mean by there is a test for this case in csv.py? If I run sniffer against abcde\ndefgh\n I get a delimiter of 'e'. If I run it against 'a\nb\n', I get the could not determine delimiter error. Attached is a reformulated

[issue10515] csv sniffer does not recognize quotes at the end of line

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Forgot to attach the patch. -- Added file: http://bugs.python.org/file20006/csv_delimiter_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10515

[issue10492] test_doctest fails with iso-8859-15 locale

2010-12-10 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See a more complex solution: #3080 (don't decode the filename in the parser, keep unicode strings). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10492

[issue1574217] isinstance swallows exceptions

2010-12-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Upon reflection I think the risk of breaking apparently working programs is higher than the benefit to be obtained from backporting this. -- ___ Python tracker rep...@bugs.python.org

[issue10642] site.py crashes on python startup due to defective .pth file

2010-12-10 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10642 ___

[issue10669] Document Deprecation Warnings and how to fix

2010-12-10 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The issue is not the specific warnings Rusi got but how, in general, one can get more information when the warnings are too cryptic to deal with. One response might be that DeprecationWarnings should be much wordier than they are -- a

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: r87167 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10674 ___

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Your links are to py3k branch, where dictmaker does not appear. http://svn.python.org/view/python/branches/release27-maint/Grammar/Grammar?view=markup should that Benjamin just removed it from 2.7. -- nosy: +terry.reedy

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: No, I believe it was added as part of the .index() and .count() implementation. Checking the source, there's definitely no sq_contains implementation in 3.1 or 2.7. -- ___ Python tracker

[issue10669] Document Deprecation Warnings and how to fix

2010-12-10 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The deprecation notes in the doc should be quite easy to find and can be more verbose, but there are a few cases where the deprecation is not about a specific function but something more abstract (e.g. some syntax change, or the