[issue10046] Correction to atexit documentation

2010-10-07 Thread Georg Brandl
Georg Brandl added the comment: One could also argue that on SIGINT, the program is not "killed" but "interrupted" by the signal :) What about "... killed by an unhandled signal ..."? -- nosy: +georg.brandl ___ Python tracker

[issue10040] GZipFile failure on large files

2010-10-07 Thread Ned Deily
Ned Deily added the comment: Since you mention 7-zip, does that mean you are seeing the problem on a Windows platform? If so, exactly which version of Windows and what kind of system? Also, unless someone recognizes this as a duplicate of an earlier issue, there may not be much action on it

[issue1777412] Python's strftime dislikes years before 1900

2010-10-07 Thread kiorky
kiorky added the comment: This patch doesnt apply anymore on py26. Joining an updated patch. -- Added file: http://bugs.python.org/file19157/strftime-pre-1900.patch ___ Python tracker ___

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread kai zhu
Changes by kai zhu : -- keywords: +patch Added file: http://bugs.python.org/file19156/socket.makefile.newline.kwarg.patch ___ Python tracker ___ _

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread kai zhu
kai zhu added the comment: my bad again, hacking newline parameter to the correct argument position works (its in the position where error should b). a one line patch would be: socket.py -text = io.TextIOWrapper(buffer, encoding, newline) +text = io.TextIOWrapper(buffer, enco

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread kai zhu
kai zhu added the comment: my bad for not rtfm, but it seems the newline argument has no effect in socket.makefile. the TextIOWrapper signatures don't seem to match. a hack to put newline parameter in 4th position or making it a keyword arg doesn't work either (scratch my head...) socket.p

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2010-10-07 Thread R. David Murray
R. David Murray added the comment: Here is an updated patch incorporating the reitveld feedback and feedback from python-dev about the API. Now we have BytesParser instead of Parser with a parsebytes method, and a message_from_binary_file helper. Generator also now converts bodies with an 8

[issue6825] Minor documentation bug with os.path.split

2010-10-07 Thread Evan Driscoll
Evan Driscoll added the comment: Hah, I totally forgot about this thing. I'd suggest a change to the proposed patch. The patched version says: "In nearly all cases, ``join(head, tail)`` returns a location equivalent to *path* (the only exception being when there were multiple slashes

[issue10046] Correction to atexit documentation

2010-10-07 Thread Adam Olsen
Adam Olsen added the comment: Signals can directly kill a process. Try SIGTERM to see this. SIGINT is caught and handled by Python, which just happens to default to a graceful exit (unless stuck in a lib that prevents that.) Try pasting your script into an interactive interpreter session a

[issue10047] python-2.6.6 coredump running newspipe

2010-10-07 Thread R. David Murray
R. David Murray added the comment: Can you reproduce this using python2.7? Python 2.6 is in security fix only mode now. -- ___ Python tracker ___ _

[issue10047] python-2.6.6 coredump running newspipe

2010-10-07 Thread R. David Murray
R. David Murray added the comment: Indeed, newspipe appears to be a pure python package, so this looks like it is probably a bug in python somewhere. You might want to report it to newspipe too, though. They are likely to be able to figure out how to reduce the problem to a minimum cause fas

[issue10046] Correction to atexit documentation

2010-10-07 Thread R. David Murray
R. David Murray added the comment: It is possible this behavior changed after the docs were written. I'm adding a couple of people to nosy who might have some insight into that possibility. It could be either a change in finalization procedures or a change in signal handling semantics, I th

[issue4907] ast.literal_eval does not properly handled complex numbers

2010-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed handling on unary minus in r85314. In so doing, it also liberalized what literal_eval() accepts (3j+4 for example). This simplified the implementation and removed an unnecessary restriction which wasn't needed for "safety". -- nosy: +rhettin

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: deleted_cwd.patch, patch based on labrat's patch updated to py3k: http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/python/rev/77f3ad10ba45 Procedure to test the patch: - go into Python source tree - make a directory "z" - enter z directory - delete

[issue6612] 'import site' fails when called from an unlinked directory

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: There was a bug in copy_absolute(): if _Py_wgetcwd() failed, the result was undefined (depending of the content of "path" buffer). Especially, absolutize() calls copy_absolute() with a buffer allocated on the stack: the content of this buffer depends on the u

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file19147/realpath_fs_encoding.patch ___ Python tracker ___ ___ Python-bugs-l

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: I just created Python/fileutils.c: update the patch for this new file. -- Added file: http://bugs.python.org/file19153/realpath_fs_encoding-2.patch ___ Python tracker

[issue10047] python-2.6.6 coredump running newspipe

2010-10-07 Thread Thomas Klausner
New submission from Thomas Klausner : I'm running newspipe-1.1.9, an RSS reader (http://newspipe.sourceforge.net/), on NetBSD-5.99.11/amd64 using Python-2.6.6. Sometimes, it core dumps with particular feeds in the configuration (I guess depending on the feed, because when I comment out the offen

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: As Eric said. Please see the socket.makefile doc: “Return a file object associated with the socket. The exact returned type depends on the arguments given to makefile(). These arguments are interpreted the same way as by the built-in open() function.” (http:

[issue6825] Minor documentation bug with os.path.split

2010-10-07 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, I find the proposed text change good, and so here's a patch to add that in a bit different format (sorry it's quite of a mess, but I took the occasion to wrap that paragraph to 80th column). Regards, Sandro -- keywords: +patch nosy: +sandro.tosi

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think there's much point in fixing this. 2.7 users can use io.BytesIO, which is a fast type implemented in C. -- ___ Python tracker __

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: > For the record, a Py_uintptr_t version works and has the same > performance. Would you agree to it or is there still some menacing > oddity from the i386 days lurking around? Technically, it's still dodgy: as the gcc manual notes in: http://gcc.gnu.org/onl

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, a Py_uintptr_t version works and has the same performance. Would you agree to it or is there still some menacing oddity from the i386 days lurking around? -- ___ Python tracker

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In other words, when producing code for ptr_compare, the compiler is > allowed to *assume* that a and b point into the same array, and act > accordingly. But this assumption doesn't bring *anything*, right? That is, there is no shortcut way to compute "p - q"

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See the example above: suppose that a compiler is looking at a (p >= > q) comparison of pointers. Suppose furthermore that in a particular > case that compiler is smart enough to figure out that q is a pointer > to the start of an array. Which array? You ca

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: > How is the compiler supposed to know whether a and b belong to the same > array when compiling ptr_compare? It doesn't need to know. So long as the compiler can guarantee that its code will produce correct results in the case that a and b *do* both point to

[issue10046] Correction to atexit documentation

2010-10-07 Thread Jason Baker
New submission from Jason Baker : There's an issue with the documentation on the atexit module[1]. It states: "Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when os._exit() is called."

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In the bad old days of 386 segment:offset memory architectures this > was a problem. You could have overlapping segments but pointers inside > an object were always in the same segment, so the segment selectors > never had to be inspected. Pointers to differen

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: See the example above: suppose that a compiler is looking at a (p >= q) comparison of pointers. Suppose furthermore that in a particular case that compiler is smart enough to figure out that q is a pointer to the start of an array. Then the compiler is *pe

[issue10044] small int optimization

2010-10-07 Thread Eric Smith
Eric Smith added the comment: In the bad old days of 386 segment:offset memory architectures this was a problem. You could have overlapping segments but pointers inside an object were always in the same segment, so the segment selectors never had to be inspected. Pointers to different objects

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > How can the compiler tell whether two pointers are "into the same > > array"? That sounds like an undecidable criterion. > > It doesn't have to be able to tell---it's allowed to assume. :-) That doesn't very clear or understandable. -- _

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: > How can the compiler tell whether two pointers are "into the same > array"? That sounds like an undecidable criterion. It doesn't have to be able to tell---it's allowed to assume. :-) -- ___ Python tracker

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Nope. It's only well-defined for pointers pointing into the same > array (or to one past the end of an array). Otherwise it's undefined > behaviour. How can the compiler tell whether two pointers are "into the same array"? That sounds like an undecidable cr

