[issue10669] Document Deprecation Warnings and how to fix

2010-12-10 Thread Ezio Melotti
Ezio Melotti 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 "Overriding __eq__ blocks inhe

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan 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

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Terry J. Reedy
Terry J. Reedy 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

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: r87167 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-li

[issue10669] Document Deprecation Warnings and how to fix

2010-12-10 Thread Terry J. Reedy
Terry J. Reedy 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 paragraph of a few sente

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

2010-12-10 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue1574217] isinstance swallows exceptions

2010-12-10 Thread R. David Murray
R. David Murray 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 ___

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

2010-12-10 Thread STINNER Victor
STINNER Victor added the comment: See a more complex solution: #3080 (don't decode the filename in the parser, keep unicode strings). -- ___ Python tracker ___

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

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

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

2010-12-10 Thread R. David Murray
R. David Murray 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 test case that lets u

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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 codecs.charmap_decode(input,errors,decoding_tabl

[issue2857] add codec for java modified utf-8

2010-12-10 Thread STINNER Victor
STINNER Victor 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? -- ___ Python tracker

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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* errors (where I did the opposi

[issue10667] collections.Counter object in C

2010-12-10 Thread Justin Peel
Justin Peel 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 ___

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

2010-12-10 Thread STINNER Victor
STINNER Victor 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 NULL - there is a ref

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread STINNER Victor
STINNER Victor added the comment: Can you add a test to your patch? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailin

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is the in/not-in fast path in 2.7? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue678250] test_mmap failing on AIX

2010-12-10 Thread R. David Murray
R. David Murray added the comment: Committed the patch_flush_mmap patch to 3.1 in r87163 and 2.7 in r87164. -- status: open -> closed ___ Python tracker ___ ___

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov 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 GIL - relying on the f

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Nick Coghlan
Nick Coghlan 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

[issue10667] collections.Counter object in C

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger 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 by alternative constructors.

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Applied in r87162 -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue10667] collections.Counter object in C

2010-12-10 Thread Justin Peel
Justin Peel 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() method in Counter fo

[issue985064] plistlib crashes too easily on bad files

2010-12-10 Thread Ned Deily
Ned Deily 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 consistently use a sp

[issue10542] Py_UNICODE_NEXT and other macros for surrogates

2010-12-10 Thread Daniel Stutzbach
Daniel Stutzbach 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 first argument points

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Martin v . Löwis
Martin v. Löwis 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 time "it's not re

[issue2690] Precompute range length and enhance range subscript support

2010-12-10 Thread SilentGhost
SilentGhost 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 ___ Python tracker

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Ned Deily
Ned Deily added the comment: (Adding the 3.2 release manager: a potential release blocker?) -- nosy: +georg.brandl, ned.deily ___ Python tracker ___ _

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky 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 _

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger 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

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Raymond Hettinger
Raymond Hettinger 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 the new value is supposed to be:

[issue10667] collections.Counter object in C

2010-12-10 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10676] Confusing note in Numeric Types

2010-12-10 Thread Philip Bober
New submission from Philip Bober : 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 convert to float

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread R. David Murray
R. David Murray 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. -- nosy: +michael.foor

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov 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 thread can launch a s

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

2010-12-10 Thread Matthew Barnett
Matthew Barnett 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/issue2636-2010121

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo added the comment: Would you mind elaborating on where is the race condition? -- ___ Python tracker ___ ___ Python-bugs-

[issue10675] unittest should have an assertChanges context manager

2010-12-10 Thread Jay Moorthi
New submission from Jay Moorthi : 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 assertChanges(self, thi

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov 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 testing I thought it mig

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Changes by Milko Krachounov : Removed file: http://bugs.python.org/file1/subprocess-cloexec-py3k.patch ___ Python tracker ___ ___ Python-bu

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo 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 the same time, we need a

[issue10674] Unused dictmaker symbol in 2.* grammar

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

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov 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 a race here with thre

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Milko Krachounov
Milko Krachounov 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) would mean that any f

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ezio.melotti, haypo, lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue10665] Expand unicodedata module documentation

2010-12-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 9, 2010 at 6:10 PM, Martin v. Löwis 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. (Sorry for the unrelated changes - reverted in the nex

[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 added the comment: Ok, closing as invalid. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ __

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> d...@python components: +Documentation nosy: +d...@python, ezio.melotti ___ Python tracker ___

[issue10674] Unused dictmaker symbol in 2.* grammar

2010-12-10 Thread Ori Avtalion
New submission from Ori Avtalion : 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 severity: normal statu

[issue7213] Popen.subprocess change close_fds default to True

2010-12-10 Thread Giovanni Bajo
Giovanni Bajo 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 on Windows and Linux

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

2010-12-10 Thread Ask Solem
Ask Solem 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 tracker

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

2010-12-10 Thread R. David Murray
R. David Murray 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

[issue3992] remove custom log module from distutils2

2010-12-10 Thread Éric Araujo
Éric Araujo 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

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

2010-12-10 Thread Brian Cain
New submission from Brian Cain : 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 join() shouldn't be c

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

2010-12-10 Thread Georg Brandl
Georg Brandl 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 __

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

2010-12-10 Thread Mayweed
New submission from Mayweed : 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 components: Documentation messages:

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

2010-12-10 Thread Senthil Kumaran
Senthil Kumaran 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 patch in the latest ve

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

2010-12-10 Thread Kirill Subbotin
New submission from Kirill Subbotin : 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 tested with Pyt

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip added the comment: s/logger of last resort/handler of last resort/ -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10626] Bad interaction between test_logging and test_concurrent_futures

2010-12-10 Thread Vinay Sajip
Vinay Sajip 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 - so Brian could remove the

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

2010-12-10 Thread Michael Foord
Michael Foord 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 are separate issues for h

[issue985064] plistlib crashes too easily on bad files

2010-12-10 Thread Mher Movsisyan
Mher Movsisyan 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: http://bugs.python.org/file19996/p

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Rusi
Rusi 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 code. The main problems

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

2010-12-10 Thread Ray.Allen
Ray.Allen 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 again? It's no

[issue10668] Array tests have nonsense in them

2010-12-10 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r87156. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue10669] Remove Deprecation Warnings

2010-12-10 Thread Eric Smith
Eric Smith 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

[issue10667] collections.Counter object in C

2010-12-10 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue10660] format() to lower and uppercase

2010-12-10 Thread Hervé Cauwelier
Hervé Cauwelier 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. -- ___

[issue10670] Provide search scope limits

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