[issue10592] pprint module doesn't work well with OrderedDicts

2010-12-01 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- superseder: general pprint rewrite - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10592 ___ ___

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Give a try to this minor variation of the patch with tests added and let me know your review comments. -- Added file: http://bugs.python.org/file19890/Issue3243-4.patch ___ Python tracker

[issue10084] SSL support for asyncore

2010-12-01 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10084 ___ ___ Python-bugs-list mailing

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Senthil: +try: + self.sock.sendall(data) Indentation problem here. +if isinstance(data,str): +content_length = len(data) I'm not sure I understand. What does sending an unicode string mean?

[issue10594] Typo in PyList_New doc.

2010-12-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You don't need to backport, we'll do it ourselves. Can someone from the doc team please review/commit? -- assignee: eli.bendersky - d...@python nosy: +pitrou stage: - patch review ___ Python tracker

[issue8805] urllib should support SSL contexts

2010-12-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: HTTPSHandler now allows to pass an SSLContext and the old API should be buried in the ground, closing. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10595] Adding a syslog.conf reader in syslog

2010-12-01 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: The syslog module allows to configure via openlog() the facility. There's one missing feature though, I'd love to have in a new API: a way to read the syslog configuration, and in particular to know where each facility file is located on

[issue10596] modulo operator bug

2010-12-01 Thread Сергей Хлутчин
New submission from Сергей Хлутчин serc...@gmail.com: Result of the modulo operator is wrong: (-2.22044604925e-16)%4 4.0 (-4.0)%4 -0.0 -- messages: 122991 nosy: Sergio.Ĥlutĉin priority: normal severity: normal status: open title: modulo operator bug type: behavior versions: Python

[issue10596] modulo operator bug

2010-12-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10596 ___ ___ Python-bugs-list

[issue10596] modulo operator bug

2010-12-01 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: What results were you expecting here? Both those results look fine to me (though it's arguable that the second should be +0.0 rather than -0.0). -- assignee: - mark.dickinson ___ Python tracker

[issue10596] modulo operator bug

2010-12-01 Thread Сергей Хлутчин
Сергей Хлутчин serc...@gmail.com added the comment: From the documetation: The modulo operator always yields a result with the same sign as its second operand (or zero); the absolute value of the result is strictly smaller than the absolute value of the second operand. --

[issue7359] mailbox cannot modify mailboxes in system mail spool

2010-12-01 Thread Ole Laursen
Ole Laursen o...@iola.dk added the comment: Just got bitten by this too. Renaming is good and all, but as far as I can tell, it will never work with the system spool. It's not just that you can't create a temporary file in the directory, you can't rename files into it either. If I create an

[issue10596] modulo operator bug

2010-12-01 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Did you look at the second footnote on that page? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10596 ___

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: orsenthil: Hi, i don't quite understand why iter() needs to be called explicitly on data? As I understand it, if data is an iterable then you can use a for loop on it directly. -- ___ Python tracker

[issue10594] Typo in PyList_New doc.

2010-12-01 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r86914. -- nosy: +georg.brandl resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10594

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: attaching new patch. this implements the memoryview solution suggested by pitrou. but it does contain this thing: if not request.has_header('Content-length'): if (not hasattr(data, '__read__') and isinstance(data,

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: attaching new patch. this implements the memoryview solution suggested by pitrou. but it does contain this thing: if not request.has_header('Content-length'): if (not hasattr(data, '__read__') and isinstance(data,

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Changes by Xuanji Li xua...@gmail.com: Removed file: http://bugs.python.org/file19892/issue_3243_py3k_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3243 ___

[issue10597] Py_SetPythonHome document shows same url twice.

2010-12-01 Thread INADA Naoki
New submission from INADA Naoki songofaca...@gmail.com: http://docs.python.org/c-api/init.html#Py_SetPythonHome The libraries are searched in home/lib/pythonversion and home/lib/pythonversion. Is the second {home}/lib/python{version} wrong? -- assignee: d...@python components:

[issue8743] set() operators don't work with collections.Set instances

2010-12-01 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8743 ___ ___ Python-bugs-list

[issue10589] I/O ABC docs should specify which methods have implementations

2010-12-01 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10589 ___ ___ Python-bugs-list

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: if not request.has_header('Content-length'): if (not hasattr(data, '__read__') and What is __read__ supposed to be? 2) Can call len but not buffer: assume len == #bytes Why do you need it at all? --

[issue887237] Machine integers

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: As far as I understand, the main concern about issue887237.diff was code duplication. There are two ways to fight it: C preprocessor tricks as in issue887237-macro.diff and code generation as done in numpy. With

[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- resolution: - postponed versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5516 ___

[issue9268] Document annotation option to pickletools.dis

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- resolution: fixed - stage: committed/rejected - needs patch title: Add annotation option to pickletools.dis - Document annotation option to pickletools.dis ___ Python tracker

[issue9528] Add pure Python implementation of time module to CPython

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: BDFL and python-dev were opposed to this idea. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Travis, feel free to close this without further action or use the information here to open a numpy issue. -- assignee: belopolsky - teoliphant status: open - pending ___ Python

[issue8902] add datetime.time.now() for consistency

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- resolution: - postponed versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8902 ___

[issue766910] fix one or two bugs in trace.py

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file18959/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue766910 ___

[issue766910] fix one or two bugs in trace.py

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file18960/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue766910 ___

[issue766910] fix one or two bugs in trace.py

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Eli, Would you like to review this patch? -- nosy: +eli.bendersky -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue766910

[issue9527] Add aware local time support to datetime module

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

[issue7662] time.utcoffset()

2010-12-01 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7662 ___

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I simplified the partial_repr() code in issue4113b.diff and committed as r86916. I wonder, however, if for the common case of func being a named function, displaying func.__name__ or func.__module__ + '.' + func.__name__

[issue10598] curses fails to import on Solaris

2010-12-01 Thread River Tarnell
New submission from River Tarnell ri...@tamara.tcx.org.uk: On Solaris 10 using system libcurses, curses fails to import: hemlock% python3.1 Python 3.1.3 (r313:86834, Dec 1 2010, 19:51:26) [GCC 4.5.1] on sunos5 Type help, copyright, credits or license for more information. import curses

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I would prefer the module.name without the repr decoration. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4113

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think the main purpose of repr is debugging, so I’d favor the unambiguous form (with the id) to the nice-looking one (module.name). -- ___ Python tracker rep...@bugs.python.org

[issue4113] Add custom __repr__ to functools.partial

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Let me close this issue before any serious bikeshedding begins. We can always reconsider when users complain that eval(repr(x)) does not work for their partial objects. -- status: open - closed

[issue1598083] Top-level exception handler writes to stdout unsafely

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I don't see anything easy in this issue. Error handling in exception or signal handlers is quite tricky. I don't see this as a high priority either, but will leave this for others to decide. -- keywords: -easy

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Changes by Boštjan Mejak bostjan.me...@gmail.com: Removed file: http://bugs.python.org/file19306/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10092 ___

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Changes by Boštjan Mejak bostjan.me...@gmail.com: Removed file: http://bugs.python.org/file19316/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10092 ___

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) is not valid because 'fr_FR' is not a valid value for the 'locale' argument What is valid is this:

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Boštjan, Please don't add comments to closed issues. If you believe there is a remaining issue, please file a new report. Issue numbers are in good supply! This issue was fixed in r85728. It is best when this

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Yes, I know this issue is closed but I wonder how could your Python interpreter not error on calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) Please retry executing the above line of code in Python 2.7.1

[issue10599] sgmllib.parse_endtag() is not respecting quoted text

2010-12-01 Thread Michael Brooks
New submission from Michael Brooks firealwayswo...@gmail.com: In the attached example is a very simple usage of sgmllib that is trying to parse: input value=a href=http://buglink/a The bug is that sgmllib is parsing this href. Browsers on the other hand see this as the input's value. Also

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: -belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10092 ___

[issue10599] sgmllib.parse_endtag() is not respecting quoted text

2010-12-01 Thread Michael Brooks
Michael Brooks firealwayswo...@gmail.com added the comment: Oops, I had a misnomer in my bug report. input value=\a href=http://buglink/a is not escaped and there for the href should be parsed in this condition but not parsed in the attached sgmllib_bug.py. --

[issue10092] calendar does not restore locale properly

2010-12-01 Thread Stephen Hansen
Stephen Hansen me+pyt...@ixokai.io added the comment: On windows, France may work and fr_FR may not; yet on OSX its exactly the opposite. Its not consistant across platforms. -- ___ Python tracker rep...@bugs.python.org

[issue10092] calendar does not restore locale properly

2010-12-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Boštjan, please see issue 10466 for further information about your question on fr_FR vs French. Windows, as usual, does not follow the standards. -- ___ Python tracker rep...@bugs.python.org

[issue9915] speeding up sorting with a key

2010-12-01 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Thanks. This nice, clean diff is much more reviewable and it looks like what I expected. The use of Py_LOCAL_INLINE is new to me since we usually use #define instead, but this has a cleaner look to it. I am unclear on

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
New submission from Campbell Barton ideasma...@gmail.com: Attached is a script which works in linux but not windows XP 32bit with Python 3.1.3. The problem is that the path can be written to when specified as bytes but when escaped it fails. -- components: IO files:

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
Campbell Barton ideasma...@gmail.com added the comment: note, this bug was reported to me by a user running windows 7, 64bits. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10600 ___

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: ... it always seems to use the local 8-bit encoding The locale encoding is not necessary a 8-bit encoding, it can by a multibyte like... UTF-8 :-) -- subprocess.patch: You should maybe use io.open(process.stdout.fileno(),

[issue9915] speeding up sorting with a key

2010-12-01 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: The use of Py_LOCAL_INLINE is new to me since we usually use #define instead, but this has a cleaner look to it. I am unclear on whether all the our target compilers support an inline keyword. If you're sure it works everywhere,

[issue4335] inspect.getsourcelines ignores last line in module

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: 3.2 and 2.7 don't exhibit this issue. I added a test in r86922. -- nosy: -BreamoreBoy resolution: - out of date stage: patch review - committed/rejected status: open - closed

[issue9915] speeding up sorting with a key

2010-12-01 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Just for the record, I wanted to highlight how little room there is for optimization here. The sort wrapper is *very* thin: sortwrapper_richcompare(sortwrapperobject *a, sortwrapperobject *b, int op) { if

[issue9915] speeding up sorting with a key

2010-12-01 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: Just wanted to post this so there weren't any illusions about the patch being a big win. When a key function is defined, this is all you can possibly shave off the time for a comparison. I don't want to argue whether the patch is a

[issue10580] Installer sentence in bold

2010-12-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I think Boštjan is correct that that sentence is not parallel to the others. If I understand correctly, at that point the installation is complete, and it is the final 'exit or back' dialog. So I think the title should be Complete

[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: issue2380.diff does not apply anymore. -- assignee: - belopolsky stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2380

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: On Windows, the Python interpreter fails to display a result if stdout encoding is unable to encode it. This problem exists since Python 3.0. Eg. see issue #1602. This problem is not specific to Windows. Even if stdout encoding

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is opposed to the PEP 3128: Default error-handler of sys.stdout should be 'backslashreplace'. Stuff written to stdout might be consumed by another program that might misinterpret the escapes. For interactive session,

[issue9198] Should repr() print unicode characters outside the BMP?

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I created a new issue for Ezio's proposition to patch sys.displayhook: issue #10601. To answer the initial question, Should repr() print unicode characters outside the BMP?, Marc-Andre, Ezio and me agree that we should keep the

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +amaury.forgeotdarc, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10601 ___

[issue9198] Should repr() print unicode characters outside the BMP?

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9198 ___

[issue10601] sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is opposed to the PEP 3128: Default error-handler of sys.stdout should be 'backslashreplace' Oops sorry, no it is not opposed to the PEP (this issue doesn't propose to change the default error handler of

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Use surrogateescape error handler to decode a Windows path is not a good idea. On Windows, the problem is not to decode a path (ANSI = wide char), but to encode a path (wide char = ANSI) to use a function expecting bytes path

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #10601: sys.displayhook: use backslashreplace error handler if repr(value) is not encodable to sys.stdout. -- ___ Python tracker rep...@bugs.python.org

[issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: If it's an env variable, though, it should be clear that it's CPython-specific, so I'm not sure how to call it. Why do you think that only this variable is CPython-specific? CPython has an option called PYTHONDONTWRITEBYTECODE,

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Wed, Dec 01, 2010 at 10:06:25AM +, Antoine Pitrou wrote: +try: + self.sock.sendall(data) Indentation problem here. I could notice it now. Shall fix it. +if isinstance(data,str): +

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Wed, Dec 01, 2010 at 02:56:56PM +, Xuanji Li wrote: orsenthil: Hi, i don't quite understand why iter() needs to be called explicitly on data? As I understand it, if data is an iterable then you can use a for loop on it directly.

Re: [issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
On Wed, Dec 01, 2010 at 05:08:26PM +, Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: if not request.has_header('Content-length'): if (not hasattr(data, '__read__') and What is __read__ supposed to be? I don't think is required. The previous 2.x version

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I agree that clamping is a nice solution, and attached patch implements it. About the question of the loop: FileIO.readall() uses while(1) without checking for signals. It looks like new_buffersize() maximum size is not BIGCHUNK

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: (oops, the patch contained unrelated changes: remove trailing spaces) -- Added file: http://bugs.python.org/file19899/read_write_32bits.patch ___ Python tracker rep...@bugs.python.org

[issue9611] FileIO not 64-bit safe under Windows

2010-12-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file19898/read_write_32bits.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611 ___

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Thu, Dec 02, 2010 at 02:19:10AM +, Senthil Kumaran wrote: On Wed, Dec 01, 2010 at 10:06:25AM +, Antoine Pitrou wrote: +try: + self.sock.sendall(data) Indentation problem here. I could notice it now.

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: 2) Can call len but not buffer: assume len == #bytes Why do you need it at all? Hmm, I'm looking at the the tests in urllib2 that fail if we omit this... in test_urllib2 there are tests that do this: req = Request(http://example.com/;, ) and

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Updated patch after correcting the mistake (bytes vs str) in the previous one. -- Added file: http://bugs.python.org/file19900/Issue3243-6.patch ___ Python tracker rep...@bugs.python.org

Re: [issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
On Thu, Dec 02, 2010 at 03:08:55AM +, Xuanji Li wrote: req = Request(http://example.com/;, ) That should be: req = Request(http://example.com/;, b) I updated some of those in the latest updated patch. ___ Python-bugs-list mailing list

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: And my version too... -- Added file: http://bugs.python.org/file19901/issue_3243_py3k_6.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3243

[issue10464] netrc module not parsing passwords containing #s.

2010-12-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed to py3k in r86925, 3.1 in r86926, and 2.7 in r86927. Thanks for the patch, Xuanji. -- nosy: +r.david.murray resolution: - fixed stage: commit review - committed/rejected status: open - closed

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Thu, Dec 02, 2010 at 03:16:53AM +, Xuanji Li wrote: And my version too... +if hasattr(data, '__len__') and not len(data): +request.add_unredirected_header('Content-length', '0') This is very

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Thu, Dec 02, 2010 at 03:20:05AM +, Xuanji Li wrote: Actually I don't think you can go around changing test_urllib2.py, they are after all regression tests... and surely some users will send as data. Think about it this way. In

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Xuanji Li
Xuanji Li xua...@gmail.com added the comment: thought of a better way, we can check if data is true; this will cover and b. this is in issue_3243_py3k_7.patch -- Added file: http://bugs.python.org/file19902/issue_3243_py3k_7.patch ___ Python

[issue3243] Support iterable bodies in httplib

2010-12-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Glaring at my mistakes. There was wrong examples in the test_urllib2 which I just corrected. There were.. Expect for the difference in (it = iter(data) - Which I am seeking Except for ... --

[issue9573] importing a module that executes fork() raises RuntimeError

2010-12-01 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Fixed for 3.2 in r86928. The fix has not been backported to 3.1, since it depends on the fix for issue 7242 (r78527) which was itself never backported to 3.1 after being forward ported to the py3k branch as part of a bulk merge (r83318)

[issue10602] csv test_register_kwargs has invalid message parameters

2010-12-01 Thread Alex Earl
New submission from Alex Earl slide.o@gmail.com: in test_csv.py, the follow test is declared. def test_register_kwargs(self): name = 'fedcba' csv.register_dialect(name, delimiter=';') try: self.assertTrue(csv.get_dialect(name).delimiter, '\t')

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Campbell Barton
Campbell Barton ideasma...@gmail.com added the comment: This bug is with blender3d, were the paths are stored internally in C as simple char arrays - bytes. We could expose all path names as bytes too through our C/python API, this would at least be a 1:1 mapping, however Id prefer using

[issue10600] surrogateescape'd paths not readable on Windows XP.

2010-12-01 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. You can't expect that using an arbitrary codec (such as UTF-8) with the surrogateescape code, and expect to be able that opening the file will be able to produce the correct filename. This won't work on Unix, in the

[issue10482] subprocess and deadlock avoidance

2010-12-01 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Here's an updated _writerthread idea that handles more cases: def _writerthread(self, fhr, fhw, length=None): if length is None: flag = True while flag: buf = fhr.read( 512 )

[issue10482] subprocess and deadlock avoidance

2010-12-01 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Sorry, left some extraneous code in the last message, here is the right code: def _writerthread(self, fhr, fhw, length=None): if length is None: flag = True while flag: buf = fhr.read(

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

2010-12-01 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I removed trailing '\' and whitespace, refreshed against current repository, removing conflicts, and committed. r86930 -- assignee: georg.brandl - terry.reedy resolution: accepted - fixed status: open - closed

[issue10047] python-2.6.6 coredump running newspipe

2010-12-01 Thread Thomas Klausner
Thomas Klausner t...@giga.or.at added the comment: I've updated the operating system to a 5.99.39, and the problem disappeared. Strange. Thanks for the suggestions. -- status: open - closed ___ Python tracker rep...@bugs.python.org