[issue6417] multiprocessing Process examples: print and getppid

2010-10-07 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, indentation problem has been fixed in r79901 and py3k syntax has been fixed in r74764. wrt os.getppid(), in the documentation it's stated that with 3.2 it added support for windows too: I'd like someone running a windows box (I don't have a win system an

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: > I can't say anything about the standard, but p > q looks like it should > be the same as (p - q) > 0 Yep. > which looks rather well-defined for pointers. Nope. It's only well-defined for pointers pointing into the same array (or to one past the end of an

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: > Technically arbitrary relational comparisons of pointers are undefined, > but in practice Antoine's assumptions here are very modest. I disagree: there's a very real practical danger here. Namely, optimizing compilers are free to assume that code doesn't i

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > How does performance change if you adjust NSMALLPOSINTS and > NSMALLNEGINTS, but make no other changes? It makes a very small difference (which is understandable since it doesn't cut down on code execution a lot). -- ___

[issue7285] multiprocessing module, example code error

2010-10-07 Thread Sandro Tosi
Sandro Tosi added the comment: Hello, i've verified that the problem still exists in an up-to-date py3k branch, and that the proposed patch indeed fixes the bug. Since the patch no more applies cleanly, I've refreshed it, and also added additional information about authkey that it must be a b

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll update the docs with an equivalent that works and that has a comment showing when the StopIteration is raised and caught. -- ___ Python tracker __

[issue10042] total_ordering stack overflow

2010-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks, this is a good idea. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Technically arbitrary relational comparisons of pointers are > undefined, but in practice Antoine's assumptions here are very modest. > They boil down to: > >v >= &array[0] && v < &array[array_len] I can't say anything about the standard, but p > q looks

[issue10044] small int optimization

2010-10-07 Thread Aahz
Changes by Aahz : -- nosy: -Aahz, aahz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread R. David Murray
R. David Murray added the comment: I'm changing the versions to just 2.7 (though I'm not sure this can be considered a bug fix), since StringIO is reimplemented as part of io in 3.x. -- nosy: +r.david.murray versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.3 __

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Trent Mick added the comment: c.f. some discussion on python-dev here: http://mail.python.org/pipermail/python-dev/2010-October/104501.html -- ___ Python tracker ___

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread Patrick Strawderman
Patrick Strawderman added the comment: The second sentence should have said "the gap is filled in with n null bytes" -- ___ Python tracker ___ __

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread Patrick Strawderman
Changes by Patrick Strawderman : -- components: -None ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread Patrick Strawderman
Changes by Patrick Strawderman : -- components: +None type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue10045] poor cStringIO.StringO seek performance

2010-10-07 Thread Patrick Strawderman
New submission from Patrick Strawderman : cStringIO.StringO's seek method has O(n) characteristics in certain, albeit pathological, cases, while the pure Python implementation and cStringIO.StringI's seek methods both execute in constant time in all cases. When the file offset is set n bytes bey

[issue10044] small int optimization

2010-10-07 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Max
Max added the comment: Personally, I find it impossible in some cases to understand exactly what a function does just from reading a textual description. In those cases, I always refer to the equivalent code if it's given. In fact that's the reason I was looking going the zip equivalent funct

[issue5870] subprocess.DEVNULL

2010-10-07 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue10044] small int optimization

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I don't think arbitrary comparisons of pointers give well-defined > results, unless those pointers both happen to point into the same > array. (Might be wrong; I don't have a copy of the C standard to > hand.) Technically arbitrary relational comparisons

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Maybe we could consider adding an extra field to a PyLong giving its > 'small_int' value for small values, and some flag value for non-small > longs. An extra field wouldn't actually enlarge the size of a PyLong > for small values---on a 64-bit machine, a val

