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

2010-01-25 Thread kai zhu
kai zhu 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 of S, and re

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

2010-01-25 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

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

2010-01-25 Thread July Tikhonov
July Tikhonov 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 : Added file: http://bugs.python.org/file15999/rpartition-docstrings-py3k.diff ___ Python tracker ___ ___ Python-bugs-

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Richard Hansen wrote: > > Richard Hansen 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 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 ___

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

2010-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: No problem. Will forward port when I get a chance. -- versions: -Python 2.6 ___ Python tracker ___ _

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

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

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: georg.brandl -> ezio.melotti nosy: +ezio.melotti priority: -> normal stage: needs patch -> patch review ___ Python tracker ___

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: My release file actually is correct (non-empty). -- ___ Python tracker ___ ___

[issue7773] platform._parse_release_file() can cause UnboundLocalError

2010-01-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Arfrever Frehtes Taifersar Arahesis wrote: > > Arfrever Frehtes Taifersar Arahesis 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 causing the problem ?! Thanks, --

[issue7773] platform._parse_release_file() can cause UnboundLocalError

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

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

2010-01-25 Thread Ezio Melotti
Ezio Melotti 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 ___ Pyth

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

2010-01-25 Thread Tarek Ziadé
Tarek Ziadé 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 _

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

2010-01-25 Thread Antoine Pitrou
Antoine Pitrou 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 _

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

2010-01-25 Thread Florent Xicluna
Florent Xicluna 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 empty thing in s

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

2010-01-25 Thread Ralf Schmitt
Ralf Schmitt added the comment: readlink("/proc/self/exe") would work on linux. (there's a similar link on freebsd). -- nosy: +schmir ___ Python tracker ___

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

2010-01-25 Thread Vincent Férotin
New submission from Vincent Férotin : 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 http://docs.python.org/library/itertools.html#recipes . In the note about

[issue7242] Forking in a thread raises RuntimeError

2010-01-25 Thread Zsolt Cserna
Zsolt Cserna 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() I have the same results, Run

[issue7615] unicode_escape codec does not escape quotes

2010-01-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 bytes. All codecs inclu

[issue7777] Support needed for AF_RDS family

2010-01-25 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin priority: -> normal stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-lis

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

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: georg.brandl -> rhettinger nosy: +rhettinger priority: -> normal stage: -> needs patch ___ Python tracker ___

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

2010-01-25 Thread Ezio Melotti
Ezio Melotti 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 ___ Python tracke

[issue7757] sys.path is incorrect when prefix is ""

2010-01-25 Thread Michael Smith
Michael Smith 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 actually

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

2010-01-25 Thread Vincent Férotin
Vincent Férotin 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 added the comment: Add patch fixing typo for sample code, and changing ``dotproduct`` emphasis (``*dotproduct*``) to literal (``\``dotproduct\). -- Added file: http://bugs.python.org/file16001/fix_7778-typo_in_itertools_documentation-literal.diff _

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

2010-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed double colon issue. Leaving the *dotproduct* markup as-is. Thanks for the report. -- resolution: -> fixed status: open -> closed ___ Python tracker __

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

2010-01-25 Thread Vincent Férotin
Vincent Férotin added the comment: Ok, thanks for reviewing and fixing! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
New submission from Sérgio Surkamp : 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 representation (\x00) seems to

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone 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 : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> committed/rejected type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
Sérgio Surkamp 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 the python way to see t

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone 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 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 : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7779] smtplib SASL PLAIN authentication error

2010-01-25 Thread Sérgio Surkamp
Sérgio Surkamp added the comment: Got your point. Sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue6939] shadows around the io truncate() semantics

2010-01-25 Thread Pascal Chambon
Pascal Chambon 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. -- ___ Python tracker

[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 : 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 (Lib) messages: 98302

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

2010-01-25 Thread Mitchell Model
Mitchell Model added the comment: Still true in 3.1 -- nosy: +MLModel versions: +Python 3.1 -Python 3.0 ___ Python tracker ___ ___ Pyt

[issue7781] interactive pstats broken

2010-01-25 Thread Mitchell Model
New submission from Mitchell Model : 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 (most recent

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

2010-01-25 Thread Ezio Melotti
Ezio Melotti 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 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 a tuple, possibly wit

[issue7781] interactive pstats broken

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> test needed type: -> behavior ___ Python tracker ___

[issue7372] Regression in pstats

2010-01-25 Thread Ezio Melotti
Ezio Melotti added the comment: I meant "See also #6710". -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue1205239] Let shift operators take any integer value

2010-01-25 Thread Craig McQueen
Craig McQueen 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 expression is: crc = t

[issue7765] 'unittest' documentation misprints

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord priority: -> normal stage: -> patch review ___ Python tracker ___ ___

[issue7728] test_timeout should use "find_unused_port" helper

2010-01-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue7765] 'unittest' documentation misprints

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

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

2010-01-25 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> test needed ___ Python tracker ___ ___ Python-bugs

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

2010-01-25 Thread Jason R. Coombs
Jason R. Coombs 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 message because it

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

2010-01-25 Thread Cameron Simpson
Cameron Simpson 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 fails with its o

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

2010-01-25 Thread Senthil Kumaran
Senthil Kumaran 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 includes HTTPSProxyHandler

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

2010-01-25 Thread Jesse Noller
Jesse Noller 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 but, paraphrasing

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

2010-01-25 Thread Sérgio
Sérgio 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: 'http://www.somesite.com/images/rubri

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

2010-01-25 Thread Senthil Kumaran
Senthil Kumaran 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 ___ Python t

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

2010-01-25 Thread Thomas Holmes
Thomas Holmes 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() The test fix is pro

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

2010-01-25 Thread Thomas Holmes
Thomas Holmes 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 tracker

[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-25 Thread Eric Smith
Eric Smith 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 where it calls sys.