[issue10609] dbm documentation example doesn't work (iteritems())

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: -> d...@python components: +Documentation nosy: +d...@python stage: -> needs patch versions: +Python 3.1, Python 3.2 ___ Python tracker __

[issue9333] Expose a way to enable os.symlink on Windows

2010-12-02 Thread Brian Curtin
Brian Curtin added the comment: > So the presence of os.symlink depends on some dynamic privilege? Yes. > Why not simply raise an exception when the user has not enough > privileges? (I mean OSError or WindowsError of course, not AttributeError) My thinking was that anyone writing cross-plat

[issue10197] subprocess.getoutput fails on win32

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: My idea is simply using Popen with appropriate args for stdout and stderr instead of using a shell command with redirections: --- Lib/subprocess.py (révision 86943) +++ Lib/subprocess.py (copie de travail) @@ -560,11 +560,7 @@ return ''.join(result) -#

[issue7911] unittest.TestCase.longMessage should default to True in Python 3.2

2010-12-02 Thread Michael Foord
Michael Foord added the comment: Committed revision 86944. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue10534] difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... functions.

2010-12-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Here is a pretty minimal patch to expose bjunk and bpopular as attributes and document them along with b2j, which is already exposed but not documented. I suppose the proposed paragraph could be formatted as a list, perhaps after ":class:`SequenceMatcher`

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

2010-12-02 Thread Michael Foord
New submission from Michael Foord : Reported by a unittest2 user. A SystemExit (or GeneratorExit) will cause a test run to stop in 2.7 / 3.2. This would just be reported as an error in 2.6. >>> from unittest import TestCase >>> def test(s): ... raise GeneratorExit ... >>> class T(TestCase):

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

2010-12-02 Thread Michael Foord
Changes by Michael Foord : -- title: sys.exit() in a test causes the run to stp -> sys.exit() in a test causes a test run to die ___ Python tracker ___ _

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

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am probably a bit late to this discussion, but why these things should be called "codecs" and why should they share the registry with the encodings? It looks like the proper term would be "transformations" or "transforms". -- nosy: +belopolsk

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Brian Curtin
Brian Curtin added the comment: Here's a patch which implements the context manager and adds a few tests and a small doc change. Tested on Mac and Windows. -- keywords: +patch nosy: +brian.curtin Added file: http://bugs.python.org/file19916/subprocess.diff ___

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks! Patch looks good, tests pass and doc builds. I have one question and two micro-nitpicks on http://codereview.appspot.com/3441041/ -- ___ Python tracker ___

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Should we also review the documentation for fractions and decimals? For example, fractions are documented as accepting "strings of decimal digits", but given that we have presumably non-identical str.isdigit() and str.isdecimal() methods, the above def

[issue10612] StopTestRun exception to halt test run

2010-12-02 Thread Michael Foord
New submission from Michael Foord : It is hard for test infrastructure to halt a test run unless it has access to the result object. A StopTestRun exception could be provided. This could be caught in TestCase.run and call TestResult.stop(). It could be parameterized so that StopTestRun(repor

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Brian Curtin
Brian Curtin added the comment: I updated the doc to be much more simple. I got used to sys.executable based tests :) New patch attached. As for __del__, I think it should do it's thing, and the exit will do it's own. Context managers are traditionally used on file-based things, or things tha

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: New doc looks good. Suggested changes: make with a link, explaing why it’s a context manager. - Popen objects are supported as context managers via the ``with`` statement. + Popen objects are supported as context managers via the :keyword:`with`` statement,

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: :keyword:`with`` → :keyword:`with` -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10554] Context management support for subprocess.Popen

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- title: Context managerment support for subprocess.Popen -> Context management support for subprocess.Popen ___ Python tracker ___ __

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-12-02 Thread Ray.Allen
Ray.Allen added the comment: Oh, yes, I missed that, too. I didn't pay attention to that. Thanks for pointing out it and fix it! -- ___ Python tracker ___ _

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: To sum up the current consensus as I understand it, the missing end of line is clearly a bug, but the addition of “\No newline at end of file” is controversial. In the current patch, both are changed, so backporting only the first fix to 3.1 and 2.7 will requir

[issue10554] Context management support for subprocess.Popen

2010-12-02 Thread Brian Curtin
Brian Curtin added the comment: Committed in r86951. Thanks for the reviews! -- assignee: -> brian.curtin resolution: -> fixed stage: needs patch -> committed/rejected ___ Python tracker