[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-10-07 Thread PoltoS
PoltoS added the comment: By the way, doing a sock.shutdown(socket.SHUT_RDWR) with a subsequent sock.close() helps to really close an SSL socket. But this may raise additional errors with subsequent close() since on some OS (like OS X) shutdown may close the socket. Am I right? -- _

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Maybe we could consider adding an extra field to a PyLong giving its 'small_int' value for small values, and some flag value for non-small longs. An extra field wouldn't actually enlarge the size of a PyLong for small values---on a 64-bit machine, a value li

[issue8293] HTTPSConnection.close() does not immediately close the connection.

2010-10-07 Thread PoltoS
PoltoS added the comment: I've the with module ssl. If I do sock.close() (sock is instance of ssl.SSLSocket), the connection is not closed: I see it as Established in netstat and nothing is sent over network: tcpdump show nothing going thru the network. Python 2.6.5 Linux Ubuntu --

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: > I suggest removing the "equivalent to" code from the zip section and > replacing it with an example showing how to use zip with a for loop > similar to the example illustrating enumerate. +1 -- ___ Python tracke

[issue10029] "Equivalent to" code for zip is wrong in Python 3

2010-10-07 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As Daniel pointed out, the "equivalent to" code in builtins section comes from 2.x itertools documentation where and equivalent generator definition is presented for each function. While these definitions are helpful when used for documenting a module

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: +#define _PyLong_IS_SMALL_INT(v) \ +(((PyLongObject *)(v)) >= _PyLong_small_ints && \ + ((PyLongObject *)(v)) < _PyLong_SMALL_INTS_END) +/* These macros purposedly avoid a cast to int, since it is most of time + useless, and sometimes detrimental (beca

[issue10044] small int optimization

2010-10-07 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like a nice idea, at first glance, though I haven't looked at the code in detail. I like the use of the macros to abstract away the long implementation details. "INPLACE_SUBTRACT_end", not "INPLACE_SUBSTRACT_end", please! -- _

[issue10030] Patch for zip decryption speedup

2010-10-07 Thread R. David Murray
R. David Murray added the comment: It is what is normally done *now* when there is both a C and a python implementation (see, for example, test_datetime.py and test_io.py for two different approaches to that). Not all tests have been updated to this practice. Thanks for working on this. --

[issue10044] small int optimization

2010-10-07 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: How does performance change if you adjust NSMALLPOSINTS and NSMALLNEGINTS, but make no other changes? -- ___ Python tracker ___

[issue10042] total_ordering stack overflow

2010-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10030] Patch for zip decryption speedup

