[issue18233] SSLSocket.getpeercertchain()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch needs a test, a proper doc, and reviewing. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18233 ___

[issue3982] support .format for bytes

2013-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___

[issue19201] lzma and 'x' mode open

2013-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Is there any reason why the order of characters matters here? builtins.open() supports them in any order (br==rb, bw==wb, ba==ab, bx==xb). -- nosy: +Arfrever ___ Python tracker

[issue19222] gzip and 'x' mode open

2013-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19222 ___

[issue19223] bz2 and 'x' mode open

2013-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19223 ___

[issue19201] lzma and 'x' mode open

2013-10-11 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Also tarfile.open() could support x mode. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19201 ___

[issue18233] SSLSocket.getpeercertchain()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry for the incorrect answer. I just noticed there was a test in the patch! Further looking at it, I notice the new function is returning a tuple. Wouldn't it be better to return a list here? -- ___ Python tracker

[issue18233] SSLSocket.getpeercertchain()

2013-10-11 Thread Dustin Oprea
Dustin Oprea added the comment: My two-cents is to leave it a tuple (why not?). Dustin -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18233 ___

[issue19224] Make hash(None) consistent among processes

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is this something we actually want to support officially? Many other types have non-repeatable hashes, e.g.: $ PYTHONHASHSEED=1 python3 -c print(hash((lambda: 0))) 8771754605115 $ PYTHONHASHSEED=1 python3 -c print(hash((lambda: 0))) 8791504743739 $

[issue19218] Use of MutableMapping in os module slows down interpreter startup

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: -1 on such hacks. I much prefer the _abcoll approach. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19218 ___

[issue19218] Use of MutableMapping in os module slows down interpreter startup

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: The collections module is loaded by the io module. You removed from collections.abc import MutableMapping from os.py. To be useful, you have also to rewrite the whole io module to remove all references to the collections.abc module, right? -- nosy:

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why adding ASCII strings, whereas you can add Latin1 (UCS1, U+-U+00FF) strings? Reasons: - most strings in pyc files are pure ASCII (it's like 99% in the stdlib) - unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning

[issue19224] Make hash(None) consistent among processes

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: In the same Python version, hash(None) always give me the same value. I cannot reproduced your issue on Linux, I tested Python 2.7, 3.3 and 3.4. $ python2.7 -c print(hash(None)) 17171842026 $ python2.7 -c print(hash(None)) 17171842026 $ python2.7 -c

[issue19224] Make hash(None) consistent among processes

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: It's wired and make difficulty for distributed systems partitioning data according hash of keys if the system wants the keys support None. How you handle the randomization of hash(str)? (python2.7 -R, enabled by default in Python 3.3). --

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning for non-ASCII chars Oh, I forgot this pain of the PEP 393. Don't tell me more, it's enough :-) -- ___ Python tracker

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I imagine that the test for ASCII is cheaper. It corresponds to the new compact internal unicode representation (one byte characters). This looks fine. Can you quantify where the speedup comes from? Reading the code, I see we now maintain a small

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks fine. Can you quantify where the speedup comes from? From all changes, but mainly the ASCII special-casing and the new buffering. Reading the code, I see we now maintain a small internal buffer in the file object, rather than using stack

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reading the code, I see we now maintain a small internal buffer in the file object, rather than using stack allocation at the call sites. It is unclear to me how this saves memory, since the amount of memory copying should be the same. No, memory

[issue19225] lack of PyExc_BufferError doc

2013-10-11 Thread hiroaki itoh
New submission from hiroaki itoh: http://docs.python.org/2.7/c-api/exceptions.html#standard-exceptions Python2.7 (at least 2.7.5) has PyExc_BufferError, but the document does not tell it. -- assignee: docs@python components: Documentation messages: 199458 nosy: docs@python,

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Right, in this case, memory copying is avoided. Regarding the memoing of 0, empty tuple, etc: Special opcode may still benefit because it takes only one byte. So, you save four bytes for each such case. I think it might be worth investigating.

[issue19225] lack of PyExc_BufferError doc

