[issue7775] str.rpartition(sep) - (tail, sep, head)
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 of S, and return the part before it, the separator itself, and the part after it. If the separator is not found, return two empty strings and S. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7775] str.rpartition(sep) - (tail, sep, head)
Changes by Florent Xicluna la...@yahoo.fr: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7775] str.rpartition(sep) - (tail, sep, head)
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 rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7775] str.rpartition(sep) - (tail, sep, head)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7615] unicode_escape codec does not escape quotes
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7773] platform._parse_release_file() can cause UnboundLocalError
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7764] Doc for itertools recipe consume is complicated and less efficient
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7615] unicode_escape codec does not escape quotes
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 Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7775] str.rpartition(sep) - (tail, sep, head)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7773] platform._parse_release_file() can cause UnboundLocalError
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7773] platform._parse_release_file() can cause UnboundLocalError
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 causing the problem ?! Thanks, -- Marc-Andre Lemburg eGenix.com ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7773] platform._parse_release_file() can cause UnboundLocalError
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7775] str.rpartition(sep) - (tail, sep, head)
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7775 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7774] sys.executable: wrong location if zeroth command argument is modified.
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 http://bugs.python.org/issue7774 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7774] sys.executable: wrong location if zeroth command argument is modified.
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 http://bugs.python.org/issue7774 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7774] sys.executable: wrong location if zeroth command argument is modified.
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 empty thing in such case (code below). --- Modules/getpath.c (revision 77750) +++ Modules/getpath.c (working copy) @@ -441,7 +441,7 @@ } else progpath[0] = '\0'; - if (progpath[0] != SEP) + if (progpath[0] != SEP progpath[0] != '\0') absolutize(progpath); strncpy(argv0_path, progpath, MAXPATHLEN); argv0_path[MAXPATHLEN] = '\0'; -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7774 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7774] sys.executable: wrong location if zeroth command argument is modified.
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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 http://docs.python.org/library/itertools.html#recipes . In the note about how optimizing recipes, ``dotproduct`` example function is not outlined as a code sample. Lines 762-763 should end with double colons (instead of simple), to mark following code as such, in reST format:: (...) For example, the *dotproduct* recipe can be written as:: Note that previous ``*dotproduct*`` ref. could be marked as ``inline literal`` instead of *emphasis*, and then lines become:: (...) For example, the ``dotproduct`` recipe can be written as:: -- assignee: georg.brandl components: Documentation messages: 98286 nosy: fero14041, georg.brandl severity: normal status: open title: Typo(s) in ``itertools`` documentation reST marker versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7242] Forking in a thread raises RuntimeError
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() I have the same results, RuntimeError. I was not able to compile it without pthread because I haven't found any configure options for that. If it's possible I'm happy to try it. 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). But it just checks for solaris, not the OS version (on solaris 10/intel my demo is working). (btw forking in thread actually happens in a unittest related to BaseHTTPServer, which obviously fails on my platform) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7615] unicode_escape codec does not escape quotes
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 bytes. All codecs including unicode-escape only dealt with byte conversion; (unicode-escape converts everything to printable 7bit ascii); these patches want to add a feature related to the where does the string end issue, and is only aimed at python code containers. Other transports and protocols may choose different delimiters. My point is that unicode-escape used to not change printable 7-bit ascii characters, and the patches will change this. And actually this will break existing code. It did not take me long to find two examples of programs which embed unicode_escape-encoded text between quotes, and take care themselves of escaping quotes. First example generates javascript code, the second generates SQL statements: http://github.com/chriseppstein/pywebmvc/blob/master/src/code/pywebmvc/tools/searchtool.py#L450 http://gitweb.sabayon.org/?p=entropy.git;a=blob;f=libraries/entropy/db/__init__.py;h=2d818455efa347f35b2e96d787fefd338055d066;hb=HEAD#l6463 This does not prevent the creation of a new codec, let's call it 'python-unicode-escape' [ or 'repr' :-) ] -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7615 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7777] Support needed for AF_RDS family
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7764] Doc for itertools recipe consume is complicated and less efficient
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7764 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7757] sys.path is incorrect when prefix is
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 actually , not /, to avoid double-slashes - but neither one seems to work at the moment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7757 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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 rep...@bugs.python.org http://bugs.python.org/issue7778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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: http://bugs.python.org/file16001/fix_7778-typo_in_itertools_documentation-literal.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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 http://bugs.python.org/issue7778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7778] Typo(s) in ``itertools`` documentation reST marker
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
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 representation (\x00) seems to fix the problem. Origin of the problem: def encode_plain(user, password): return encode_base64(\0%s\0%s % (user, password), eol=) Proposed fix: def encode_plain(user, password): return encode_base64(\x00%s\x00%s % (user, password), eol=) Current result: from email.base64mime import encode as encode_base64 import base64 encode_base64(\0user\0123foo, eol=) 'AHVzZXIKM2Zvbw==' f = base64.decodestring('AHVzZXIKM2Zvbw==') f '\x00user\n3foo' Expected result: from email.base64mime import encode as encode_base64 import base64 encode_base64(\x00user\x00123foo, eol=) 'AHVzZXIAMTIzZm9v' f = base64.decodestring('AHVzZXIAMTIzZm9v') f '\x00user\x00123foo' -- components: Extension Modules messages: 98295 nosy: surkamp severity: normal status: open title: smtplib SASL PLAIN authentication error versions: Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
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 the python way to see the things, it's not the bug reported here. The bug is a patch to change the null character representation from \0 to \x00 (using the hexadecimal representation) in the encode_base64 call to prevent the conversion and generate the right base64 encoded string. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
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'] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7242] Forking in a thread raises RuntimeError
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
Changes by Ezio Melotti ezio.melo...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7779] smtplib SASL PLAIN authentication error
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6939] shadows around the io truncate() semantics
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7780] unittest: allow an 'import_path' as an alternative to 'top_level_dir' in test discover
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 (Lib) messages: 98302 nosy: michael.foord, r.david.murray priority: normal severity: normal status: open title: unittest: allow an 'import_path' as an alternative to 'top_level_dir' in test discover type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7780 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4440] sort command doesn't work in pstats if run interactively
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7781] interactive pstats broken
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 (most recent call last): File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/runpy.py, line 128, in _run_module_as_main __main__, fname, loader, pkg_name) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/runpy.py, line 34, in _run_code exec(code, run_globals) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 689, in module browser.cmdloop() File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/cmd.py, line 139, in cmdloop stop = self.onecmd(line) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/cmd.py, line 216, in onecmd return func(arg) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 665, in do_stats return self.generic('print_stats', line) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 586, in generic getattr(self.stats, fn)(*processed) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 358, in print_stats width, list = self.get_print_list(amount) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 331, in get_print_list list, msg = self.eval_print_amount(selection, list, msg) File /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/pstats.py, line 314, in eval_print_amount new_list = list[:count] TypeError: 'dict_keys' object is not subscriptable -- components: Library (Lib) messages: 98304 nosy: MLModel severity: normal status: open title: interactive pstats broken versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7781 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6710] hotshot stats load causes TypeError when multiple files are loaded
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 rep...@bugs.python.org http://bugs.python.org/issue6710 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7372] Regression in pstats
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 a tuple, possibly with only one int). From the first message it seems that cProfile returns the tuple of 4 ints and profile returns a single int. Can profile be fixed to return a tuple (of 4 or 1 ints) too? -- nosy: +alexandre.vassalotti, ezio.melotti, fdrake, j1m priority: - normal stage: - needs patch type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7781] interactive pstats broken
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7372] Regression in pstats
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1205239] Let shift operators take any integer value
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 expression is: crc = table[((crc (crc_width - 8)) ^ data_byte) 0xFF] ^ (crc 8) where crc_width is typically 32 or 16, but in the case of CRC-5 would be 5. I think the calculation would work fine for all cases, if only Python allowed me to right-shift with a negative number. But now I'll have to handle the two cases separately. -- nosy: +cmcqueen1975 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1205239 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7765] 'unittest' documentation misprints
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7728] test_timeout should use find_unused_port helper
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7728 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7765] 'unittest' documentation misprints
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4440] sort command doesn't work in pstats if run interactively
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows
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 message because it doesn't have the potential to be confounded with other causes. I want to avoid issues such as where is the test symlink created and how is it cleaned up. If there's still desire to go that route after looking at this implementation, I'm not opposed to switching gears and using that technique. This patch (20) uses ctypes (in the test suite; is that okay?) to determine if the symlink creation privilege is present, falling back to the assumption that it is, and integrates that with the test.support.has_symlink function (which is new in this issue thread). Eric, can you test this new patch in your limited user environment and report what you find? -- Added file: http://bugs.python.org/file16003/windows symlink draft 20.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7776] httplib.py: ._tunnel() broken
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 fails with its own bug To the first item: _tunnel() feels really fragile with that recursion issue, though it doesn't recurse called from urllib2. For the second, here's my test script using httplib: H = httplib.HTTPSConnection(localhost, 3128) print H H._set_tunnel(localhost, 443) H.request(GET, /boguspath) os.system(lsof -p %d | grep IPv4 % (os.getpid(),)) R = H.getresponse() print R.status, R.reason As you can see, one builds the HTTPSConnection object with the proxy's details instead of those of the target URL, and then put the target URL details in with _set_tunnel(). Am I alone in find this strange? For the third, my test code is this: U = urllib2.Request('https://localhost/boguspath') U.set_proxy('localhost:3128', 'https') f = urllib2.urlopen(R) print f.read() which fails like this: Traceback (most recent call last): File thttp.py, line 15, in module f = urllib2.urlopen(R) File /opt/python-2.6.4/lib/python2.6/urllib2.py, line 131, in urlopen return _opener.open(url, data, timeout) File /opt/python-2.6.4/lib/python2.6/urllib2.py, line 395, in open protocol = req.get_type() AttributeError: HTTPResponse instance has no attribute 'get_type' The line numbers are slightly off because I've got some debugging statements in there. Finally, I flat out do not understand urllib2's set_proxy() method: def set_proxy(self, host, type): if self.type == 'https' and not self._tunnel_host: self._tunnel_host = self.host else: self.type = type self.__r_host = self.__original self.host = host When my code calls set_proxy, self.type is None. Now, I had naively expected the first branch to be the only branch. Could someone explain what's happening here, and what is meant to happen? I'm thinking that this bug may turn into a doc fix instead of a behaviour fix, but I'm finding it surprisingly hard to know how urllib2 is supposed to be used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7776] httplib.py: ._tunnel() broken
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 includes HTTPSProxyHandler and HTTPSProxyAuthenticationHandler) and then try to do a urlopen on an https:// url or a request object through the tunnel doing a CONNECT instead of a GET. How do think the docs can be improved? If you have any suggestions please upload a patch. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included
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 but, paraphrasing your original post w.r.t to the justification. Let me know what you think, or if you have issues. Once you give the go ahead, I will commit to trunk and then merge to Py3k. Once again, thanks for the patch -- Added file: http://bugs.python.org/file16004/mp_patch_6963_trunk.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6963 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/)
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: 'http://www.somesite.com/images/rubricas/07.11.2009-9:54:12-1.jpg' urlparse.urlparse('07.11.2009-9:54:12-1.jpg') is wrong but urlparse.urlparse('./07.11.2009-9:54:12-1.jpg') isn't. think about that please -- nosy: +sergiomb2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/)
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified
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() The test fix is probably not as clean as it could be by I did not want to severely alter its state. The change to tempfile.mkdtemp() was clear and followed the current method tempfile.mkstemp() uses. -- keywords: +patch nosy: +Thomas.Holmes Added file: http://bugs.python.org/file16005/Py7325.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7325 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified
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 tracker rep...@bugs.python.org http://bugs.python.org/issue7325 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7766] sys.getwindowsversion as PyStructSequence
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 where it calls sys.getwindowsversion() and unpacks the result. I'll look at those soon. -- Added file: http://bugs.python.org/file16006/winver_as_structseq_ex1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7766 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com