2010-10-07 Thread Shashank
Shashank added the comment: I have updated the patch with a check for the availability of C impl and to use pure-py impl as a fallback. How do you suggest would the tests change? As I had mentioned before, in my understanding since there is no change in the API the already existing tests sho

[issue10044] small int optimization

2010-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Arithmetic with void* pointers is not allowed by the Microsoft compilers. char* should be used instead. -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: thank you very much for the clarification. i did indeed not come across the page you've linked to, mainly because i did not really know what to google for. actually, i do not recall ever looking into the python language reference in 6+ years of python cod

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread Eric Smith
Eric Smith added the comment: Isn't this just the normal universal newline handling? When you open it in binary mode you see all of the characters, but in text mode (the absence of "b") you get normalized newlines (that is, they're converted to "\n"). -- components: -2to3 (2.x to 3.0

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Eric Smith
Eric Smith added the comment: It's a well documented behavior. Surely you ran across this link while researching your problem? http://docs.python.org/reference/executionmodel.html#naming-and-binding The paragraph beginning "The following constructs bind names ..." describes why setattr does n

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: I'm just a developer, I don't know anything about Python internals or what Python sees or does at what stage. Looking at the sample file, code executed later has an influence on code executed earlier - and that behavior is unexpected, confusing, bizarre,

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the approach in issue10044 is better. -- status: open -> pending ___ Python tracker ___ ___

[issue10044] small int optimization

2010-10-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is an experimental patch to optimize some operations on small ints. pystone is 5-10% faster, pybench 2-3% faster, and here are some relevant benchmarks from unladen swallow: ### nbody ### Min: 0.345136 -> 0.317502: 1.09x faster Avg: 0.346827 -> 0.319561

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: r85302: _wrealpath() and _Py_wreadlink() support surrogates in the input path. -- realpath_fs_encoding.patch: patch _wrealpath() to encode the resulting path with the filesystem encoding (with surrogateescape) instead of the locale encoding. This patch is in

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: This issue depends on issue #10039. -- dependencies: +python é.py fails with UnicodeEncodeError if PYTHONFSENCODING is used ___ Python tracker ___

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Eric Smith
Eric Smith added the comment: When python sees the assignment "name = None", it assumes that 'name' is a local variable. This happens before any code is executed. It then sees that you're printing 'name' before it is assigned to, which is an error. It does not take into account the dynamic cr

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
New submission from Steven Samuel Cole : inside a function, I create a local variable by using setattr with the current module as object, as in setattr(modules[__name__], 'name', 'value') if I _later_ in the code set name to None, the attribute becomes unavailable even for code that is execu

[issue809163] Can't add files with spaces

2010-10-07 Thread Anders Sandvig
Changes by Anders Sandvig : -- nosy: +asandvig ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue10038] Returntype of json.loads() on strings

2010-10-07 Thread Nik Tautenhahn
Nik Tautenhahn added the comment: Yep, the solution should not be "maybe it's str, maybe it's unicode" - I mean, if the decoder gives you a str if there are no fancy characters and unicode if it contains some, this might lead to some confusion... And yes, in my opinion, this is a bug, too. -

[issue10038] Returntype of json.loads() on strings

2010-10-07 Thread Nik Tautenhahn
Nik Tautenhahn added the comment: Well, then at least the documentation and the "What's changed" need to be updated. Furthermore, if such decisions are made, it would be at least nice to have some general "decode-hook" for json.JSONDecoder - the "object_hook" is only used for dict-objects - w

[issue10042] total_ordering stack overflow

2010-10-07 Thread Francesco Ricciardi
Francesco Ricciardi added the comment: Attached there is a solution of the problem, by implementing each comparison only with the class __xx__ and __eq__ operators. Also in the file there is a complete test suite for it. -- Added file: http://bugs.python.org/file19145/new_total_orderi

[issue10042] total_ordering stack overflow

