[issue14035] behavior of test.support.import_fresh_module

2012-02-17 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: Removed file: http://bugs.python.org/file24537/issue14035_fresh_modules.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14035 ___

[issue14035] behavior of test.support.import_fresh_module

2012-02-17 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: I have updated the patch to a simpler form where I copy() sys.modules. Strangely, I do not detect any refleak running the tests. I plan to commit this fix, if we don't have leaks in the test suite. -- resolution: - duplicate

[issue14025] unittest.TestCase.assertEqual does not show diff when comparing str with unicode

2012-02-17 Thread Jaap Karssenberg
Jaap Karssenberg jaap.karssenb...@gmail.com added the comment: On Fri, Feb 17, 2012 at 1:23 AM, Ezio Melotti rep...@bugs.python.orgwrote: Ezio Melotti ezio.melo...@gmail.com added the comment: If you really want the diff you could use assertMultiLineEqual, but even on Python 2 you

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I'm getting a failure building on Mac OS X Leopard (10.5.8) relating to ECDH: /Users/vinay/projects/pythonv/Modules/_ssl.c: In function PyInit__ssl: /Users/vinay/projects/pythonv/Modules/_ssl.c:2545: error: SSL_OP_SINGLE_ECDH_USE

[issue11689] sqlite: Incorrect unit test fails to detect failure

2012-02-17 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: In python 3, declaring the action nonlocal inside the progress function would be more clever :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11689

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm getting a failure building on Mac OS X Leopard (10.5.8) relating to ECDH: Thanks for reporting. It should be fixed in c1a07c8092f7. Can you try? -- ___ Python tracker rep...@bugs.python.org

[issue12655] Expose sched.h functions

2012-02-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12655 ___ ___

[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-17 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: TODO: - the conversion from Decimal to _PyTime_t does still use a cast to float and so lose precision - the PEP must be accepted :-) -- ___ Python tracker rep...@bugs.python.org

[issue14035] behavior of test.support.import_fresh_module

2012-02-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: In the case of *dependencies* that get refreshed, no they're *not* kept in sys.modules - they get overwritten by the originals when the sys.modules state gets restored. The problem almost certainly arises because something, somewhere is doing

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Can you try? That error goes away, but there are others. Sorry, I missed them in amongst the warnings, or I would have posted all of them. Here's the complete console output for the _ssl extension: building '_ssl' extension gcc

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That error goes away, but there are others. Sorry, I missed them in amongst the warnings, or I would have posted all of them. Here's the complete console output for the _ssl extension: Uh, what is the OpenSSL version there? Can you try to find

[issue12627] Implement PEP 394: The python Command on Unix-Like Systems

2012-02-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: No automatic link, since I neglected to mention the issue number in the checkin messages: 2.7: http://hg.python.org/cpython/rev/a65a71aa9436 3.3: http://hg.python.org/cpython/rev/dc721f28f168 I deliberately *didn't* make the change in 3.2. As

[issue14040] Deprecate some of the module file formats

2012-02-17 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Stating module files of the form xxxmodule.so consumes all 1/3 of stat calls at startup. Looking at the site-packages folders on my machine, both for 2.7 and 3.2, reveals no C extension that follows such naming. This patch deprecates such

[issue14040] Deprecate some of the module file formats

2012-02-17 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___

[issue14036] urlparse insufficient port property validation

2012-02-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Could you provide some failing examples? The suggestion also seems to run slightly at odds with itself - in one part, silently replacing an invalid port specification with a different value, in another adding additional validation checks.

[issue14040] Deprecate some of the module file formats

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Patch looks fine, although there aren't any tests. At least for importlib you can simply use a finder test for extension modules to verify the warning is triggered. That way you can create an empty module with the expected naming rather than

[issue13977] importlib simplification

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: So I simply swapped out the code and the tests fail. Then I realized why: while the assumption is right, that does not mean that that name passed to __import__() isn't relative and thus shifts what need to be returned (the else clause case).

[issue13961] Have importlib use os.replace()

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset de6703671386 by Brett Cannon in branch 'default': Have importlib use os.replace() for atomic renaming. http://hg.python.org/cpython/rev/de6703671386 -- nosy: +python-dev