2013-10-11 Thread hiroaki itoh
hiroaki itoh added the comment: also: * GeneratorExit * StopIteration * VMSError (#ifdef __VMS) * UnboundLocalError * IndentationError * TabError * UnicodeError * UnicodeDecodeError * UnicodeEncodeError * UnicodeTranslateError * Warning; * UserWarning; * DeprecationWarning; *

[issue19210] Unicode Objects in Tuples

2013-10-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's at https://mail.python.org/mailman/listinfo/python-list -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19210 ___

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: - unmarshalling ASCII strings is faster: you can pass 127 to PyUnicode_New without scanning for non-ASCII chars You should ensure that loaded bytes are ASCII-only. Otherwise broken or malicious marshalled data will compromise you program. Decoding UTF-8

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: You should ensure that loaded bytes are ASCII-only. Otherwise broken or malicious marshalled data will compromise you program. This is not new, see the red warning in marshal doc: Warning The marshal module is not intended to be secure against erroneous or

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: We have to make two distinctions here: 1) Loading data and then running it. This is a bad idea if your data is not trusted. This is what is meant by marshal being unsafe. 2) Loading data and then not running it. This is perfectly fine, because

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: As for output, we could use cached UTF-8 representation of string (always exists for ASCII only strings) before calling PyUnicode_AsUTF8String(). PyUnicode_AsEncodedString(v, utf8, surrogatepass) is expensive. I proposed an optimization for the pickle module,

[issue19217] Calling assertEquals for moderately long list takes too long

2013-10-11 Thread Michael Foord
Michael Foord added the comment: Ouch. Looking. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list mailing list

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: In fact, using 'marshal' as a cheap and fast pickler for builtin types is actually a good idea because it has no side effects like invoking code. It's an unsupported use case. The marshal docs are quite clear: Therefore, the Python maintainers reserve the

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: marshal and pickle are unsafe, even without the patch attached to the issue. If you consider that it is an issue that should be fixed, please open a new issue. Antoine's patch doesn't make the module less secure, since it was already not secure :) Loading

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: please discuss it elsewhere. Hum, I'm not sure that this word exist, I mean: somethere else :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219 ___

[issue19217] Calling assertEquals for moderately long list takes too long

2013-10-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19217 ___ ___ Python-bugs-list

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Therefore, the Python maintainers reserve the right to modify the marshal format in backward incompatible ways sure, don't expect such things to survive version changes. (Actually, they have been hitherto, and my version 3 I actually changed, to be

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Loading untrusted data ... is not supported by Python. This is a pretty bold claim. Is this, indeed, a fact? (and yes, elsewhere is a word) -- ___ Python tracker rep...@bugs.python.org

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Anyway, whether or not Pyhon guarantees this and that wrt. untrusted is beside the point and offtopic, as Victor poitns out. However: We are, and have always been, careful to fail gracefully if we detect data corruption. Never should the flipping of

[issue19219] speed up marshal.loads()

2013-10-11 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219 ___ ___

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The marshal module is not intended to be secure against erroneous or maliciously constructed data. Never unmarshal data received from an untrusted or unauthenticated source. Then we can simplify the marshal module by dropping all error handling:

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry for sarcasm. Well, indeed, the sarcasm is undeserved here, if the interpreter cannot crash because of the change. It's exactly what you suggest: reuse PyUnicode_AsUTF8String(). Actually _PyUnicode_UTF8(). PyUnicode_AsUTF8String() creates UTF8

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, I'll try out the patch with _PyUnicode_FromUCS1 instead of _PyUnicode_FromASCII, to see if it affects performance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Just for the record, I want to say that this is great stuff, Antoine! It's great when this sort of stuff gets some attention. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't understand how _PyUnicode_UTF8() can be used for *unmarshalling*. I say about marshalling. That said, I'll try out the patch with _PyUnicode_FromUCS1 instead of _PyUnicode_FromASCII, to see if it affects performance. Could you try out the patch

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: This will save you two opcodes and perhaps several lines of code. Just bear in mind that without other changes, version 4 needs to be backwards compatible with version 3. I ran into this when developing version 3. The reason is that while the marshal

[issue3982] support .format for bytes

2013-10-11 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- nosy: -gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3982 ___ ___ Python-bugs-list

[issue13477] tarfile module should have a command line

2013-10-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___ ___

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, I'll try out the patch with _PyUnicode_FromUCS1 instead of _PyUnicode_FromASCII, to see if it affects performance. Could you try out the patch with PyUnicode_DecodeUTF8()? This will save you two opcodes and perhaps several lines of code. That

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I ran into this when developing version 3. The reason is that while the marshal format includes the version information in its header, it isn't actually verified on loading. IIRC. You specify the expected format to the function, or something like that.

[issue19219] speed up marshal.loads()

2013-10-11 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: How about adding a version opcode? This is a backwards compatible change, and allows us to reject unsupported versions in the future, as long as they are not very old unsupported versions. -- ___ Python

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This will save you two opcodes and perhaps several lines of code. Just bear in mind that without other changes, version 4 needs to be backwards compatible with version 3. I meant two of new proposed opcodes: TYPE_ASCII and TYPE_ASCII_INTERNED.

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That would be a change in behaviour, since currently surrogatepass is the error handler. I don't propose any change in behaviour. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I meant two of new proposed opcodes: TYPE_ASCII and TYPE_ASCII_INTERNED. You cannot change the meaning of TYPE_UNICODE (it uses surrogatepass). Therefore, you have to use new opcodes with other semantics. Besides, opcodes are cheap. --

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You cannot change the meaning of TYPE_UNICODE (it uses surrogatepass). Therefore, you have to use new opcodes with other semantics. You don't need new semantic. Use old semantic. The set of ASCII encoded strings is a subset of valid UTF8 encoded strings,

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: You cannot change the meaning of TYPE_UNICODE (it uses surrogatepass). Therefore, you have to use new opcodes with other semantics. You don't need new semantic. Use old semantic. The set of ASCII encoded strings is a subset of valid UTF8 encoded

[issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4515186bf9c by R David Murray in branch 'default': #19192: Give up on time.xmlrpc.com as an xmlrpc network test. http://hg.python.org/cpython/rev/a4515186bf9c -- nosy: +python-dev ___ Python tracker

[issue19192] Move test_current_time from test_xmlrpc_net to test_xmlrpc

2013-10-11 Thread R. David Murray
R. David Murray added the comment: Thanks, Vajrasky. I simplified your test a bit further still. It occurs to me that nowadays (unlike when the file was written), we can use resources to skip individual test classes or even individual tests. So we could open a new issue to move the last

[issue19180] some RFC references could be updated

2013-10-11 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19180 ___ ___

[issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found

2013-10-11 Thread W. Trevor King
New submission from W. Trevor King: Avoid: Traceback (most recent call last): File setup.py, line 61, in module 'html2text (=3.0.1)', File /.../python3.2/distutils/core.py, line 148, in setup dist.run_commands() File /.../python3.2/distutils/dist.py, line

[issue19180] some RFC references could be updated

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also http://comments.gmane.org/gmane.comp.python.devel/139953 . -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19180 ___

[issue15806] Add context manager for the try: ... except: pass pattern

2013-10-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15806 ___ ___

[issue5388] Green-box doc glitch: winhelp version only

2013-10-11 Thread Georg Brandl
Georg Brandl added the comment: Is this still an issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5388 ___ ___ Python-bugs-list mailing

[issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found

2013-10-11 Thread Ned Deily
Ned Deily added the comment: This problem has been reported previously as Issue17354, a duplicate of Issue12853 which is still open at the moment. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - global name 'r' is not

[issue19219] speed up marshal.loads()

2013-10-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219 ___ ___ Python-bugs-list

[issue12853] global name 'r' is not defined in upload.py

2013-10-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12853 ___ ___

[issue19226] distutils/command/upload.py show response gives: TypeError: sequence item 1: expected str instance, bytes found

2013-10-11 Thread W. Trevor King
W. Trevor King added the comment: On Fri, Oct 11, 2013 at 05:21:15PM +, Ned Deily wrote: This problem has been reported previously as Issue17354, a duplicate of Issue12853 which is still open at the moment. Ah, I searched for a fwe possible subject lines, but didn't hit those :p. I

[issue12853] global name 'r' is not defined in upload.py

2013-10-11 Thread W. Trevor King
W. Trevor King added the comment: I just posted a patch fixing this in the current master branch [1]. Ned Deily pointed out that my Issue19226 duplicated an earlier Issue17354, which also has a patch fixing this problem. Merging either one of these patches should close this issue. I like

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch using PyUnicode_FromKindAndData for ASCII strings, to ensure that corrupt marshal bytecode doesn't provide corrupt unicode objects. Performance is within 2% of the previous patch. (however, a quick test suggests that PyUnicode_DecodeUTF8 is

[issue13477] tarfile module should have a command line

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: From a quick glance, the patch looks ok. Serhiy, do you want to review it any further? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___

[issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots

2013-10-11 Thread Antoine Pitrou
New submission from Antoine Pitrou: test_multiprocessing has started to hang frequently on the Gentoo buildbots. It seems it has started happening with the OpenSSL re-seeding commits: http://hg.python.org/cpython/rev/8e1194c39beddb83337c0acb9e4c2922a02a36cf David, could you try to investigate

[issue5388] Green-box doc glitch: winhelp version only

2013-10-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes. On win 7, html help control 6.1, the horizontal scroll bar is still put in or on top of the box, but it is thinner so it only cuts off half of the bottom line instead of hiding it completely. There is no longer a vertical scroll bar, which means one can

[issue5388] Green-box doc glitch: winhelp version only

2013-10-11 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5388 ___

[issue19221] Upgrade to Unicode 6.3.0

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doc/whatsnew/3.4.rst -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19221 ___ ___

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Victor's comments on Rietveld. Thank you Victor. The surrogatepass error handler now works with different spellings of encodings (utf_32le, UTF-32-LE, etc). I tested utf_16_32_surrogates_4.patch: surrogateescape with as encoder does

[issue13477] tarfile module should have a command line

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this is in my plans. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13477 ___ ___ Python-bugs-list

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: Removed file: http://bugs.python.org/file32023/sysconfig_delay_re.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19205 ___

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: Removed file: http://bugs.python.org/file32017/site_no_re.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19205 ___

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: Here is a new patch with unit test and patch for the locale module. The locale modules is loaded by the _io module when any standard stream is not connected to a terminal (or so). -- Added file: http://bugs.python.org/file32048/startup_no_re.patch

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Review posted on Rietveld. -- nosy: +pitrou stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19205 ___

[issue19219] speed up marshal.loads()

2013-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let a code say instead me. -- Added file: http://bugs.python.org/file32049/marshal_opts5a.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19219 ___

[issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots

2013-10-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19227 ___ ___ Python-bugs-list

[issue19219] speed up marshal.loads()

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Let a code say instead me. I don't understand your patch. The macros you define aren't used anywhere. Also, your patch keeps the slow call to PyUnicode_DecodeUTF8. -- ___ Python tracker rep...@bugs.python.org

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: I accept hacks to speedup Python is the site module, but it becomes more surprising in the locale module. The issue #9548 proposes to a more generic solution for the locale module at startup. -CONFIG_LINE =

[issue9548] locale can be imported at startup but relies on too many library modules

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: The locale module uses only collections.abc.Mapping. The import of the entire collections module can be avoided if collections.abc is renamed to _abcoll again. functools.wrap() can be replaced with: localeconv.__doc__ = _localeconv.__doc__ The other

[issue19219] speed up marshal.loads()

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: (however, a quick test suggests that PyUnicode_DecodeUTF8 is quite slower) It's surprising that PyUnicode_DecodeUTF8() is quite slower than _PyUnicode_FromUCS1(). _PyUnicode_FromUCS1() calls ucs1lib_find_max_char() and then memcpy(). PyUnicode_DecodeUTF8()

[issue19227] test_multiprocessing_xxx hangs under Gentoo buildbots

2013-10-11 Thread R. David Murray
R. David Murray added the comment: Running test_socket test_ssl test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spaw under -F on the buildbot, I got the following failure during the second loop: [ 10] test_multiprocessing_spawn Traceback (most recent call last):

[issue9548] locale can be imported at startup but relies on too many library modules

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: ... the _bootlocale can be simplified to a few lines: ... Here is the patch implementing my proposition: bootlocale3.patch. -- Added file: http://bugs.python.org/file32050/bootlocale3.patch ___ Python tracker

[issue9548] locale can be imported at startup but relies on too many library modules

2013-10-11 Thread STINNER Victor
STINNER Victor added the comment: Does anyone know if Python does still support systems where CODESET is not available? Which OS does not support CODESET? I checked my VMs with Python, nl_langinfo(CODESET) works on: - Linux (Fedora 18, kernel 3.9) - OpenBSD 5.2 - OpenIndiana 148 (SunOS 5.11)

[issue9548] locale can be imported at startup but relies on too many library modules

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: You could raise an error and wait until somebody files a complain. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9548 ___

[issue9548] locale can be imported at startup but relies on too many library modules

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset fbbf8b160e8d by Antoine Pitrou in branch 'default': Issue #9548: Add a minimal _bootlocale module that is imported by the _io module instead of the full locale module. http://hg.python.org/cpython/rev/fbbf8b160e8d -- nosy: +python-dev

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 406529adf156 by Christian Heimes in branch 'default': Issue #19205: Don't import the 're' module in site and sysconfig module to http://hg.python.org/cpython/rev/406529adf156 -- nosy: +python-dev ___

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your input! -- resolution: - fixed stage: patch review - commit review status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19205

[issue19205] Don't import re and sysconfig in site.py

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2cd1b28d1666 by Christian Heimes in branch 'default': Issue #19205 fix 406529adf156 http://hg.python.org/cpython/rev/2cd1b28d1666 -- ___ Python tracker rep...@bugs.python.org

[issue19209] Remove import copyreg from os module

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: os_stat_statvfs_pickle.patch with comments and tests. -- Added file: http://bugs.python.org/file32051/os_stat_statvfs_pickle2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19209

[issue19228] type.__qualname__ should not strip the module name

2013-10-11 Thread STINNER Victor
New submission from STINNER Victor: type.__qualname__ getter type_qualname() calls type_name() which strips the module name from the type name (type-tp_name). Attached patch fixes this. -- files: type_qualname.patch keywords: patch messages: 199518 nosy: haypo priority: normal

[issue19228] type.__qualname__ should not strip the module name

2013-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: __qualname__ strips the module name by design. If you want the module name, look up __name__ on the module. -- nosy: +pitrou resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue19218] Use of MutableMapping in os module slows down interpreter startup

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: The io module no longer imports collections.abc through the locale module. Eric, I'm with Antoine. Your patch is too much of a clever hack and uses tricks that are dark magic. _abcoll is much simpler and easier to understand. Plus it can be used from other

[issue19218] Use of MutableMapping in os module slows down interpreter startup

2013-10-11 Thread Eric Snow
Eric Snow added the comment: Not a problem. It is most definitely a hack. :) I put in up as an alternative to rearranging the collections module, but agree that doing so is preferable. I image that Raymond will make a decision on that one. --

[issue19209] Remove import copyreg from os module

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29c4a6a11e76 by Christian Heimes in branch 'default': Issue #19209: Remove import of copyreg from the os module to speed up http://hg.python.org/cpython/rev/29c4a6a11e76 -- nosy: +python-dev ___ Python

[issue19209] Remove import copyreg from os module

2013-10-11 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your help! Python is down to 43 modules on Linux. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue19209] Remove import copyreg from os module

2013-10-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 89e405e6a7a9 by Christian Heimes in branch 'default': Issue #19209: fix structseq test http://hg.python.org/cpython/rev/89e405e6a7a9 -- ___ Python tracker rep...@bugs.python.org

[issue19229] operator.py: move the Python implementation in the else block of try/except ImportError

2013-10-11 Thread STINNER Victor
New submission from STINNER Victor: To speedup Python startup, it may be interesting to not create useless many functions and classes in operator.py: from _operator import * will remove them a few line later. What do you think of moving the Python implementation of the operator module inside

[issue19179] doc bug: confusing table of values

2013-10-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that this could be improved. It took a few readings to convince myself that True == Vulnerable. (Assuming that this is correct ;-) the table needs a title like Vulernable or a lead in sentence: The following table indicates which modules are

[issue19191] os.path.splitext in windows , a little question

2013-10-11 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19191 ___ ___ Python-bugs-list

  1   2   >