2010-10-07 Thread Francesco Ricciardi
New submission from Francesco Ricciardi : Tested with version 3.2a2. Not tested on version 2.7. The current implementation of functools.total_ordering generates a stack overflow because it implements the new comparison functions with inline operator, which the Python interpreter might reverse

[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2010-10-07 Thread Éric Araujo
Éric Araujo added the comment: Can we reopen this as a feature request for 3.2? -- nosy: +eric.araujo ___ Python tracker ___ ___ Pytho

[issue9003] urllib.request and http.client should allow certificate checking

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: A big warning is now present (*) in the urllib and httplib documentation pages. Also, once issue1589 is fixed, we can go forward and make {http.client,urllib.request} check hostname and cert if the user gives the location of a bunch of CA certs. (*) see e.g.

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-07 Thread Mads Kiilerich
Mads Kiilerich added the comment: > Indeed. But, strictly speaking, there are no tests for IPs, so it > shouldn't be taken for granted that it works, even for commonName. > The rationale is that there isn't really any point in using an IP rather > a host name. I don't know if there is a point o

[issue8584] test_multiprocessing skips some tests

2010-10-07 Thread Brian Curtin
Brian Curtin added the comment: Fixed in r85299 (py3k), r85300 (release31-maint), and r85301 (release27-maint). -- assignee: jnoller -> brian.curtin resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7

[issue9759] GzipFile object should raise ValueError on .read() after .close()

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r85291 (3.x), and backported to 3.1 (r85293) and 2.7 (r85292). Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue10041] socket.makefile(mode = 'r').readline() silently removes carriage return

2010-10-07 Thread kai zhu
New submission from kai zhu : i'm working on an independent py2to3 utility which directly imports py2x modules, by reverse compiling ast trees (code.google.com/p/asciiporn/source/browse/stable.py) while forward porting the python2x redis client, this issue came up. i kno its bad to use strings

[issue10040] GZipFile failure on large files

2010-10-07 Thread Robert Rohde
New submission from Robert Rohde : I attempted to use GZipFile to process a 1.93 GB file that expands to 18.8 GB. This consistently produces the same corrupted output file that has approximately, but not exactly, the right output file size. I bypassed GZipFile by calling the 7-Zip executable t

[issue10038] Returntype of json.loads() on strings

2010-10-07 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: As I understand it, the decision to return str instead of unicode values for the "simplejson" module was simply inherited by the standard library. As such, it still needs to be evaluated in the context of the standard library, because of the incompatibility

[issue10039] python é.py fails with UnicodeEncodeErr or if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
New submission from STINNER Victor : If a program name contains a non-ascii character in its name and/or full path and PYTHONFSENCODING is set to an encoding different than the locale encoding, Python fails to open the program. Example in the utf-8 locale: $ PYTHONFSENCODING=ascii ./python é.

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a new patch with doc updates and the corrections mentioned above. -- Added file: http://bugs.python.org/file19141/sslcheck2.patch ___ Python tracker ___

[issue10028] test_concurrent_futures fails on Windows Server 2003

2010-10-07 Thread Brian Curtin
Brian Curtin added the comment: I'm getting error 6 aka ERROR_INVALID_HANDLE. I'll try to figure out what's going on later this week if I can find time. I'll also run this on my Server 2008 machine to see how works. -- ___ Python tracker

[issue2142] difflib.unified_diff(...) produces invalid patches

2010-10-07 Thread Trent Mick
Changes by Trent Mick : -- assignee: -> trentm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't know if there is a point or not, but some hosts are for some > reason intended to be connected to using IP address and their > certificates thus contains IP addresses. I think we should support that > too, and I find it a bit confusing to only have

[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2010-10-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since 'we' can reopen any closed issue, I will try to answer what I think you might be asking. I closed this because of Daniel's suggestion coupled with the Richard disclaiming further interest and neither Raghuram nor any new responder saying anything more.

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: > The problem is that PySys_SetArgvEx() ... Not only PySys_SetArgvEx(). There is another issue with RunMainFromImporter() which do: sys.path[0] = filename -- ___ Python tracker

[issue9163] test_gdb fails

2010-10-07 Thread Tom Morris
Tom Morris added the comment: Sorry, I misread the 'version' field as the version the fix was committed for, not the version the bug was reported against. The fix was reportedly fixed in r82648 and v2.7 is r82500. If there's ever a 2.7.1, I guess the fix will appear, but since the solution i

[issue1943] improved allocation of PyUnicode objects

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch against current py3k. -- Added file: http://bugs.python.org/file19142/unialloc6.patch ___ Python tracker ___ _

[issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used

2010-10-07 Thread STINNER Victor
STINNER Victor added the comment: See also issue #10039. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht