[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-04 Thread anatoly techtonik
anatoly techtonik added the comment: I strongly disagree with your summary. It's a new behavior for the old renamed module that clearly breaks existing code ported with 2to3. The 95% of callable usage is to get the estimated download progress (to draw progress bar or time calculations). This

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Such test is not enough. 1. It skipped on locales which does not support "£" (cp1006, cp1250, cp1251, cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr, iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Well. Fix (and test) is related to bug in python itself (./Python/pythonrun.c) pylauncher should be tested also, you are right. -- ___ Python tracker _

[issue15641] Clean up importlib for Python 3.4

2012-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Taras. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement ___ Python tracker _

[issue15641] Clean up importlib for Python 3.4

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 48228fb874c1 by Andrew Svetlov in branch 'default': Issue #15641: Clean up deprecated classes from importlib http://hg.python.org/cpython/rev/48228fb874c1 -- nosy: +python-dev ___ Python tracker

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: How does the test which has been committed even test the Python launcher? It only calls assert_python_ok(), which should use the regular Python interpreter. -- nosy: +pitrou ___ Python tracker

[issue1490929] urllib.retrieve's reporthook called with non-helpful value

2012-11-04 Thread akira
akira added the comment: Related issue 16409 -- nosy: +akira ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10050] urllib.request still has old 2.x urllib primitives

2012-11-04 Thread akira
akira added the comment: Related issue 16409 -- nosy: +akira ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-04 Thread akira
akira added the comment: Summary: It is a new behavior. There is no need to change either code or docs. Though docs could be clarified to be more explicit. The behavior has been introduced only in 3.3 in revision 53715804dc71 [1] from issue 10050 [2] It knownly breaks backward-com

[issue13837] test_shutil fails with symlinks enabled under Windows

2012-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue16412] test_shutil: 2 failures related to symlinks

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Duplicate of #13837. -- resolution: -> duplicate status: open -> closed superseder: -> test_shutil fails with symlinks enabled under Windows ___ Python tracker __

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Whether or not we start sending both pieces of data, can PyPI perhaps be > updated to display "Contact" instead of "Author" when Metadata-Version 1.1 is > used? I filed an issue on PyPI's issue tracker for this suggestion here: https://sourceforge.net/track

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56df0d4f0011 by Andrew Svetlov in branch 'default': Issue #16218: Fix test for issue again http://hg.python.org/cpython/rev/56df0d4f0011 -- ___ Python tracker

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: I like the last patch from Victor. It works on Windows also. -- ___ Python tracker ___ ___ Python-bu

[issue14965] super() and property inheritance behavior

2012-11-04 Thread 猫 黒
猫 黒 added the comment: I'm not a python dev, but would you say super(self.__class__, self.__class__).x.fset(self, value) is more readable than super().x = value -- ___ Python tracker

[issue16278] os.rename documentation slightly inaccurate

2012-11-04 Thread Chris Jerdonek
Chris Jerdonek added the comment: > Attached is a patch for 16 test cases. The test cases look quite verbose (e.g. they're not DRY), but it's a good start. Thanks. For others' benefit, can you perhaps summarize your findings concisely in a table/chart of some form? -- _

[issue16278] os.rename documentation slightly inaccurate

2012-11-04 Thread Todd Rovito
Todd Rovito added the comment: Attached is a patch for 16 test cases. All 16 test cases have been tested on Windows 7, Mac OS X, and Linux they seem to function well. Before this patch there was only a single test case for rename. For each test case I used "unittest.skipUnless" to make sure

[issue15955] gzip, bz2, lzma: add option to limit output size

2012-11-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: I agree that being able to limit output size is useful and desirable, but I'm not keen on copying the max_length/unconsumed_tail approach used by zlib's decompressor class. It feels awkward to use, and it complicates the implementation of the existing decompress()

[issue15165] test_email: failure on Windows

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: This issue is not related to the email module, but it is a Windows limitation: datetime.datetime(1970, 1, 1).timestamp() raises a same OverflowError. -- ___ Python tracker ___

[issue15165] test_email: failure on Windows

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 367e376e5ba2 by Victor Stinner in branch '3.3': Close #15165: Fix test_email on Windows 64 bits http://hg.python.org/cpython/rev/367e376e5ba2 New changeset 651e8613e579 by Victor Stinner in branch 'default': (Merge 3.3) Close #15165: Fix test_email

[issue16412] test_shutil: 2 failures related to symlinks

2012-11-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +loewis, pitrou, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16412] test_shutil: 2 failures related to symlinks

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: I ran test_shutil on Windows 7 with NTFS. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue16412] test_shutil: 2 failures related to symlinks