[issue13961] Have importlib use os.replace()

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Thanks for the patch, Charles-François! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14040] Deprecate some of the module file formats

2012-02-17 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Feb 17, 2012, at 01:36 PM, Antoine Pitrou wrote: Stating module files of the form xxxmodule.so consumes all 1/3 of stat calls at startup. Looking at the site-packages folders on my machine, both for 2.7 and 3.2, reveals no C extension that

[issue14040] Deprecate some of the module file formats

2012-02-17 Thread Ralf Schmitt
Changes by Ralf Schmitt python-b...@systemexit.de: -- nosy: +schmir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list

[issue14041] bsddb DB_RUNRECOVERY crash on write access

2012-02-17 Thread totycro
New submission from totycro ma...@gmx.at: The attached file data.db should be a valid bsddb file, still i get this crash on write: File /usr/lib64/python2.7/bsddb/__init__.py, line 280, in wrapF self.db[key] = value DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database

[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

2012-02-17 Thread László Attila Tóth
László Attila Tóth laszlo.attila.t...@gmail.com added the comment: I added unit test, which revealed some bugs. These are fixe now. The attached file contains both the unit tests and the updated patch. -- Added file: http://bugs.python.org/file24546/argparse-disable_interspersed.patch

[issue14033] distutils problem with setup.py build setup.py install vs direct setup.py install

2012-02-17 Thread 勇刚 罗
勇刚 罗 luoyongg...@gmail.com added the comment: It's my fault, I need to fetch those dlls into source code directory first. Sorry. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14033

[issue13991] namespace packages depending on order

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: It's not working because when you import a.b you calculate __path__ at import time, so when you modify sys.path it won't make a difference since import will look at a.__path__ after your a.b import and simply ignore sys.path. But when you put

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It looks like it's OpenSSL 0.9.7. It's an old machine which I can't change things on - it's got MacPorts OpenSSL which is 1.0.0g, and I thought it was using that. On closer investigation, the version in /usr/include (0.9.7l) is actually

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Oh - and, ECDH is not matched by any file in that OpenSSL include directory/hierarchy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627

[issue14009] Clearer documentation for cElementTree

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If you want to collect additional feedback, you may want to add some other people to the Nosy list :-) I did not want more feedback, I wanted to leave time for interested parties to find this bug for themselves and eventually comment :) One

[issue14042] json.dumps() documentation is slightly incorrect.

2012-02-17 Thread Tom Christie
New submission from Tom Christie t...@tomchristie.com: json.dumps() documentation is slightly incorrect. http://docs.python.org/library/json.html#json.dumps Reads: If ensure_ascii is False, then the return value will be a unicode instance. Should read: If ensure_ascii is False, then the

[issue14041] bsddb DB_RUNRECOVERY crash on write access

2012-02-17 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: The file is corrupted: jcea@ubuntu:/tmp/z$ /usr/local/BerkeleyDB.5.3/bin/db_verify data.db db_verify: BDB0551 Page 0: nonsensical free list pgno 55 db_verify: BDB1107 Page 2: offpage item 19 has bad pgno 70 db_verify: BDB1107 Page 20: offpage

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It seems that the method signature for _check_script has to be changed in include another parameter for expected_argv1, expected_argv2, It would seem simpler to me to make that expected_argv. -- ___

[issue14033] distutils problem with setup.py build setup.py install vs direct setup.py install

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: No problem :) In the future, please follow two guidelines for reporting distutils bugs: - test your code with distutils, without setuptools - state clearly in the message what is the problem Thanks! -- assignee: tarek - eric.araujo

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It seems that the method signature for _check_script has to be changed in include another parameter for expected_argv1, expected_argv2, It would seem simpler to me to make that expected_argv :) --

[issue14032] test_cmd_line_script prints undefined 'data' variable

2012-02-17 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14032 ___ ___ Python-bugs-list mailing

[issue14020] Improve HTMLParser doc

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It’s all in the Documenting Python doc. .. class:: HTMLParser() Blah blah. .. method:: feed(data) Do X and Y. The following attributes are supported: .. attribute:: pos etc. --

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-17 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg153560 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___

