[issue16414] Add support.NONASCII to test non-ASCII characters
Serhiy Storchaka added the comment: I tested brute.py for all supported in Python encodings: No character for encoding cp1006:surrogateescape :-( No character for encoding cp720:surrogateescape :-( No character for encoding cp864:surrogateescape :-( No character for encoding iso8859_3:surrogateescape :-( No character for encoding iso8859_6:surrogateescape :-( No character for encoding mac_arabic:surrogateescape :-( No character for encoding mac_farsi:surrogateescape :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Peter added the comment: Apologies for noise, but since a backport was discussed, I'm mentioning this here. I've started implementing a backport, currently working and tested on Mac OS X and Linux, back to Python 3.0 - supporting Python 2 would be nice but probably significantly more work (assistance welcome - please get in touch on github): https://github.com/peterjc/backports.lzma Assuming Nadeem has no objections, I intend to publish this on PyPI (I have tried to email directly but perhaps I'm using an old email address or he has been busy, another reason for commenting here). Thanks! -- nosy: +maubp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
STINNER Victor added the comment: I tested brute.py for all supported in Python encodings: Oh thanks, interesting result. I completed the encoding list and the character list: see brute2.py. I added joker characters: U+00A0 and U+20AC which match requierements for most locale encodings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16353] add function to os module for getting path to default shell
Christian Heimes added the comment: Meh, Python 2.6 from SL4A (scripting languages for Android) doesn't have os.confstr(). I just tried it in a Android 2.3.3 emulator. Python 2.6 on Linux has the function. I propose we fall back to PATH env and use /bin as last resort. try: cspath = confstr(CS_PATH) except (ValueError, NameError): # installation doesn't have confstr() or doesn't know about CS_PATH # fall back to PATH environ and use /bin as last resort cspath = environ.get(PATH, /bin) for path in cspath.split(pathsep): ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Roundup Robot added the comment: New changeset dafca4714298 by Tim Golden in branch 'default': issue9584: Add {} list expansion to glob. Original patch by Mathieu Bridon http://hg.python.org/cpython/rev/dafca4714298 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText
New submission from Daniele Varrazzo: I've converted the DBAPI to reST, mostly to allow linking from external documentation. It would be great to replace the current text only version with it. File attached. -- assignee: docs@python components: Documentation files: pep-0249.txt messages: 174965 nosy: docs@python, lemburg, piro priority: normal severity: normal status: open title: PEP 249 (DB-API 2.0) converted to reStructuredText type: enhancement Added file: http://bugs.python.org/file27908/pep-0249.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16392] import crashes on circular imports in ext modules
Brett Cannon added the comment: I was thinking somewhere in http://docs.python.org/3/c-api/import.html since this only comes up when you try to execute an import during extension module initialization that involves a circular import. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
New submission from Václav Šmilauer: This issue was split off issue16194 (I am not copying the whole discussion here). It was suggested a new issue is opened for Python3, where a proper fix can be done. Python internally caches dynamically loaded modules, but the cache is based on the filename only. If one file contains several modules, only the first of them is imported and initialized properly. This interface was previously exposed via imp.load_dynamic, the same codepath is used by importlib.machinery.ExtensionFileLoader now. A solution is to cache by the (filename, modulename) tuple, which avoids any ambiguity. I am attaching a simple patch for that, agains current hg tip (80272:ec00f8570c55), and tested with the scripot attached to issue16194. I have not modified the test suite, I am not sure whether testing compiled modules is actually supported (did not see any compiled files in there), I will be glad for help. -- components: Extension Modules files: many-modules-in-one-so_1.diff keywords: patch messages: 174967 nosy: Arfrever, amaury.forgeotdarc, brett.cannon, docs@python, eudoxos, ncoghlan, r.david.murray priority: normal severity: normal status: open title: importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file27909/many-modules-in-one-so_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16417] Integer converted in tuple without request
Rosa Maria added the comment: Thanks Thanks Thanks Thanks Thanks Thanks Thanks you very much, You are going to go to heaven with your shoes included. Best regards and have a nice year end. Rosa María Cuídate de la Ciencia que no Llora, de la Filosofía que no Ríe y de la Grandeza que no se inclina ante los niños Madre es el nombre de dios en los labios y en los corazones de todos los niños De: R. David Murray rep...@bugs.python.org Para: rosem...@yahoo.com.mx Enviado: Lunes, 5 de noviembre, 2012 17:17:35 Asunto: [issue16417] Integer converted in tuple without request R. David Murray added the comment: You did request a tuple: r = a - q * b, That is equivalent to r = (a - q * b,) which is a single element tuple. I had to put in some print statements in your loop to find that, it wasn't obvious. This is perhaps a disadvantage of Python's tuple notation, but the benefits of the notation outweigh this small disadvantage, I think. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16417 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Andrew Svetlov added the comment: Storing several modules in single so/pyd file is crazy idea from my perspective. The test is definitely required. BTW, Why version is set to 3.5? Should component be set to Interpreter code? -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Amaury Forgeot d'Arc added the comment: It's not that crazy, if you consider that all builtin modules are stored in python33.dll. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Václav Šmilauer added the comment: Storing several modules in one .so file offloads some issues which have to be dealt with manually (like one module needing symbols from other module, or even cross-dependencies) to the linker. In any case, unless forbidden and signalled, it should be supported. I set version to 3.4 and component to Interpreter core, as you suggested, it is probably more appropriate. How do I write test which requires a custom module to be compiled? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Benjamin Peterson added the comment: Here's the message that helped convince us to go against collision counting originally: http://mail.python.org/pipermail/python-dev/2012-January/115726.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Serhiy Storchaka added the comment: glob.glob('*.ac') ['configure.ac'] glob.glob('*.sub') ['config.sub'] glob.glob('*.{sub,ac}') ['config.sub'] And since these changes are backward incompatible (and moreover, now it is impossible to glob for paths that contain braces), I would prefer a keyword to switch this option (off by default) or a separate function. See man glob [1] for flag GLOB_BRACE. [1] http://linux.die.net/man/3/glob -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Changes by Václav Šmilauer e...@doxos.eu: -- components: +Interpreter Core -Extension Modules versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Andrew Svetlov added the comment: Amaury, I'm ok with pushing several modules into python33.dll or embedding it directly into executable. For standard so/dll files you have to use different file names for modules to make regular import statement work. It can be done via symlink/hardlink, but looks a bit hairy. Václav, python already have _testbuffer and _testcapi modules used for testing only. I think you can add yet another one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Václav Šmilauer added the comment: @Andrew: I was using symlinks to achieve this, until I found recently that some exotic systems (read: windows) have still troubles there, like not letting non-admins create symlinks. -- type: enhancement - behavior versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Mathieu Bridon added the comment: glob.glob('*.{sub,ac}') ['config.sub'] I'm surprised this broke, this is one of the behaviour I thought I had implemented in my original patch. :-/ (and moreover, now it is impossible to glob for paths that contain braces) I am absolutely sure this was working in my original submission, I had even added unit tests for it: +# test some edge cases where braces must not be expanded +eq(self.glob('c{}d'), [self.norm('c{}d')]) +eq(self.glob('c{d{e,f}g'), map(self.norm, ['c{deg', 'c{dfg'])) +eq(self.glob('c{d,e}{f}g'), map(self.norm, ['cd{f}g', 'ce{f}g'])) +eq(self.glob('c{d,e}f}g'), map(self.norm, ['cdf}g', 'cef}g'])) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
R. David Murray added the comment: There is an example in the test suite somewhere. Probably in the distutils tests. Search for xxmodule...but you'll need to create your own source. I'd see if you can write it out from the test rather than checking in another data file, but a data file is an option if needed. -- components: +Extension Modules -Interpreter Core type: behavior - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Tim Golden added the comment: Must have been something I did. I'll revert the commit and re-test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so
Václav Šmilauer added the comment: issue16421 was opened for py3k. Just for the sport of writing, I fixed that in python 2.7 (tip) as well, though other seemed to defend the view it was not a bug, hence not fixable in 2.7. -- keywords: +patch versions: -Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27910/py2_many-modules-in-one-so_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
R. David Murray added the comment: Sorry, didn't mean to change the component back. -- components: +Interpreter Core -Extension Modules type: behavior - enhancement versions: +Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16381 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText
Andrew Svetlov added the comment: Original file has been changed just now. Also it would be nice to get diff, not just new file (to check correctness of transition). -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText
Daniele Varrazzo added the comment: Andrew, I've probably changed every single line (as almost all the original was indented), so diff wouldn't show anything useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Roundup Robot added the comment: New changeset ec897bb38708 by Tim Golden in branch 'default': Reversed changes from issue9584 http://hg.python.org/cpython/rev/ec897bb38708 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16420] PEP 249 (DB-API 2.0) converted to reStructuredText
Marc-Andre Lemburg added the comment: On 06.11.2012 16:33, Daniele Varrazzo wrote: Daniele Varrazzo added the comment: Andrew, I've probably changed every single line (as almost all the original was indented), so diff wouldn't show anything useful. I'll go through the text and double check for typos. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Nov 06 2012) Python Projects, Consulting and Support ... http://www.egenix.com/ mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/ ::: Try our new mxODBC.Connect Python Database Interface for free ! eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
John M Camara added the comment: How about using a secure hash algorithm that's implemented in HW when available. It doesn't eliminate the issue on systems that lack this support but at least it limits the scope of the problem. Of course some testing would need to be done to make sure the hardware hashing doesn't have a significant impact on performance. -- nosy: +camara ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib/httplib header capitalization
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Václav Šmilauer added the comment: I added the test, with a module Modules/_testimportmultiple.c. The test uses the (undocumented) imp module, but all othet tests in Lib/test/test_imp.py do the same, so I assume it is OK? -- Added file: http://bugs.python.org/file27911/many-modules-in-one-so_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: Our hash randomization will always leak some information about the randomization keys. The only way to properly secure our secrets is a cryptographic secure algorithms, for example a crypto hashing function in combination with a message authentication code like HMAC. I don't have to explain how that is going to hurt performance ... We can try to make it harder to guess the secret parts with a slightly modified algorithm like e.g. V8's hash but that's never going to be 100% secure. But might be secure enough to make an attack too hard. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16388] Urllib screws up capitalization in User-Agent HTTP Header
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16388 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: I deem hash randomization and collision counting as a poor man's workaround for the actual issue. Perhaps we shouldn't try too hard to fix an unsuitable data type. Hash maps have a known worst case complexity of O(n). A O(log n) algorithm should be used to parses and malicious key/value pairs. How about Python grows a additional btree implementation in its collections module? I know that it's not going to fix existing code. However in the long run it's the best safeguard against hash collision attacks. I'm thinking about a simple, self balancing btree like red-black-tree. A quick search on Wikipedia also revealed Scapegoat and Splay tree with interesting properties. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Giovanni Bajo added the comment: Christian, there are good semi-crypto hash functions that don't leak as bad as Python's own modified FNV hash, without going all the way to HMAC. SipHash has very good collision resistance and doesn't leak anything: https://www.131002.net/siphash/ (notice: they distribute a python program to recover python's seed) It's obviously slower than Python's FNV, but it's hard to beat a sum+multiplication per character. -- nosy: +Giovanni.Bajo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Serhiy Storchaka added the comment: I am absolutely sure this was working in my original submission, I had even added unit tests for it: It can't be working in any implementation. os.makedirs('a{b,c}d/e') os.listdir('a{b,c}d') ['e'] glob.glob('a{b,c}d/*') [] Was ['a{b,c}d/e'] in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Brett Cannon added the comment: It's fine to cheat in tests, although test_imp predates importlib which is why it uses an undocumented API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench
Serhiy Storchaka added the comment: I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your patch). This patch is only to show the upper level to which should be sought. I tried to optimize lru_cache(), but got only 15%. I'm afraid that serious optimization is impossible without rewriting lru_cache() on C. 2) avoid using it for regular expressions compiled with re.compile; I do not see how it can significantly affect performance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: Thanks! SipHash looks interesting. It's using a XOR + ROT approach with a seed. And it's written by DJB which is usually a good sign. He writes secure code with good quality. Just his coding style tends to be ... unique. :) I'm going to try the algorithm. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Tim Golden added the comment: Well even in the original [working] version, the scope of this change was limited to glob.glob. os.listdir doesn't currently support any form of expansion (at least not on Windows) and nor does os.makedirs. I don't see any problem in restricting this change -- and any future extensions -- to glob.glob whose purpose is precisely to return one or more files matching a, possibly wildcard, pattern. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Serhiy Storchaka added the comment: I'm talking about glob.glob(), not about os.listdir(). Bakward incompatible features should be off by default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Tim Golden added the comment: Sorry, I misunderstood the point you were making with the os.listdir/makedirs examples. Fair point about backwards compatibility. This may make this change untenable as no-one will want a series of use_feature_xxx flags, one for each change we introduce to glob.glob. Unless we throw in every known expansion / matching right now and have a single use-extended-features flag. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: I modified crypto_auth() a bit: Py_uhash_t crypto_auth(const unsigned char *in, unsigned long long inlen) ... u64 k0 = _Py_HashSecret.prefix; u64 k1 = _Py_HashSecret.suffix; ... return (Py_uhash_t)b; and replaced the loop in _Py_HashBytes() with a call to crypto_auth(). For large strings SipHash is as faster as our current algorithm on my 64bit box. That was to be expected as SipHash works on blocks of 8 bytes while the default algorithm can't be optimized with SIMD instructions. Current hashing algorithm: $ ./python -m timeit -s x = b'a' * int(1E7) hash(x) 100 loops, best of 3: 0.39 usec per loop SipHash: $ ./python -m timeit -s x = b'a' * int(1E7) hash(x) 100 loops, best of 3: 0.381 usec per loop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Giovanni Bajo added the comment: For short strings, you might want to have a look at the way you fetch the final partial word from memory. If the string is = 8 bytes, you can fetch the last partial word as an unaligned memory fetch followed by a shift, instead of using a switch like in the reference code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: We can explore the various optimization options later. Also unaligned memory address is not allowed on some architectures like SPARC. If somebody likes to play with the algorithm: http://hg.python.org/sandbox/cheimes/shortlog/2cb7e97ca8d0 -- hgrepos: +159 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] Allow curly brace expansion
Serhiy Storchaka added the comment: This may make this change untenable as no-one will want a series of use_feature_xxx flags, one for each change we introduce to glob.glob. Unless we throw in every known expansion / matching right now and have a single use-extended-features flag. This is another question. glob.glob(pattern, glob.GLOB_XXX | glob.GLOB_YYY) looks not much shorter than glob.glob(pattern, use_xxx=True, use_yyy=True). And not all features can be configured by only one bit. See os.access() and os.utime() as examples for many options. I hope that before 3.4 feature freeze we can change the interface, if needed. I also believe that this feature may not be regarded as mature without any sort of escaping (which also should be off by default for compatibility). And we need glob.escape() function for escaping arbitrary path. Since it is quite a complicated function, we need more examples in the documentation, which show different corner cases, nesting and interaction with wildcards. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16353] add function to os module for getting path to default shell
Andrew Svetlov added the comment: Confirm it for SL4A Python 3.2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16353] add function to os module for getting path to default shell
Taras Lyapun added the comment: Andrew, do you mean that Christian Heimes last snippet working on Android? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object
Andrew Svetlov added the comment: Reviewed and commented the last patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13669] XATTR_SIZE_MAX and XATTR_LIST_MAX undefined on kfreebsd/debian with eglibc
Pino Toscano added the comment: *_MAX constants are usually defined when the system declares that the maximum limit for that option exist and is already known at compile time. Python should simply not rely on XATTR_LIST_MAX and XATTR_SIZE_MAX being defined, but just grow the buffers as needed until *getxattr / *listxattr succeed or fail with errno != ERANGE; it seems the case already, although the two *_MAX are used as kind of upper bound limit. Instead of using short lists with sizes to try, what about starting from a size (e.g. 128 for getxattr and 256 for listxattr), and grow the buffer by adding the same value each iteration (or doubling the size)? -- nosy: +pino ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16353] add function to os module for getting path to default shell
Andrew Svetlov added the comment: I mean the last available SL4A doesn't have os.confstr Fallback should work, os.environ['PATH'] contains '/system/bin' where 'sh' is living. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Serhiy Storchaka added the comment: $ ./python -m timeit -s x = b'a' * int(1E7) hash(x) Note that hash calculated only once. Add -n 1 option and use a larger data. If somebody likes to play with the algorithm: $ ./python -m timeit -n 1 -s t = 'abcdefgh' * 10**8 hash(t) 1 loops, best of 3: 4.86 sec per loop Current hash algorithm runs 3.43 sec, V8's algorithm runs 2.44 sec. With simple optimization I got 3.62 sec, only 6% slower than the current. #define U8TO64_LE(p) ((u64)((u32 *)(p))[0] | ((u64)((u32 *)(p))[1] 32)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11631] Python 2.7.1 64bit, Win7 64bit problem to read and write with UDP.
Mahmood Hikmet added the comment: I solved the problem - sorry it's taken me so long to reply. I know how frustrating it is when people don't respond with what they found out in the end. Turns out there's no bug as you said and it was based around something I did (as these things usually are). I was passing the packet as a string through redis before sending it which caused it to modify some bytes in there after they passed a certain value. I pickled the messages and it all worked in the end. Sorry about the trouble and thanks for the help! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
Roumen Petrov added the comment: HI, Ambroz Ambroz Bizjak wrote: I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except 2, 4, and 9 (which didn't apply), but it's not working. After it builds the built in modules, it tries to run the parser generator which was cross-compiled. 3.3.0 was split from head long time before release and I did not spend time to check what is actually entered. About patches : 2: restore graminit.* to source directory 4: restore AST to source directory After this touch files to avoid timestamp dependencies to launch extra build . You issue was reported and I guess is documented . It is related to checkout from repository and to general build process. I have a shell script to this but in brief script touch in source tree following files: - Include/graminit.h - Python/graminit.c - Include/Python-ast.h - Python/Python-ast.c - Python/importlib.h If you decide to build in source tree patch 2 and 4 could be skipped . Note that listed patches allow user to keep separate builds at same time for different platforms. As side effect part of patches could help to build with different configuration options. For one time cross-build users could use following scenario: 1) native configuration, build and installation 2) clean source tree 3) cross buildpack for one platform. Repeat 2 3 for each platform about 9: pass all top configure arguments to libffi configure to allow users to build it properly It is save to ignore this patch if libffi build is fine for you host platform. Otherwise just change setup to use only ... config_args = sysconfig.get_config_var(CONFIG_ARGS) ... and replace .join(config_args) with config_args in command. For instance I have build for a platform and with filtered configure arguments build fail. Instead to patch libffi code I prefer from main configure command line to control build of libffi. Roumen -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned
Serhiy Storchaka added the comment: What if just add 0x? -- nosy: +serhiy.storchaka versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned
Serhiy Storchaka added the comment: Ah, for unpacking 32-bit unsigned big-endian bytes you can use len = int.from_bytes(self.read(4), 'big'). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned
Serhiy Storchaka added the comment: Or you can use len = struct.unpack('I', self.read(4)). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16136] Removal of VMS support
Sandeep Mathew added the comment: Hey, I was given access to HP's open source VMS cluster, Many thanks to HP. I should be able to continue python development for VMS. I shall ping you guys in case I get stuck. I should be good to go --Thomas -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11631] Python 2.7.1 64bit, Win7 64bit problem to read and write with UDP.
Christian Heimes added the comment: Thanks for your response! I'm closing the ticket. -- nosy: +christian.heimes resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib/httplib header capitalization
Rui Carmo added the comment: Should one look into the source and make effort to submit a patch, or is this being handled somehow? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Roundup Robot added the comment: New changeset de8cf1ece068 by Victor Stinner in branch 'default': Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCII http://hg.python.org/cpython/rev/de8cf1ece068 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Roundup Robot added the comment: New changeset 0e9fbdda3c92 by Victor Stinner in branch 'default': Issue #16414: Fix support.TESTFN_UNDECODABLE and test_genericpath.test_nonascii_abspath() http://hg.python.org/cpython/rev/0e9fbdda3c92 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Serhiy Storchaka added the comment: Why were you add '- ' suffix to TESTFN_NONASCII? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Serhiy Storchaka added the comment: I don't see U+00A0 and U+20AC in the changeset. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Roundup Robot added the comment: New changeset 55710b8c6670 by Victor Stinner in branch 'default': Issue #16414: Fix typo in support.TESTFN_NONASCII (useless space) http://hg.python.org/cpython/rev/55710b8c6670 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file27912/brute2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Roundup Robot added the comment: New changeset 7f90305d9f23 by Victor Stinner in branch 'default': Issue #16414: Test more characters for support.FS_NONASCII http://hg.python.org/cpython/rev/7f90305d9f23 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned
Alexandre Vassalotti added the comment: pickle.py is the buggy one here. Its use of the marshal module is really a hack. Plus, it is slower than both struct and int.from_bytes. 14:40:57 [~/cpython]$ ./python -m timeit int.from_bytes(b'\xff\xff\xff\xff', 'big') 100 loops, best of 3: 0.209 usec per loop 14:38:03 [~/cpython]$ ./python -m timeit -s import struct struct.unpack('I', b'\xff\xff\xff\xff') 1000 loops, best of 3: 0.147 usec per loop 14:37:44 [~/cpython]$ ./python -m timeit -s import marshal marshal.loads(b'i'+b'\xff\xff\xff\xff') 100 loops, best of 3: 0.236 usec per loop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12848 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2275] urllib/httplib header capitalization
R. David Murray added the comment: It looks like there is a patch, so a patch review would be the next step (as indicated by the stage, not that we always remember to update that...) Reading the issue carefully and making sure that all the concerns are addressed is also required. A comitter will ultimately have to do that, but anyone can do such a review and point out any issues, and that will help get this resolved sooner. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2275 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
New submission from Yury Selivanov: Right now decimal.py defines 'ROUND_DOWN' as 'ROUND_DOWN' (string), whereas C version define it as 1 (integer). While using constant values directly in your code is not a good idea, there is another case where it doesn't work: if you serialize decimal values along with their meta information, such as rounding settings. In this case, when you unserialize data that was serialized with python decimal, those meta-settings won't work for 'c' decimal. -- messages: 175024 nosy: skrah, yselivanov priority: normal severity: normal status: open title: Decimal constants should be the same for py c module versions type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
Roundup Robot added the comment: New changeset fce9e892c65d by Victor Stinner in branch 'default': Issue #16414: Fix test_os on Windows, don't test os.listdir() with undecodable http://hg.python.org/cpython/rev/fce9e892c65d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
STINNER Victor added the comment: Why were you add '- ' suffix to TESTFN_NONASCII? Oops, the space was a mistake. I add - just for the readability of the generated filename. I don't see U+00A0 and U+20AC in the changeset. Oh, I forgot to update the patch with the latest results of brute2.py. It is now fixed. Thanks for the review! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Mark Dickinson added the comment: I think it's already true that pickling a Decimal context on Python 3.2 and unpickling on Python 3.3 doesn't work. Stefan: do I recall that this is a known issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15955] gzip, bz2, lzma: add option to limit output size
Nadeem Vawda added the comment: I suspect that it will be slower than the decompress_into() approach, but as you say, we need to do benchmarks to see for sure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15955 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Stefan Krah added the comment: Pickling changed in 3.3 to make the C and Python versions compatible. So pickled contexts in 3.3 are actually interchangeable. Pickling a list of rounding modes is not compatible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Yury Selivanov added the comment: Well, I don't care about py 3.2 3.3 pickle compatibility in this particular issue. This one is about compatibility of py c decimal modules in 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data
Nadeem Vawda added the comment: These were not idle questions. I wrote the patch, and I had to know what behavior is correct. Ah, sorry. I assumed you were going to submit a separate patch to fix the unconsumed_tail issues. Here's the patch. It fixes potential memory bug (unconsumed_tail sets to NULL in case of out of memory), resets the unconsumed_tail to b'' after EOF, updates unconsumed_tail and unused_data in flush(). Did you perhaps forget to attach the patch? The only ones I see are those that you uploaded last week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Stefan Krah added the comment: So what data structure are you trying to serialize interchangeably? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16414] Add support.NONASCII to test non-ASCII characters
STINNER Victor added the comment: Handling non-ASCII paths is always a pain. I don't plan to backport support.FS_NONASCII to Python 3.3 right now, but I may backport it later. -- resolution: - fixed status: open - closed versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16311] Use _PyUnicodeWriter API in text decoders
Roundup Robot added the comment: New changeset 7ed9993d53b4 by Victor Stinner in branch 'default': Close #16311: Use the _PyUnicodeWriter API in text decoders http://hg.python.org/cpython/rev/7ed9993d53b4 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16311 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Stefan Krah added the comment: I see that you mentioned the use case in your first mail. Yes, that isn't possible right now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16422] Decimal constants should be the same for py c module versions
Yury Selivanov added the comment: Right ;) Is there any chance we can fix that in next 3.3 point release or 3.4? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16422 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench
Richard Oudkerk added the comment: Maybe lru_cache() should have a key argument so you can specify a specialized key function. So you might have def _compile_key(args, kwds, typed): return args @functools.lru_cache(maxsize=500, key=_compile_key) def _compile(pattern, flags): ... -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16389 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: Thanks to Snakebit I was able to tests the code on a 32bit BSD installation with GCC 4.2. The ASCII unicode and bytes performance is about 8% slower, UCS2 unicode is about 37% slower. There might be room for improvements, though. % ./python -m timeit -r20 -n100 -s h = hash; x = 'a' * 10**7 -- h(x) Current: 100 loops, best of 20: 0.109 usec per loop SipHash: 100 loops, best of 20: 0.118 usec per loop % ./python -m timeit -r20 -n100 -s h = hash; x = 'ä' * 10**7 -- h(x) Current: 100 loops, best of 20: 0.119 usec per loop SipHash: 100 loops, best of 20: 0.163 usec per loop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever
Eran Rundstein added the comment: Hello I have attached a patch that includes a (slightly broken) fix and a test case. Note that there is currently an unresolved issue: If the user reads the exact amount of bytes the server sent, read() on the socket will never have a chance to return '' and inform the user about the connection termination. This will also happen if the user reads more data than the server is sending. In that case, again, read() will not get called again so we will never know the socket is gone. One possible way to address this is perform the actual read() calls in a loop, attempting to read the exact amount the user specified. If we do this and the user attempts to read more bytes than the server sent, we will properly detect it. If, however, the user reads the exact length, then we still have a problem. I am not sure what would be the correct way of solving this. -- keywords: +patch Added file: http://bugs.python.org/file27913/httplib-no-content-length-close-sock-fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Christian Heimes added the comment: Serhiy's trick #define U8TO64_LE(p) ((u64)((u32 *)(p))[0] | ((u64)((u32 *)(p))[1] 32)) gives a nice speedup. Now UCS2 is down to 0.133 usec (12% slower than the current algorithm) and ASCII down to 0.105 usec (3% faster). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16423] urllib data URL recipe
New submission from Mathias Panzenböck: I think it would be really helpful if urllib would support data URLs. However, I was told on the python-ideas mailing list that it would probably only added as recipe in the documentation. The attached patch adds such an recipe to the urllib.request documentation. I've never written a doc patch (or any patch) for python before, so I don't know if I added it at the right place in the right format. -- assignee: docs@python components: Documentation files: doc-urllib.request-data-url-recipe.patch hgrepos: 160 keywords: patch messages: 175041 nosy: docs@python, panzi priority: normal severity: normal status: open title: urllib data URL recipe versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file27914/doc-urllib.request-data-url-recipe.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue444582] Finding programs in PATH, adding shutil.which
Changes by Peter Eisentraut pete...@gmx.net: -- nosy: +petere ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue444582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm should use rpmbuild, not rpm
Peter Eisentraut added the comment: I ran into a similar instance of this problem today and would like to add my support for just getting rid of the rpm calls and just call rpmbuild in all cases. The last release where rpm was used for building was more than 10 years ago. -- nosy: +petere ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16423] urllib data URL recipe
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: docs@python - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16423 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16278] os.rename documentation slightly inaccurate
Todd Rovito added the comment: Chris, That is an excellent suggestion. I modified my OSRenameCombinations.py program and attached. This program prints a table with the src parameters as columns and the dst as rows. Hopefully it will show up ok in the bug tracker. For Unix src_file src_directory_emptysrc_directory_not_empty src_file_or_directory_not_exist dst_file_exist rename overwrite raises OSError raises OSError raises OSError dst_not_exist rename rename rename raises OSError dst_directory_emptyraises OSError rename overwrite rename overwrite raises OSError dst_directory_not_emptyraises OSError raises OSError raises OSError raises OSError For Windows src_file src_directory_emptysrc_directory_not_empty src_file_or_directory_not_exist dst_file_exist raises OSError raises OSError raises OSError raises OSError dst_not_exist rename rename rename raises OSError dst_directory_emptyraises OSError raises FileExistsError raises FileExistsError raises OSError dst_directory_not_emptyraises OSError raises OSError raises OSError raises OSError -- Added file: http://bugs.python.org/file27915/OSRenameCombinations.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16424] regression: os.path.split('//hostname/foo/bar.txt')
New submission from anatoly techtonik: Windows. Python 3: import os.path as osp osp.split('//hostname/foo/') ('//hostname/foo/', '') Python 2: osp.split('//hostname/foo/') ('//hostname/foo', '') But Python 3 again: osp.split('//hostname/foo/bar/') ('//hostname/foo/bar', '') -- components: Library (Lib) messages: 175044 nosy: techtonik priority: normal severity: normal status: open title: regression: os.path.split('//hostname/foo/bar.txt') versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data
Serhiy Storchaka added the comment: Sorry. Here is a patch. -- Added file: http://bugs.python.org/file27916/zlib_unused_data_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16424] regression: os.path.split('//hostname/foo/bar.txt')
Serhiy Storchaka added the comment: '//hostname/foo/' is an UNC path. Now splitunc() deprecated and splitdrive() works with an UNC paths. ntpath.splitdrive('//hostname/foo/') ('//hostname/foo', '/') -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16424 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Serhiy Storchaka added the comment: % ./python -m timeit -r20 -n100 -s h = hash; x = 'a' * 10**7 -- h(x) Here is only one hash calculation and 99 cached calls. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14621] Hash function is not randomized properly
Serhiy Storchaka added the comment: I tested different kind of strings. $ ./python -m timeit -n 1 -s t = b'a' * 10**8 hash(t) $ ./python -m timeit -n 1 -s t = 'a' * 10**8 hash(t) $ ./python -m timeit -n 1 -s t = '\u0100' * 10**8 hash(t) $ ./python -m timeit -n 1 -s t = '\U0001' * 10**8 hash(t) current SipHash bytes 181 msec 453 msec 2.5x UCS1 429 msec 453 msec 1.06x UCS2 179 msec 897 msec 5x UCS4 183 msec 1.79 sec 9.8x -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com