2012-11-04 Thread STINNER Victor
New submission from STINNER Victor: == FAIL: test_copymode_follow_symlinks (test.test_shutil.TestShutil) -- Traceback (most recent call last): File "C:\victor\

[issue15581] curses: segfault in addstr()

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: > I can't offer a minimal program to reproduce this bug, but I did find a way > to reproduce it in the python program "ranger" Sorry, but without a smaller example program, I cannot help you on this issue. Please try to write a smaller program to reproduce the

[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: > flush() does not update unconsumed_tail and unused_data. > > >>> import zlib > >>> x = zlib.compress(b'abcdefghijklmnopqrstuvwxyz') + b'0123456789' > >>> dco = zlib.decompressobj() > >>> dco.decompress(x, 1) > b'a' > >>> dco.flush() > b'bcdefghijklmnopqrstuvwxyz'

[issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it

2012-11-04 Thread Nadeem Vawda
New submission from Nadeem Vawda: When calling zlib.Decompress.decompress() with a max_length argument, if the input data is not full consumed, the next_in pointer in the z_stream struct are left pointing into the data object, but the decompressor does not hold a reference to this object. This sa

[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 11ea4eb79e9d by Victor Stinner in branch 'default': Issue #15478: Fix test_pep277 on Windows http://hg.python.org/cpython/rev/11ea4eb79e9d -- ___ Python tracker __

[issue16407] Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support

2012-11-04 Thread Ned Deily
Ned Deily added the comment: Thanks for your report. Without more details on exactly what errors you are seeing and exactly what configure options the Homebrew recipe is using and exactly which compiler you are using, it is not possible to be 100% certain what you are experiencing. Furthermor

[issue15478] UnicodeDecodeError on OSError on Windows with undecodable (bytes) filename

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 817a90752470 by Victor Stinner in branch 'default': Issue #15478: Oops, fix regression in os.open() on Windows http://hg.python.org/cpython/rev/817a90752470 -- ___ Python tracker

[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: Fixed. Thanks for the patch! > This hacking is not needed, if first argument of PyBytes_FromStringAndSize() > is NULL, the contents of the bytes object are uninitialized. Oh, cool. I didn't know about that. > What should unconsumed_tail be equal after EOF? b''

[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c54def5947c by Nadeem Vawda in branch '2.7': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/1c54def5947c -- _

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function can fail. -- ___ Python tracker ___ _

[issue15276] unicode format does not really work in Python 2.x

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: "If we don't fix this (I'm leaning that way myself), I think we should somehow document the limitation. There are ways to acknowledge the limitation without getting into the specifics of this particular issue." I agree to documentation the limitation and clos

[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset be882735e0b6 by Nadeem Vawda in branch '3.2': Issue #16350: Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF. http://hg.python.org/cpython/rev/be882735e0b6 New changeset 4182119c3f0a by Nadeem Vawda in bra

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: I propose a test with a single non-ASCII character, which should be supported by more code pages/locale encodings. It checks also the value of __file__. I only ran the test on Linux with UTF-8 locale encoding. -- Added file: http://bugs.python.org/file

[issue4965] Can doc index of html version be separately scrollable?

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch makes the sidebar fixed and adds a scrollbar to scroll it separately when it's longer than the page. To test the patch without rebuilding all the Docs you can do something like: hg import --no-c cp Doc/tools/sphinxext/static/basic.css Doc/buil

[issue5141] C API for appending to arrays

2012-11-04 Thread Bradley Froehle
Changes by Bradley Froehle : -- nosy: +bfroehle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: > @unittest.skipIf(sys.platform.startswith('freebsd') and > sys.getfilesystemencoding() == 'ascii', > 'skip on FreeBSD with ASCII filesystem encoding') Such skip is not a good idea. Many OS uses the Latin1 encoding when the C l

[issue16218] Python launcher does not support unicode characters

2012-11-04 Thread STINNER Victor
STINNER Victor added the comment: test_cmd_line_script.test_non_utf8() is failing on Mac OS X since the changeset 95d1adf144ee. == FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest)

[issue16410] rewrite winsound with ctypes

2012-11-04 Thread Martin v . Löwis
Martin v. Löwis added the comment: ctypes is not an acceptable implementation strategy for modules in the standard library. No need to reimplement it. -- nosy: +loewis resolution: -> wont fix status: open -> closed ___ Python tracker

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 96f4cee8ea5e by Victor Stinner in branch '3.3': Issue #8271: Fix compilation on Windows http://hg.python.org/cpython/rev/96f4cee8ea5e New changeset 6f44f33460cd by Victor Stinner in branch 'default': (Merge 3.3) Issue #8271: Fix compilation on Windo

[issue13740] winsound.SND_NOWAIT ignored on modern Windows platforms

2012-11-04 Thread anatoly techtonik
Changes by anatoly techtonik : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue16410] rewrite winsound with ctypes

2012-11-04 Thread anatoly techtonik
New submission from anatoly techtonik: http://hg.python.org/cpython/file/tip/PC/winsound.c No need to maintain this in C. It doesn't seem like a critical part of code. Will there be significant performance penalty? -- components: Library (Lib), ctypes messages: 174838 nosy: techtonik p

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom
Eric Busboom added the comment: I've tried just closing the ZipExtFile created in testzip, but that didn't actually close the file. It looks like ZipExtClose.close() also doesn't close the file descriptor, at least when the ZipFile is constructed on a filename. This code worked (Addition of f.

[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-04 Thread anatoly techtonik
New submission from anatoly techtonik: Renamed urllib.urlretrieve changed behaviour in Py3k, which leads to ZeroDivisionErrors in applications that use block_size parameter for calculations. Previously, block size was constant. Now it varies making it impossible to exactly calculate value tran

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9481e062fe26 by Ezio Melotti in branch '2.7': #5057: the peepholer no longer optimizes subscription on unicode literals (e.g. u"foo"[0]) in order to produce compatible pyc files between narrow and wide builds. http://hg.python.org/cpython/rev/9481e

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch type: behavior -> resource usage versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree. In 2.7 UTF-8 codec still broken in corner cases (it accepts surrogates) and 3.2 is coming to an end of maintaining. In any case it is only recomendation, not demands. -- ___ Python tracker

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue5057-3.diff LGTM. I added debug output in peepholer, ran tests and found that this optimization happened for unicode strings only in test_multibytecodec (where it used deliberately) and test_peepholer. Seems as this is very rare case. -- nosy:

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for updating the patch! I committed it on 3.3 too, and while this could have gone on 2.7/3.2 too IMHO, it's to much work to port it there and not worth it. -- status: open -> closed versions: +Python 3.3

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5962f192a483 by Ezio Melotti in branch '3.3': #8271: the utf-8 decoder now outputs the correct number of U+FFFD characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti. ht

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

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: test needed -> patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Pytho

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: The current situation is now that the decryption is part of Python. It is well known to be computationally intensive and should therefore be implemented in C. This patch provides that support. The discussion if Python should support the decryption is behind u

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-04 Thread Eric Busboom
New submission from Eric Busboom: The zipfile.testzip() method will open each of the files in a zip archive, but does not close the files, resulting in a file descriptor leak. -- components: Library (Lib) messages: 174829 nosy: Eric.Busboom priority: normal severity: normal status: open

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about commit? All Ezio's tests passsed, microbenchmark shows less than 10% differences: vanilla patched MB/s MB/s 2076 (-3%) 2007 decode utf-8 'A'*1 414 (-0%)413decode utf-8 '\x80'*1 1283 (-1%) 1275 decode utf-

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Pytho

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26116/issue8271-3.3-fast-2.patch ___ Python tracker ___ ___ Python-bugs-

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file25709/issue8271-3.3.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue16407] Python 2.7.3: test_sys fails when building under 10.7.5 with dtrace support

2012-11-04 Thread yrammos
New submission from yrammos: I am building Python 2.7.3 using Homebrew as follows: > brew install --with-dtrace --quicktest python The failing tests are: test_ctypes test_sys Omitting --with-dtrace reduces the failures to one test: test_ctypes @samueljohn from github suggeste

[issue6478] time.tzset does not reset _strptime's locale time cache

2012-11-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue6478_v2.patch looks good to me. There is a long line in _strptime.py which I will fix before committing. -- stage: test needed -> commit review versions: -Python 3.2 ___ Python tracker

[issue16406] move the "Uploading Packages" section to distutils/packageindex.rst

2012-11-04 Thread Chris Jerdonek
New submission from Chris Jerdonek: I think the Package Index (PyPI) documentation would be clearer if the section called "Uploading Packages to the Package Index": http://docs.python.org/3.4/distutils/uploading.html were made a part of the previous section about PyPI (now called "Registering

[issue6478] time.tzset does not reset _strptime's locale time cache

2012-11-04 Thread Berker Peksag
Berker Peksag added the comment: Alexander: Did you have a chance to review the test? -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray
R. David Murray added the comment: > If the encryption is so horrible why is there any support (with bad > performance) at all in Python? I would say it there so that people can use python to "decrypt" an "encrypted" zip archive they have been sent that was generated by some other tool. I wou

[issue15276] unicode format does not really work in Python 2.x

2012-11-04 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: -berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue16163] Wrong name in Lib/pkgutil.py:iter_importers

2012-11-04 Thread Berker Peksag
Berker Peksag added the comment: > I don't think it's necessary to check for UnboundLocalError/NameError > in the tests. Thanks for the review. Attached a new patch. -- Added file: http://bugs.python.org/file27885/pkgutil-name-with-test_v3.diff ___

[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: You should use assertRaises/assertRaisesRegex to check the error message and add more tests to cover all the changes. I also noticed an inconsistence between 'element not in container' and 'element is not in container' (note the extra 'is'). FWIW I prefer the

[issue13968] Support recursive globs

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue13349] Non-informative error message in index() and remove() functions

2012-11-04 Thread Sean Ochoa
Sean Ochoa added the comment: Ready for review. -- keywords: +patch Added file: http://bugs.python.org/file27884/issue-13349.patch ___ Python tracker ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> needs patch versions: +Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > At the moment, this is only implemented for POSIX, as I don't feel like I > know enough about Windows to tackle drive letters and UNC in paths without > spending some more time on it. Just use splitdrive() and first ensure that all drivespecs are same, the

[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue15989. -- assignee: -> docs@python components: +Documentation, Extension Modules, Interpreter Core nosy: +docs@python, mark.dickinson, serhiy.storchaka stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3

[issue10395] new os.path function to extract common prefix based on path components

2012-11-04 Thread Rafik Draoui
Rafik Draoui added the comment: Here is a patch with an implementation of os.path.commonpath, along with tests and documentation. At the moment, this is only implemented for POSIX, as I don't feel like I know enough about Windows to tackle drive letters and UNC in paths without spending some m

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which optimize (speed up 2x) Python implementation of ZIP decryptor. It is almost the maximum of what can be achieved without significant degradation of maintainability. Of course, 2x is less then 100x, but it more portable and costs almost

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not against your proposal. If the goal is to explain how to get rid of trailing whitespace then the other solutions should be mentioned too (I think made patchcheck already is). If the goal is to show how to set up local hooks and where to get them, then t

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Sure, but both of those can fail (forgetting to run make patchcheck, using a different editor from your normal one for some reason) Once the commit hook is set up properly, you get alerted to the problem as soon as you try to commit, rather than having to untang

[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2012-11-04 Thread Christian Heimes
Christian Heimes added the comment: I'm all with Antoine's suggestion. readprofile() should not be executed when sys.flags.ignore_environment is set. -- ___ Python tracker ___ _

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Ezio Melotti
Ezio Melotti added the comment: Configuring the editor to remove trailing whitespace, and using make patchcheck are other valid solutions to this problem. -- ___ Python tracker

[issue16392] import crashes on circular imports in ext modules

2012-11-04 Thread Brett Cannon
Brett Cannon added the comment: It sounds like Cython has its fix and CPython knows what should eventually be changed in Python 4 to bring extension module initialization closer to how Python module code is initialized. Maybe we should add a warning in some documentation somewhere about this a

[issue16405] Explain how to set up the whitespace commit hook locally

2012-11-04 Thread Nick Coghlan
New submission from Nick Coghlan: Setting up the same commit checks locally that the main repo enforces for incoming patch sets can save a great deal of frustration with the server rejecting "hg push" for changes (this can be especially frustrating if you have already merged changes across bra

[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-04 Thread Ned Batchelder
New submission from Ned Batchelder: Examining the CPython sources, there are a number of places where PyLong_FromLong is used without checking its return value. In places where it is done correctly, PyErr_Occurred is often used to avoid having to check every call. Here are places where it isn

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

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine: The scaling is deliberate higher in the recursion limit finder because we just want to ensure it hits the recursion limit (or blows the stack, if the scaling is wrong). In the tests, I cut it finer because I wanted to ensure we were straddling the allow

[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The patch is probably trivial - however I would still like some > verification. > Would it be correct to call self.close() when fp.read returns ''? In > case self.length is not present, I don't see a way around this anyway. > When it is present, and fp.read ret

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If the encryption is so horrible why is there any support (with bad > performance) at all in Python? > It would be better to remove it altogether. We don't remove it as it would break existing programs which rely on this feature. However adding a bunch of C co

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

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The sanity check in the recursion limit finding script is definitely a > good idea, so I added that (as the commits show). Didn't you make a mistake in the recursion factor there? Or is it really 10 rather than 3? -- _

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

2012-11-04 Thread Mark Shannon
Mark Shannon added the comment: I don't think there is any need for a scaling factor. Expressions in auto-generated trees will tend to be trees of binary operator rather lists of purely unary operators. A tree of a billion items only has a depth of ~30. There is no way an expression tree >1000

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. This prevents users from building software using this feature only to find out later how bad the performance is. (Thi

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

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: The sanity check in the recursion limit finding script is definitely a good idea, so I added that (as the commits show). For the record, running that script on the 3.3 branch with my 4 GB RAM Fedora 17 ASUS Zenbook finds a maximum recursion limit around 16800, a

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

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf2515d0328b by Nick Coghlan in branch '3.3': Issue #5765: Also check the compiler when finding the recursion limit http://hg.python.org/cpython/rev/cf2515d0328b New changeset 3712028a0c34 by Nick Coghlan in branch 'default': Issue #5765: Merge from

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

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: Note: if you do take the scaling factor out, don't forget to track down the reasons behind the original commit that added the test that broke *without* the scaling factor. For me, "the test suite fails without it" is reason enough for me to say its needed - som

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

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > You can take the scaling factor out if you really want, but it adds no > real maintenance overhead, and better reflects the real stack usage. Can you also add a related snippet in Tools/scripts/find_recursionlimit.py ? --

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

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: However, agreed on the won't fix for 3.2 and 2.7, although I'd consider it at least for 2.7 if someone went through and worked out a patch that applies cleanly. For 3.2, this really isn't the kind of thing we'd want to do in the final regular maintenance releas

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

2012-11-04 Thread Nick Coghlan
Nick Coghlan added the comment: You can take the scaling factor out if you really want, but it adds no real maintenance overhead, and better reflects the real stack usage. -- ___ Python tracker

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

2012-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset ab02cd145f56 by Nick Coghlan in branch '3.3': Issue #5765: Apply a hard recursion limit in the compiler http://hg.python.org/cpython/rev/ab02cd145f56 New changeset bd1db93d76e1 by Nick Coghlan in branch 'default': Issue #5765: Merge from 3.3 http://

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Christian Heimes
Christian Heimes added the comment: >From the zlib FAQ: 38. How can I encrypt/decrypt zip files with zlib? zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, use GnuPG, http://www.gn

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray
R. David Murray added the comment: We aren't particularly interested in helping people make their files slightly harder to reverse engineer, either, so I don't think that is a good enough reason for accepting this. There might be other reasons that are good enough, but I don't think that is o

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: My use case is decrypting files of 100's of megabytes. This is so slow that it is quite useless. About an hour or so. I do agree that the encryption is worthless, but that is not important for my use case where I want to discourage people from reverse enginee

[issue16108] Include maintainer information in register/upload

2012-11-04 Thread Stefan Krah
Stefan Krah added the comment: "Would that result in displaying both author and maintainer info on the PyPI page? For what cases is it useful?" It gives due credit to the original author if another person maintains the package. I think it's a matter of common courtesy not to suppress author in

  1   2   >