[issue10554] Context management support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: “closing any open file descriptors on exit” is exactly the perfect wording I was looking for. Thanks for the patch! -- status: open -> closed ___ Python tracker ___

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a new patch that excludes int() changes. The honest reason for the exclusion is that I gave up chasing a bug that only shows in full regrtest runs. (Marc, I don't think it is related to what you thought was a missing norm decref: that

[issue8525] Display exception's subclasses in help()

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Didn’t the first message ask for the feature to be extended to non-exceptions classes? “Built-in” subclasses is a red herring, to me the feature is: display subclasses. In the text output you can use the search feature of your pager to jump to a subclass, in t

[issue1058305] HTMLParser.locatestartagend regex too stringent

2010-12-02 Thread R. David Murray
R. David Murray added the comment: Closing this in favor of 1486713, which has a patch and covers additional issues. -- nosy: -BreamoreBoy resolution: -> duplicate stage: unit test needed -> committed/rejected status: open -> closed superseder: -> HTMLParser : A auto-tolerant parsin

[issue8525] Display exception's subclasses in help()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 9:56 PM, Éric Araujo wrote: .. > Didn’t the first message ask for the feature to be extended to non-exceptions > classes?  “Built-in” > subclasses is a red herring, to me the feature is: display subclasses.  In > the text output y

[issue8525] Display exception's subclasses in help()

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Yes, I imagine the feature to be useful to find subclasses defined in the same module. Rob, am I misunderstanding your original request? -- ___ Python tracker __

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Charles Harris
New submission from Charles Harris : The attached patch fixes the problem. -- components: Library (Lib) files: gzip.patch keywords: patch messages: 123171 nosy: charris44 priority: normal severity: normal status: open title: gzip._PaddedFile calls getattr with arguments in reversed order

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and patch. Can you add a test, to prevent a regression? -- nosy: +eric.araujo stage: -> unit test needed type: -> behavior versions: +Python 2.7, Python 3.1 ___ Python tracker

[issue10528] argparse uses %s in gettext calls

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: The incompatibility worries me a bit. A program compatible with Python 3.1 and 3.2 would have to support both sets of messages; I don’t know whether the i18n tools support having all the strings in one PO file, and how inconvenient it would be for translators.

[issue1486713] HTMLParser : A auto-tolerant parsing mode

2010-12-02 Thread R. David Murray
R. David Murray added the comment: I have committed a version of this patch, without the warnings, using the keyword 'strict=True' as the default, and with a couple added heuristics from other similar issues, in r86952. kxroberto, if you want to supply your full name, I'll add you to Misc/ACK

[issue975556] HTMLParser lukewarm on bogus bare attribute chars

2010-12-02 Thread R. David Murray
R. David Murray added the comment: The new strict=False mode from #1486713 handles this case. -- nosy: +r.david.murray resolution: -> accepted stage: -> committed/rejected status: open -> closed superseder: -> HTMLParser : A auto-tolerant parsing mode ___

[issue1046092] HTMLParser fix to accept mailformed tag attributes

2010-12-02 Thread R. David Murray
R. David Murray added the comment: Included this in the 'strict=False' mode in the issue 1486713 patch. -- nosy: +r.david.murray -BreamoreBoy resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed superseder: -> HTMLParser : A auto-tolerant parsing mo

[issue1046092] HTMLParser fix to accept malformed tag attributes

2010-12-02 Thread R. David Murray
Changes by R. David Murray : -- title: HTMLParser fix to accept mailformed tag attributes -> HTMLParser fix to accept malformed tag attributes ___ Python tracker ___ _

[issue10497] Incorrect use of gettext in argparse

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: I’ve started on a test but I’m not sure how to proceed, since I need to use or intercept gettext and compare the error messages of argparse with translated messages to prove that the gettext calls are bogus. There are various ways of using or intercepting gette

[issue9709] test_distutils warning: initfunc exported twice on Windows

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Sounds like a “+1 for the patch” to me :) I get no warning on linux2 after the patch. This is still a behavior change, and there might be code out there relying on self.get_export_symbols being called. My understanding of extension modules build is too small f

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file19914/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Whether 1+2j is a literal or an expression is debatable. I think +1 is an expression but 1+2j is a literal; neither should have a space. I’m not sure the language reference and the actual implementation are in agreement here (I have peephole optimizations in mi

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Charles Harris
Charles Harris added the comment: Hi Eric, On Thu, Dec 2, 2010 at 8:12 PM, Éric Araujo wrote: Where are the guidelines for writing python tests? Chuck -- Added file: http://bugs.python.org/file19921/unnamed ___ Python tracker

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Charles Harris
Changes by Charles Harris : Removed file: http://bugs.python.org/file19921/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: The best way is to learn by imitation. If you prefer to read, there is some guidance on http://www.python.org/dev/workflow/ and http://www.python.org/dev/faq/#how-to-test-a-patch . Concretely, you need to open a file, wrap it in a _PaddedFile and check that at

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Try not to sprawl this all over the docs. Find the most common root and document it there. No need to garbage-up Fractions, Decimal etc. with something that is of zero interest to 99.9% of users. -- nosy: +rhettinger

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Dec 3, 2010 at 12:10 AM, Raymond Hettinger wrote: .. > Try not to sprawl this all over the docs.  Find the most common root and > document it there. > No need to garbage-up Fractions, Decimal etc. with something that is of zero >interest to > 99

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Charles Harris
Charles Harris added the comment: Looks like this was fixed by r86555 and a test added. I think you can close the ticket. -- ___ Python tracker ___

[issue10613] gzip._PaddedFile calls getattr with arguments in reversed order

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Good catch. I’m tired, I should have noticed that :) -- resolution: -> duplicate stage: unit test needed -> committed/rejected status: open -> closed superseder: -> gzip module calls getattr incorrectly ___ Python tr

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo wrote: .. > Whether 1+2j is a literal or an expression is debatable. > I think +1 is an expression but 1+2j is a literal; neither should have a >space. With respect to implementation there is no debate: [Tok

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo wrote: .. > Whether 1+2j is a literal or an expression is debatable. > I think +1 is an expression but 1+2j is a literal; neither should have a >space. With respect to implementation there is no debate: [Tok

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: And of course, roundup ate my work. The tokenize incantation was >>> pprint(list(tokenize(iter([b'1+1j']).__next__))) -- ___ Python tracker ___

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg123186 ___ Python tracker ___ ___ Python-bugs-list mai

[issue10562] Change 'j' for imaginary unit into an 'i'

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- Removed message: http://bugs.python.org/msg123187 ___ Python tracker ___ ___ Python-bugs-list mai

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Try not to twist yourself in a knot over this. I'll be happy to review in proposed doc patch. -- assignee: d...@python -> rhettinger ___ Python tracker ___

[issue10609] dbm documentation example doesn't work (iteritems())

2010-12-02 Thread Sandro Tosi
Sandro Tosi added the comment: Hi Eric, on and up-to-date py3k I got this: >>> for k, v in db.items(): ... print(k, '\t', v) ... Traceback (most recent call last): File "", line 1, in AttributeError: '_dbm.dbm' object has no attribute 'items' >>> 'items' in dir(db) False (I tried to u

[issue10577] (Fancy) URL opener stuck when trying to open redirected url

2010-12-02 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Mon, Nov 29, 2010 at 05:51:35PM +, Antoine Pitrou wrote: > However, urllib.request.urlopen() works fine in this case, so > perhaps this advocates for deprecating the old stuff? Senthil? Yes. It should be deprecated.. I created a branch for trying remov

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2010-12-02 Thread Éric Araujo
Éric Araujo added the comment: Thanks Daniel. I have good and bad news for this patch. The bad news is that I don’t want to accept patches without tests. We need to stop guessing or experimenting with the real PyPI to fix bugs. The good news is that we have a mock PyPI server in distutils2.

[issue10453] Add -h/--help option to compileall

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo : -- priority: normal -> high stage: needs patch -> unit test needed ___ Python tracker ___ ___ Python-bugs-lis

[issue10534] difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... functions.

2010-12-02 Thread Georg Brandl
Georg Brandl added the comment: Don't worry about doc additions too much; all doc changes can be considered bug fixes. In this patch, it appears that two of the three attributes are new? They should get a versionadded. -- ___ Python tracker

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg123190 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue1745035] DoS smtpd vulnerability

2010-12-02 Thread Georg Brandl
Georg Brandl added the comment: Committed in r86955. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue10610] Correct the float(), int() and complex() documentation

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Let me know when you have a proposed doc patch. Ideally, the details should just be in one place and we can refer to it elsewhere. We don't want to add extra info to every function or method in Python that uses int(s) and gets extra unicode digits as an

[issue10614] ZipFile and CP932 encoding

2010-12-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Currently, ZipFile only accepts ascii or utf8 as file name encodings. On Windows (Japanese), usually CP932 is used for it. So currently, when we melt ZipFile via py3k, non-ascii file name becomes strange. Can we handle this issue? (ie: adding encoding optio

[issue940286] pydoc.Helper.help() ignores input/output init parameters

2010-12-02 Thread Georg Brandl
Georg Brandl added the comment: Looks good; committed in r86957. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-12-02 Thread Georg Brandl
Georg Brandl added the comment: I agree; committed in r86960. If anyone wants to change this to raise TypeError for objects that are both unhashable and unrefable, please speak up. -- resolution: -> fixed status: open -> closed ___ Python tracker

<    1   2