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

2010-12-02 Thread Brian Curtin
Brian Curtin cur...@acm.org 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

[issue10197] subprocess.getoutput fails on win32

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2010-12-02 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Committed revision 86944. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7911

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

2010-12-02 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu 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

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

2010-12-02 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: 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 ...

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

2010-12-02 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- title: sys.exit() in a test causes the run to stp - sys.exit() in a test causes a test run to die ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10611

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

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10611 ___ ___ Python-bugs-list

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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.

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Brian Curtin
Brian Curtin cur...@acm.org 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 mer...@netwok.org 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 rep...@bugs.python.org

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

[issue10612] StopTestRun exception to halt test run

2010-12-02 Thread Michael Foord
New submission from Michael Foord mich...@voidspace.org.uk: 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

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Brian Curtin
Brian Curtin cur...@acm.org 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

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

[issue10554] Context managerment support for subprocess.Popen

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: :keyword:`with`` → :keyword:`with` -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10554 ___ ___

[issue10554] Context management support for subprocess.Popen

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- title: Context managerment support for subprocess.Popen - Context management support for subprocess.Popen ___ Python tracker rep...@bugs.python.org

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

2010-12-02 Thread Ray.Allen
Ray.Allen ysj@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue9299

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

[issue10554] Context management support for subprocess.Popen

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

[issue10557] Malformed error message from float()

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

[issue1058305] HTMLParser.locatestartagend regex too stringent

2010-12-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 2, 2010 at 9:56 PM, Éric Araujo rep...@bugs.python.org 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

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 rep...@bugs.python.org

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

2010-12-02 Thread Charles Harris
New submission from Charles Harris charlesr.har...@gmail.com: 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

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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 mer...@netwok.org 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

[issue1486713] HTMLParser : A auto-tolerant parsing mode

2010-12-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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,

[issue975556] HTMLParser lukewarm on bogus bare attribute chars

2010-12-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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 rdmur...@bitdance.com 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

[issue1046092] HTMLParser fix to accept malformed tag attributes

2010-12-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- title: HTMLParser fix to accept mailformed tag attributes - HTMLParser fix to accept malformed tag attributes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1046092

[issue10497] Incorrect use of gettext in argparse

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

[issue9709] test_distutils warning: initfunc exported twice on Windows

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file19914/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

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

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

2010-12-02 Thread Charles Harris
Changes by Charles Harris charlesr.har...@gmail.com: Removed file: http://bugs.python.org/file19921/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10613 ___

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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:

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Dec 3, 2010 at 12:10 AM, Raymond Hettinger rep...@bugs.python.org 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

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

2010-12-02 Thread Charles Harris
Charles Harris charlesr.har...@gmail.com added the comment: Looks like this was fixed by r86555 and a test added. I think you can close the ticket. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10613

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

2010-12-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo rep...@bugs.python.org 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

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

2010-12-02 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Dec 2, 2010 at 11:49 PM, Éric Araujo rep...@bugs.python.org 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

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

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

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

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg123186 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___

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

2010-12-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg123187 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10562 ___

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

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 rep...@bugs.python.org

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

2010-12-02 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com 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 stdin, line 1, in module AttributeError: '_dbm.dbm' object has no attribute 'items' 'items' in

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

2010-12-02 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com 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

[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 mer...@netwok.org 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

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

2010-12-02 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- priority: normal - high stage: needs patch - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10453 ___

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

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org 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. -- ___

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

2010-12-02 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- Removed message: http://bugs.python.org/msg123190 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10610 ___

[issue1745035] DoS smtpd vulnerability

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed in r86955. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745035 ___

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

2010-12-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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

[issue10614] ZipFile and CP932 encoding

2010-12-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: 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?

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

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Looks good; committed in r86957. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue940286 ___

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

2010-12-02 Thread Georg Brandl
Georg Brandl ge...@python.org 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 ___

<    1   2