[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also criticism in the original discussion: http://mail.python.org/pipermail/python-dev/2009-August/091450.html . -- ___ Python tracker __

[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly
Ray Donnelly added the comment: I also checked the Windows releases and python-config isn't included. However, I don't think there's a good reason for that. python-config would in theory work fine if people wanted to link their programs to Python on Windows, as would python-config.sh given a p

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I quote from Gregory P. Smith (msg91897): """ The decryption provided by the zipfile module is for the worthless 32-bit crc based "encryption" of zipfiles. I think promoting the use of that is a bad idea. zipfile can be used by people to get their data out o

[issue16235] Add python-config.sh for use during cross compilation.

2012-11-04 Thread Ray Donnelly
Ray Donnelly added the comment: I agree in principle about not having to maintain two implementations but I would worry about breaking external packages that depend on the python implementation. In the meantime, please find an updated version of this patch that adds support for --configdir -

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94d15358ad6e by Mark Dickinson in branch '3.2': Issue #16402: In range slicing, fix shadowing of exceptions from __index__ method. http://hg.python.org/cpython/rev/94d15358ad6e New changeset 2b656a2cf7ef by Mark Dickinson in branch '3.3': Issue #16

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- components: +Interpreter Core ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: I also created issue 16403 to update the distutils docs to say that distutils lists the maintainer as the author in PKG-INFO when maintainer is provided. -- ___ Python tracker ___

[issue16403] update distutils docs to say that maintainer replaces author

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: As discussed in issue 16108 and other issues referenced there, distutils lists the maintainer as the author in PKG-INFO when the maintainer is provided. However, the documentation does not state this. This issue is to update the distutils documentation to s

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch. -- keywords: +patch stage: -> patch review type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27879/issue16402.patch ___ Python tracker

[issue16402] range slicing swallows exceptions from __index__ methods.

2012-11-04 Thread Mark Dickinson
New submission from Mark Dickinson: >>> class A(object): ... def __index__(self): raise ZeroDivisionError ... [66062 refs] >>> a = A() [66065 refs] >>> range(10)[0:a] Traceback (most recent call last): File "", line 1, in TypeError: slice indices must be integers or None or have an __inde

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: Previous issues like this include issue 962772 (from 5/2004) and issue 3686 (from 8/2008). Copying the nosy lists from those issues. This issue affects me also because I maintain a project that I did not author. However, PyPI lists me as the author because o

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: compute_slice_indices() and slice_indices() looks as partially duplicates. I think the similar code should be merged and reused. -- ___ Python tracker _

[issue16183] ZipExtFile object close without file handle closed

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: -Windows ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue13424] Add examples for open’s new opener argument

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it be clearer? >>> import os >>> dir_fd = os.open('somedir', os.O_RDONLY) >>> def opener(path, flags): ... return os.open(path, flags, dir_fd=dir_fd) ... >>> with open('spamspam.txt', 'w', opener=opener) as f:

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: New patch that fixes the error message for badly typed slice arguments. Also tweaks a couple of other details: - replace Py_GE with Py_GT, Py_LE with Py_LT in the out-of-range comparisons, as suggested by Serhiy; this also makes it more closely match the Pyt

[issue5765] stack overflow evaluating eval("()" * 30000)

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Autogenerated code could easily hit the 1000 term limit - if anything, > I'd be inclined to set it *higher* than 4 rather than lower, as > breaking previously working code in a maintenance release is a bad > thing, regardless of our opinion of the sanity of tha

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm: one more thing that needs to be fixed before this can be committed---the error messages for maltyped start, stop and step are less informative than they used to be. Before the patch: >>> slice(0, 2.3, 4).indices(5) Traceback (most recent call la

[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: PEP 345 can also be linked to (Metadata version 1.2). -- ___ Python tracker ___ ___ Python-bugs-list

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Look at compute_slice_indices() in Objects/rangeobject.c. -- ___ Python tracker ___ ___ Python-bug

[issue16401] mention PKG-INFO in the documentation

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: Currently, the documentation makes no mention of the PKG-INFO file. It would be useful if the documentation mentioned what this file is and how it is created (e.g. via the sdist command), and also linked to PEP 314. This can be covered somewhere in the dist

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which reverts 3.1 implementation (and adds some optimization). Microbenchmark: $ ./python -m timeit -s "import re" "re._compile('', 0)" Results: 3.1: 1.45 usec per loop 3.2: 4.45 usec per loop 3.3: 9.91 usec per loop 3.4patched: 0.89 usec per

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: > Now benchmarks and special casing for Py_ssize_t values needed. I thought about that, but I don't think it's worth it. I did some quick timings, and as expected the new version of slice.indices is somewhat slower than the original. But I think adding a spe

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch looks good to me. Now benchmarks and special casing for Py_ssize_t values needed. -- ___ Python tracker ___ __

[issue16400] update default PyPI behavior in docs re: listing versions

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: There is a mismatch between what PyPI and the docs say regarding listing versions of packages on PyPI. The current docs say, "By default PyPI will list all versions of a given package." (from http://docs.python.org/3.4/distutils/packageindex.html ) However

[issue14794] slice.indices raises OverflowError

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I don't understand what you mean---can you elaborate? The Python implementation of this method only 40 lines length, including blank lines, docstring and comments. The C implementation requires over 160 lines and less clear. Are there ways to use in Pyth

[issue13266] Add inspect.unwrap(f) to easily unravel "__wrapped__" chains

2012-11-04 Thread Daniel Urban
Daniel Urban added the comment: I've attached a patch addressing the comments on Rietveld. I've added another modification: inspect.signature uses inspect.unwrap. (It already tried to unwrap the function, but it wasn't protected from infinite recursion. I don't know if this worth fixing in 3.3

[issue5765] stack overflow evaluating eval("()" * 30000)

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: We want to minimise the risk of breaking working code. Making it easy to adjust this recursion limit separately from the main recursion limit by using a scaling factor is a good way to do that. It shouldn't increase the maintenance burden in any significant way,

[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Stefan Behnel
Stefan Behnel added the comment: The problem is a) that the module does not necessarily know to which place it eventually gets installed (Cython relies on the distutils Extension not lying to it, for example, which people do from time to time), and b) that the call to Py_InitModule() only rece

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate superseder: -> stack overflow evaluating eval("()" * 3) ___ Python tracker ___ ___

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't it a duplicate of issue5765? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bu

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: One caveat on this idea: it may not be possible to use the standard recursion limiting functions here, since the Python level recursion limit is generally set quite low (1000 by default on my Fedora system). While this crash *is* a design flaw in our compiler im

[issue11383] compilation seg faults on insanely large expressions

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: I've started looking into what would be needed to fix this. The basic problem is that the compilation process involves many recursive operations, but doesn't contain *any* calls to the recursion control functions (http://docs.python.org/3/c-api/exceptions.html#r

[issue12634] Random Remarks in class documentation

2012-11-04 Thread Yongzhi Pan
Changes by Yongzhi Pan : -- nosy: +fossilet ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11842] slice.indices with negative step and default stop

2012-11-04 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed. Closing. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Pytho

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2012-11-04 Thread Fergus Noble
Fergus Noble added the comment: GPS time doesn't include leap seconds so I think datetime is a good representation. If datetime doesn't know about leap seconds then there would still be some issues with finding the timedelta between a GPS time and a UTC time straddling a leap second but I gues

<    1   2