[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I don’t see benefits in removing cET. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13988 ___

[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: With SQLite versions before 3.6.5, :attr:`rowcount` is set to 0 if you make a ``DELETE FROM table`` without any condition. Is there a fixed version of SQLite used by each Python version? If yes, then I think it could be more useful to talk

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This patch makes importlib's _FileFinder more than 10x faster by keeping a cache of directory entries. It's actually faster than imp.find_module()! - imp.find_module: $ ./python -m timeit -s import imp imp.find_module('logging', None) 1

[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: This was changed by Florent for #8205 (“Remove the Modules directory from sys.path when Python is running from the build directory (POSIX only)”). -- nosy: +eric.araujo, flox ___ Python tracker

[issue14020] Improve HTMLParser doc

2012-02-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Yes, but there's a section with the example in the middle now, so that doesn't work. I was thinking about a way to tell sphinx these are methods of the Foo class, without having them directly indented under the 'class' directive.

[issue14030] Be more careful about selecting the compiler in distutils

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Could you explain more about what the bug is? -- assignee: - eric.araujo components: +Distutils nosy: +Arfrever, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14030

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file24547/find_module_cache.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file24548/find_module_cache.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___

[issue14034] the example in argparse doc is too complex

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I really don’t think there was any willingness to “show off”, and wouldn’t be surprised if the doc was written optparse users. It’s just an accident of history, and we can try to make it better instead of calling people names :) Do you have a

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Also, if it's OK for the Elliptic Curve code to be optional in builds, the failure to import OP_SINGLE_ECDH_USE into ssl.py from _ssl should not cause import ssl to fail. -- ___ Python tracker

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Note that the cost of filling the cache itself isn't trivial: $ ./python -m timeit -s import sys; from importlib import _bootstrap _bootstrap._file_path_hook('Lib')._fill_cache() 1000 loops, best of 3: 1.88 msec per loop --

[issue13974] packaging: test for set_platform()

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b380d715651d by Éric Araujo in branch 'default': Add test for packaging.util.set_platform (#13974). http://hg.python.org/cpython/rev/b380d715651d -- nosy: +python-dev ___

[issue14038] Packaging test support code raises exception

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 697e934ade19 by Éric Araujo in branch 'default': Fix code I unwittingly broke in b0e2d6592a1f (#14038) http://hg.python.org/cpython/rev/697e934ade19 -- nosy: +python-dev

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Updated patch with faster cache filling. -- Added file: http://bugs.python.org/file24549/find_module_cache2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043

[issue812369] module shutdown procedure based on GC

2012-02-17 Thread Armin Rigo
Armin Rigo ar...@users.sourceforge.net added the comment: Fwiw, the behavior in PyPy is: don't do anything particular at shut-down, just shut down and quit the process. No hacking at module globals to replace them with None, but also no guaranteeing that any __del__ method is ever called. We

[issue14020] Improve HTMLParser doc

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Just indent the example, or move it below! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14020 ___

[issue13974] packaging: test for set_platform()

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Also committed to d2, will push later. Thanks! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14038] Packaging test support code raises exception

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for catching it. -- assignee: tarek - eric.araujo resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2012-02-17 Thread Alex Quinn
New submission from Alex Quinn aq2...@alexquinn.org: When accessing this URL, both urllib2 (Py2) and urlib.client (Py3) raise an IncompleteRead error. http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199 Previous discussions about similar errors suggest that

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I have not had a chance to deep-dive in the patch, but I just wanted to double-check that this (a) implemented the idea PJE and I discussed on python-dev, and (b) you re-generate the patch as I pushed some changes to importlib today.

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I have not had a chance to deep-dive in the patch, but I just wanted to double-check that this (a) implemented the idea PJE and I discussed on python-dev I haven't followed this discussion. , and (b) you re-generate the patch as I pushed

[issue14034] the example in argparse doc is too complex

2012-02-17 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe tshep...@gmail.com added the comment: On Fri, Feb 17, 2012 at 19:03, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: I really don’t think there was any willingness to “show off”, and wouldn’t be surprised if the doc was

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Regenerated patch. -- Added file: http://bugs.python.org/file24550/find_module_cache3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043

[issue14030] Be more careful about selecting the compiler in distutils

2012-02-17 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: The bug is specific to PyPy. PyPy has no Makefile, so sysconfig.get_config_var(CC) returns None in PyPy. The first paragraph in message #153471 is about a different patch, not this patch. --

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, can you try again? 06ed9b3f02af -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Just to fill you in, the discussion centred on the idea of doing a listdir() of the directory the FileFinder was in charge of watching and caching that. Then, when it had to look up a file all it had to do was stat the directory to look for a

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Just to fill you in, the discussion centred on the idea of doing a listdir() of the directory the FileFinder was in charge of watching and caching that. Then, when it had to look up a file all it had to do was stat the directory to look for a

[issue14009] Clearer documentation for cElementTree

2012-02-17 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: If you want to collect additional feedback, you may want to add some other people to the Nosy list :-) I did not want more feedback, I wanted to leave time for interested parties to find this bug for themselves and eventually comment :)

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: OK, I have gone ahead and done a review over on rietveld for the code as-is. But I do have a design question. Why pre-calculate everything? In the most common case any single module will be imported once, if at all. And once it is imported it

[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug

2012-02-17 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Éric Araujo wrote: Is there a fixed version of SQLite used by each Python version? If yes, then I think it could be more useful to talk about the Python version in that paragraph. No. In each Python version, setup.py only checks that SQLite

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Why pre-calculate everything? In the most common case any single module will be imported once, if at all. And once it is imported it will get cached in sys.modules, alleviating the need to hit the finder again. So from a performance standpoint

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch with light-weight alternative. -- Added file: http://bugs.python.org/file24551/listdir_cache.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043

[issue11689] sqlite: Incorrect unit test fails to detect failure

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bf7226719aec by Petri Lehtinen in branch '3.2': Fix a variable scoping error in an sqlite3 test http://hg.python.org/cpython/rev/bf7226719aec New changeset ce023c95db9f by Petri Lehtinen in branch '2.7': Fix a

[issue11689] sqlite: Incorrect unit test fails to detect failure

2012-02-17 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Fixed, thanks for the patches! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11689 ___ ___

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: On Fri, Feb 17, 2012 at 14:31, Antoine Pitrou rep...@bugs.python.orgwrote: Antoine Pitrou pit...@free.fr added the comment: Why pre-calculate everything? In the most common case any single module will be imported once, if at all. And once

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: And while I'm thinking about it, the hybrid caching approach of caching just the directory contents to start and then caching full details on successful searches (and failures) would also let you cache the full file path as the strings will be

[issue14009] Clearer documentation for cElementTree

2012-02-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Officially, it doesn't exist :) Keep in mind that many users will find about it from the Internet, and it's better to clearly say what it is and that it shouldn't be used anymore than pretending it doesn't exist. (AFAIU this is the

[issue14009] Clearer documentation for cElementTree

2012-02-17 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. f...@fdrake.net added the comment: Developers with existing code can reasonably be expected to look it up based on what they're currently importing, so an entry that points to the new recommended practice is good. -- nosy: +fdrake

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: And while I'm thinking about it, the hybrid caching approach of caching just the directory contents to start and then caching full details on successful searches (and failures) would also let you cache the full file path as the strings will be

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Updated light-weight caching patch (now checks PYTHONCASEOK dynamically). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file24552/listdir_cache2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___

[issue14026] test_cmd_line_script should include more sys.argv checks

2012-02-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: For the purposes of this test (i.e. running the same script several different ways and making sure it always behaves as expected), I wouldn't even worry about making it configurable. Just define a list of example args as a module global,

[issue812369] module shutdown procedure based on GC

2012-02-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Also, since this issue was last updated, Antoine devised a scheme to test some of the embedding functionality (mainly to test subinterpreters, IIRC). Perhaps that could be harnessed to check GC-based shutdown is working correctly (it might

[issue13641] decoding functions in the base64 module could accept unicode strings

2012-02-17 Thread Catalin Iacob
Catalin Iacob iacobcata...@gmail.com added the comment: My current patch allows mixing of bytes and str for the data to be decoded and the altchars or map01 parameter. Given David's observation in msg153505 I'll update the patch to require that both the data and altchars/map01 have the same

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: The lastest patch (listdir_cache2) LGTM. Have you by any chance patched it in and run ./python -m importlib.test.regrtest (runs the entire test suite with builtins.__import__() substituted with importlib.__import__())? If not I can do it on my

[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I agree with no new builtin and appreciate that being taken off the table. I think the place is the Unicode How-to. I think that document should be renamed Encodings and Unicode How-to. The reasons are 1) one has to first understand the

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The lastest patch (listdir_cache2) LGTM. Have you by any chance patched it in and run ./python -m importlib.test.regrtest (runs the entire test suite with builtins.__import__() substituted with importlib.__import__())? There are a couple of

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Well, it's the reason you added file size to .pyc files. =) I assume if you store the system clock as well to see if no time has changed it would kill the performance gain. We could also have two versions of _FileFinder such that people could

[issue14043] Speed-up importlib's _FileFinder

2012-02-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, it's the reason you added file size to .pyc files. =) pyc files only store the integer timestamp. Here I store the original floating-point timestamp, and I assumed it would be sufficient :) I assume if you store the system clock as well

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Python-coded functions do not have .__self__. def f(): pass f.__self__ ... AttributeError: 'function' object has no attribute '__self__' Unbound builtin methods, which are simply builtins functions attached to a class, do not have .__self__

[issue14020] Improve HTMLParser doc

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7052eb923fb8 by Ezio Melotti in branch '2.7': #14020: improve HTMLParser documentation. http://hg.python.org/cpython/rev/7052eb923fb8 New changeset 569566cbfd13 by Ezio Melotti in branch '3.2': #14020: improve

[issue14020] Improve HTMLParser doc

2012-02-17 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14020

[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode

2012-02-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW I recently made a talk at PyCon Finland called Understanding Encodings that goes through the things you mentioned in the last message. I could turn that in a patch for the Unicode Howto. --

[issue14005] IDLE Crash when running/saving a file

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: With Win7 now, XP previously, I routinely run programs from the IDLE editor window. So do other people, So there is something different on your machine. -- nosy: +terry.reedy ___ Python tracker

[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers

2012-02-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Almost there. The file now compiles, but a failure occurs in a later step due to compression functionality being unavailable: building '_ssl' extension gcc -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall

[issue14023] bytes implied to be mutable

2012-02-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 88522997b021 by Terry Jan Reedy in branch '3.2': Issue 14023 Revert edit to 2.7 version. (I suspect edit is from when we thought http://hg.python.org/cpython/rev/88522997b021 -- nosy: +python-dev

[issue14023] bytes implied to be mutable

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: applied to 3.3 also -- assignee: docs@python - terry.reedy nosy: +terry.reedy resolution: - fixed status: open - closed versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Matt Joiner
Changes by Matt Joiner anacro...@gmail.com: -- nosy: +anacrolix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list

[issue13999] Queue references in multiprocessing doc points to Queue module and not to self

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: :class:`~multiprocessing.Queue` should probably be used. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13999 ___

[issue13948] rm needless use of set function

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Using a set is actually needed: list membership testing does not use hashes (but probably equality), whereas set and dict membership tests does uses hashes. (I wrote a class with an __hash__ method that prints something when called, and “test()

[issue7694] DeprecationWarnings in distutils are pointless

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Due to the feature freeze of distutils and official upgrade path to distutils2, I think the DeprecationWarnings in distutils should just be removed, as they serve no useful purpose. -- keywords: -easy, patch title: DeprecationWarning

[issue14003] __self__ on built-in functions is not as documented

2012-02-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think that functions in C modules are implemented as methods of module objects, which would explain why len.__self__ is builtins. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2012-02-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14044 ___ ___ Python-bugs-list mailing

[issue14042] json.dumps() documentation is slightly incorrect.

2012-02-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Entry for dump says If ensure_ascii is False (default: True), then some chunks written to fp may be unicode instances, Entry for dumps says If ensure_ascii is False, then the return value will be a unicode instance. Entry for JSONEncoder says

  1   2   >