[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread kai zhu
kai zhu kaizhu...@gmail.com added the comment: documentation bug should be changed to: S.rpartition(sep) - (head, sep, tail) help(str.rpartition) Help on method_descriptor: rpartition(...) S.rpartition(sep) - (tail, sep, head) Search for the separator sep in S, starting at the end

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread July Tikhonov
July Tikhonov july.t...@gmail.com added the comment: Not only str, but also bytearray, unicode, and bytes. -- keywords: +patch nosy: +july Added file: http://bugs.python.org/file15998/rpartition-docstrings-trunk.diff ___ Python tracker

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread July Tikhonov
Changes by July Tikhonov july.t...@gmail.com: Added file: http://bugs.python.org/file15999/rpartition-docstrings-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Richard Hansen wrote: Richard Hansen rhan...@bbn.com added the comment: Any comments on the patches? I'd love to see at least patches 1-3 make it into Python 2.7. :) Sorry, I haven't had a chance to review them yet. Will try today.

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Could you provide a dump of the (whole) release file ? It's a bit strange to have an empty release file. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7773

[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: No problem. Will forward port when I get a chance. -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7764

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___ ___ Python-bugs-list mailing list

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: georg.brandl - ezio.melotti nosy: +ezio.melotti priority: - normal stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: My release file actually is correct (non-empty). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7773 ___

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Arfrever Frehtes Taifersar Arahesis wrote: Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: My release file actually is correct (non-empty). Could you post it on the ticket, so that I can check what's

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: A user of Portage had incorrect release file. https://bugs.gentoo.org/show_bug.cgi?id=301848 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7773

[issue7775] str.rpartition(sep) - (tail, sep, head)

2010-01-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed in r77743 (trunk), r77744 (release26-maint), r77745 (py3k) and r77746 (release31-maint), thanks for the patches! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-25 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Ooops sorry Jesse, my brain has a hard link to your name when I see the word process ;) It comes out this bug is more related to 'sys' anyways. -- ___ Python tracker rep...@bugs.python.org

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: How would you suggest to implement sys.executable if not by looking at sys.argv[0] (or the C equivalent, rather)? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-25 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: It may help to find other methods: http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe By the way, it should not absolutize the path when sys.executable is irrelevant. IMHO, it should render an

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-25 Thread Ralf Schmitt
Ralf Schmitt sch...@gmail.com added the comment: readlink(/proc/self/exe) would work on linux. (there's a similar link on freebsd). -- nosy: +schmir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7774

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Vincent Férotin
New submission from Vincent Férotin vincent.fero...@gmail.com: In Python 2.6 ``itertools`` library documentation is a small typo in last paragraph (``projects/python/branches/release26-maint/Doc/library/itertools.rst``, rev. [77750]), see it at

[issue7242] Forking in a thread raises RuntimeError

2010-01-25 Thread Zsolt Cserna
Zsolt Cserna zsolt.cse...@morganstanley.com added the comment: I compile it with -lpthread. os.fork1() was not available by default, I enabled it by removing two lines from posixmodule.c (it seems it's only enabled when #if defined(__USLC__) defined(__SCO_VERSION__) is true). With os.fork1()

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I feel uneasy to change the default unicode-escape encoding. I think that we mix two features here; to transfer a unicode string between two points, programs must agree on where the data ends, and how characters are represented as

[issue7777] Support needed for AF_RDS family

2010-01-25 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue ___

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: georg.brandl - rhettinger nosy: +rhettinger priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7778

[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Raymond, before porting you should check the typos reported in issue #7778. -- dependencies: +Typo(s) in ``itertools`` documentation reST marker nosy: +ezio.melotti stage: needs patch - commit review

[issue7757] sys.path is incorrect when prefix is

2010-01-25 Thread Michael Smith
Michael Smith msm...@cbnco.com added the comment: Yes, that does look related. The fix from Issue1676135 seems to handle --prefix=/ properly, and from what I can tell PREFIX does get set to /. There is also code in getpath.c to set sys.prefix to / if it's . The correct prefix for configure is

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Vincent Férotin
Vincent Férotin vincent.fero...@gmail.com added the comment: Add patch fixing typo for sample code. -- keywords: +patch Added file: http://bugs.python.org/file16000/fix_7778-typo_in_itertools_documentation.diff ___ Python tracker

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Vincent Férotin
Vincent Férotin vincent.fero...@gmail.com added the comment: Add patch fixing typo for sample code, and changing ``dotproduct`` emphasis (``*dotproduct*``) to literal (``\``dotproduct\). -- Added file:

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed double colon issue. Leaving the *dotproduct* markup as-is. Thanks for the report. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7778] Typo(s) in ``itertools`` documentation reST marker

2010-01-25 Thread Vincent Férotin
Vincent Férotin vincent.fero...@gmail.com added the comment: Ok, thanks for reviewing and fixing! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7778 ___

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
New submission from Sérgio Surkamp ser...@gruposinternet.com.br: There is bug in PLAIN mechanism's of smtplib. The generated base64 string fail when the password start with numbers. As long as I could find, the error occur in method encode_plain. Using the null character (\0) in hexadecimal

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: There's no bug here. You've misunderstood how the literal \0 syntax works. Perhaps this will clarify things: list('\0123') ['\n', '3'] list('\x00123') ['\x00', '1', '2', '3'] -- nosy: +exarkun

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
Sérgio Surkamp ser...@gruposinternet.com.br added the comment: The SASL protocol says that the encoded base64 should be formed from: null + login + null + password The smtplib is not doing it, instead its converting the \012 (\0 + 2 first chars from password) in the char \n, and it's right in

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: It doesn't matter whether \0 or \x00 is used. They mean the same thing. Maybe this is the example I should have given: list('\0%s' % ('12',)) ['\x00', '1', '2'] list('\x00%s' % ('12',)) ['\x00', '1', '2'] --

[issue7242] Forking in a thread raises RuntimeError

2010-01-25 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: In my patch I wanted to reduce the effect on systems where forking in thread is working (eg. linux), that's the reason why I added (defined (__SVR4) defined (__sun). I think that's inappropriate, please change that. --

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
Sérgio Surkamp ser...@gruposinternet.com.br added the comment: Got your point. Sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___

[issue6939] shadows around the io truncate() semantics

2010-01-25 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Hello Just to notify that I've just tested this patch on a fresh python2.6 SVN checkout, on Ubuntu this time (previously, it was only win32), and it passes all IO-related tests I know. --

[issue7780] unittest: allow an 'import_path' as an alternative to 'top_level_dir' in test discover

2010-01-25 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: It would be nice if TestLoader.discover could take an argument that specifies the path to use to import the discovered tests, as an alternative to having to specify top_level_dir. -- assignee: michael.foord components: Library

[issue4440] sort command doesn't work in pstats if run interactively

2010-01-25 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: Still true in 3.1 -- nosy: +MLModel versions: +Python 3.1 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4440 ___

[issue7781] interactive pstats broken

2010-01-25 Thread Mitchell Model
New submission from Mitchell Model m...@acm.org: I created a profile file, started up python3 -m pstats myfilename, did strip, then stats 10 and got: stats 10 Mon Jan 25 17:58:39 2010cd.profile 17529566 function calls (17528644 primitive calls) in 88.626 CPU seconds Traceback

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2010-01-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: This is a duplicate of #7372. -- resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - Regression in pstats ___ Python tracker

[issue7372] Regression in pstats

2010-01-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #7372. AFAIU add_callers can receive either a tuple or an int (and this is what is not working now). When I looked at #7372 I wasn't able to find out why it might receive two different objects and not always the same (i.e. always

[issue7781] interactive pstats broken

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7781 ___

[issue7372] Regression in pstats

2010-01-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I meant See also #6710. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7372 ___ ___

[issue1205239] Let shift operators take any integer value

2010-01-25 Thread Craig McQueen
Craig McQueen pyt...@craig.mcqueen.id.au added the comment: Just for the record... here is a relevant use case... I'm working on some code for calculating CRCs, and hope to support any CRC width, including CRC-5. This involves, among the calculations: crc (crc_width - 8) The complete

[issue7765] 'unittest' documentation misprints

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, michael.foord priority: - normal stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7765 ___

[issue7728] test_timeout should use find_unused_port helper

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7728 ___

[issue7765] 'unittest' documentation misprints

2010-01-25 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: Another one-liner, stopTestRun -- nosy: +brian.curtin Added file: http://bugs.python.org/file16002/stopTestRun.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7765

[issue4440] sort command doesn't work in pstats if run interactively

2010-01-25 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- keywords: +needs review priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4440 ___

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-25 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Amaury, that was a good suggestion, but I did with Eric's help track down a mechanism to test for the presence of the symlink creation privilege. I prefer to have a proper check rather than to attempt to create one and test for the failure

[issue7776] httplib.py: ._tunnel() broken

2010-01-25 Thread Cameron Simpson
Cameron Simpson c...@zip.com.au added the comment: Well, I've established a few things: - I'm mischaracterised this issue - httplib's _set_tunnel() is really meant to be called from urllib2, because using it directly with httplib is totally counter intuitive - a bare urllib2 setup

[issue7776] httplib.py: ._tunnel() broken

2010-01-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: As you noticed, the _set_tunnel method is a private method not intended to be used directly. Its being used by urllib2 when https through proxy is required. urllib2 works like this, it reads HTTPS_PROXY environment variable (in turn

[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-25 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: Attached is the ported patch for Python 2.7/trunk. Please review it to make sure I didn't completely flub anything. I noticed you had forgotten the maxtasksperchild argument in the unit test, so I added that. I also expanded the docs a little

[issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/)

2010-01-25 Thread Sérgio
Sérgio ser...@sergiomb.no-ip.org added the comment: Hi, with python-2.6.2-2.fc12.i686 In: x =http://www.somesite.com/images/rubricas/; In: urlparse.urljoin(x, '07.11.2009-9:54:12-1.jpg') Out: '07.11.2009-9:54:12-1.jpg' !? In: urlparse.urljoin(x, './07.11.2009-9:54:12-1.jpg') Out:

[issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/)

2010-01-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: okay, this should be easy to address. But the more important part is RFC compliance so that this simple change does not break many other things in the wild. -- assignee: - orsenthil nosy: +orsenthil

[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-25 Thread Thomas Holmes
Thomas Holmes sha...@gmail.com added the comment: I have created a patch for this for Python 3.1 and included an update to the unit tests. The tests were never checking for a relative path and if they did would pas it even when it would have failed due to liberal use of os.path.abspath()

[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified

2010-01-25 Thread Thomas Holmes
Thomas Holmes sha...@gmail.com added the comment: As a side note, this was done mostly as an exercise for myself and as a learning experience. Any feedback would be appreciated regardless of any decision on the status of this bug. -- ___ Python

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-25 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Here's an updated patch. I fixed some docstrings, modified it to work with the most recent assertIsInstance changes, and added #ifdef for Windows. There are a number of test failures still, I think all of them relating to errors in platform.py