[issue6538] MatchObject is not a hyperlink in the 're' module documentation

2010-02-20 Thread Ryan Arana
Ryan Arana added the comment: Changed all occurrences of :class:`MatchObjects` to :ref:`match-objects` in /Doc/library/re.rst These changes were made to rev 78277. -- keywords: +patch nosy: +rarana Added file: http://bugs.python.org/file16274/MatchObjectLinksFix.diff

[issue7970] email.Generator fails to flatten message parsed by email.Parser

2010-02-20 Thread R. David Murray
R. David Murray added the comment: Applied to trunk in r78274, 2.6 in r78275, py3k in r78276, and 3.1 in r78277. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue1736483] os.popen('yes | echo hello') stuck

2010-02-20 Thread Ilya Sandler
Ilya Sandler added the comment: I don't think this is a bug in python (see below for analysis). Furthermore, os.popen() is deprecated, so I think this issue can be closed. Here is my understanding of what's happening. When you execute : python -c 'import sys, os; sys.stdout.write(os.popen(

[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-02-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: The reason the problem was appearing in windows was, it is where, the | is normally observed in URLS, Without | being a safe character, that is it can appear literally in the url, the open method was translating it to %7C. Christopher's patch was to reconver

[issue6414] struct module : processor endianness descriptions misleading

2010-02-20 Thread Asheesh Laroia
Asheesh Laroia added the comment: I'm attaching (basically) the same patch, this time against the py3k branch. I'm open to improvements to the text. If the text is okay, please just ship these! Sincerely, A dude sitting in an open space at PyCon. -- Added file: http://bugs.python.or

[issue6414] struct module : processor endianness descriptions misleading

2010-02-20 Thread Asheesh Laroia
Asheesh Laroia added the comment: Hey all, I (a person who just wandered by) think that Alexey Shamrin's suggested text is great. For that reason, I have turned it into a unified diff created by 'svn diff'. I hope that would help move this bug along! I'm attaching that patch against trunk r

[issue7794] Document zipfile and directory execution in What's New for 2.6/3.1

2010-02-20 Thread Asheesh Laroia
Asheesh Laroia added the comment: Hey dudes and/or dudettes, I think this is already done. Check out this old commit to trunk: http://svn.python.org/view/python/trunk/Misc/NEWS?r1=58963&r2=59039&pathrev=59039 When I check out Python trunk right now, Line 3759 of Misc/NEWS mentions this new

[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-02-20 Thread Éric Araujo
Éric Araujo added the comment: Hello I’m no Windows expert but from what I know I’m puzzled by the test and the fix that have been committed. I thought the path C:\something would correspond to the URI file:///C|/something. Could you enlighten me? Regards -- ___

[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-02-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: cgohlke, thanks for the patches and sorry for the delay. The fix however is not to replace the %HH character of '|' with '|', in the nturl2path, but the keep the '|' as safe character in the urllib.urlopen. -fullurl = quote(fullurl, safe="%/:=&?~#+!$

[issue7968] __dict__ Exception using class attributes

2010-02-20 Thread Georg Brandl
Georg Brandl added the comment: > That seems a little strange to me, because if an object is instance of > a class, it should inherit all of it attributes. An instance does not "inherit" attributes of its class. Instead, when looking up an attribute for an instance, attributes of the class (mo

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Francesco, You have my +1 for implementing both 1 and 2 below. """ 1. Use timegm(3) function where HAVE_TIMEGM is defined (i have a working patch for it) 2. Implement a more portable timegm function with tzset and mktime where HAVE_MKTIME and HAVE_WOR

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to , "Application writers should no

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to , "Application writers should no

[issue7972] Have sequence multiplication call int() or return NotImplemented so that it can be overridden with __rmul__

2010-02-20 Thread Aaron Meurer
New submission from Aaron Meurer : This works in Python 2.5 but not in Python 2.6. If you do [0]*5, it gives you [0, 0, 0, 0, 0]. I tried getting this to work with SymPy's Integer class, so that [0]*Integer(5) would return the same, but unfortunately, the sequence multiplication doesn't seem

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a fix. I am using the following feature documented in getgroups(2): """ If _DARWIN_C_SOURCE is defined, getgroups() can return more than {NGROUPS_MAX} groups. """ It appears that _DARWIN_C_SOURCE is defined in the standard python confi

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I was able to reproduce the error. First, add your user name to multiple test groups as follows: $ sudo dscl . -create /Groups/testN GroupMembership username (repeat 16 times with different Ns) $ ./python.exe Python 2.7a3+ (trunk:78265M, Feb 20 2010,

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

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Michael, Can you post the output of "groups" and "id" command from your Mac? It looks like posix_getgroups cannot handle more than NGROUPS_MAX groups and NGROUPS_MAX is 16 on Mac OS. -- nosy: +Alexander.Belopolsky

[issue7721] Code in xrange documentation does not work

2010-02-20 Thread Martin Manns
Martin Manns added the comment: So could we replace "If a larger range is needed, an alternate version can be crafted using the itertools module: islice(count(start, step), (stop-start+step-1)//step)." by "If a larger range is needed, an alternate version can be crafted using the itertools

[issue3426] os.path.abspath with unicode argument should call os.getcwdu

2010-02-20 Thread Florent Xicluna
Florent Xicluna added the comment: The attached patch proposes a decorator which can be used to strengthen any test which is affected by the CWD. (and fixes for test_(mac|nt|posix)path too) -- Added file: http://bugs.python.org/file16267/issue3426_any_cwd.diff

[issue7970] email.Generator fails to flatten message parsed by email.Parser

2010-02-20 Thread R. David Murray
R. David Murray added the comment: Hmm. You are right. Not sure if that was user error or browser error. Let's try again. -- keywords: +patch Added file: http://bugs.python.org/file16266/email_message_rfc822.patch ___ Python tracker

[issue5125] Strange locale problem with Python 3

2010-02-20 Thread Reto Schüttel
Reto Schüttel added the comment: Hey Mark, Stefan I've got the example working again with 3.1 and it appears like the behaviour has been reverted to the pre-3.0 days. So the problem is fixed for me :)! with 3.1 (and 2.6) atof only accepts a '.' as a decimal delimiter, regardless of the conf

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2010-02-20 Thread Michael Foord
Michael Foord added the comment: There are several standard library modules that deliberately maintain compatibility with earlier versions of Python. The 'with' statement shouldn't be used for tests of any modules that still need compatibility with Python 2.4. -- nosy: +michael.foord

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2010-02-20 Thread Brian Curtin
Brian Curtin added the comment: Does anyone prefer if this should be done on a patch-per-module basis, or just throw together one huge change? Also, I've found a few places where context managers aren't supported where they probably should be, so I'll spin off separate issues for those. ---

[issue7971] hidraw Linux module

2010-02-20 Thread Brian Curtin
Brian Curtin added the comment: The bug tracker is not the right place to release your modules. If you have a distributable module rather than a patch, PyPi may be a better place to put your results. -- nosy: +brian.curtin resolution: -> rejected status: open -> closed _

[issue7961] Py3k: decoding empty bytestring with invalid encoding throws no error

2010-02-20 Thread Ori Avtalion
Ori Avtalion added the comment: > In which specific case did you find the problem you mentioned ? I didn't. I only pointed out the inconsistency. I'm happy with rejecting this bug, if it's not seen as a problem. -- ___ Python tracker

[issue7805] test_multiprocessing failure

2010-02-20 Thread Stefan Krah
Stefan Krah added the comment: I found the problem. On a loaded machine, an attempt is made to get the pid of the worker before the process has properly started. There are several places where a sleep could be inserted. Perhaps Process.start() should wait until the child's pid is not None? ---