[issue14035] behavior of test.support.import_fresh_module
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14035] behavior of test.support.import_fresh_module
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 Added file: http://bugs.python.org/file24543/issue14035_fresh_modules.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14035 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14025] unittest.TestCase.assertEqual does not show diff when comparing str with unicode
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 shouldn't mix str and unicode. I would rather fix the code to return unicode than using assertMultilineEqual to get a diff between str and unicode. Moreover assertMultiLineEqual only works if the str happens to be ASCII-only: Yes I'm aware of that. However to my mind there is an inconsistency between having assertEqual dispatch per type and having to use explicitly assertMultiLineEqual. If assertMultiLineEqual accepts basestring, I should be able to register it as such. More practically I have a large suite of code using assertEqual comparing mixed str and unicode. This code was written before the diff function was available (in fact I had a custom diff function in the subclass). As long as tests are OK this works fine, so I rather not touch them, but if they fail I don't get the output I need. Anyway, since I feel there is no consensus on this, I went ahead and patched assertEqual in my custom subclass and move ahead. I can submit a formal patch if there is a chance of it being accepted. Regards, Jaap -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 undeclared (first use in this function) The relevant line PyModule_AddIntConstant(m, OP_SINGLE_ECDH_USE, SSL_OP_SINGLE_ECDH_USE); isn't bracketed with #ifndef OPENSSL_NO_ECDH/#endif - shouldn't it be? -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11689] sqlite: Incorrect unit test fails to detect failure
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12655] Expose sched.h functions
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12655 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13882] PEP 410: Use decimal.Decimal type for timestamps
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 http://bugs.python.org/issue13882 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14035] behavior of test.support.import_fresh_module
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 from x import y, where y is a function that depends on module globals in 'x'. If 'x' ever drops out of sys.modules (e.g. because it is a fresh copy only there temporarily during an import), the x.__dict__ will have every attribute set to None and calls to 'y' will fail. (In Florent's original example, it was his dummy/foo.py that set of alarm bells and prompted me to look up the reference for the module GC problem). That's why I'm opposed to touching import_fresh_modules to sweep this problem under the rug - as long as module globals finalisation isn't GC based, keeping a reference to a function in a module without ensuring you also hold a reference to the module itself is always going to be somewhat dubious. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14035 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -IInclude -I. -I./Include -I/Users/vinay/projects/pythonv -c /Users/vinay/projects/pythonv/Modules/_ssl.c -o build/temp.macosx-10.5-i386-3.3/Users/vinay/projects/pythonv/Modules/_ssl.o /Users/vinay/projects/pythonv/Modules/_ssl.c: In function ‘_get_peer_alt_names’: /Users/vinay/projects/pythonv/Modules/_ssl.c:634: warning: passing argument 2 of ‘ASN1_item_d2i’ from incompatible pointer type /Users/vinay/projects/pythonv/Modules/_ssl.c:639: warning: passing argument 2 of ‘method-d2i’ from incompatible pointer type /Users/vinay/projects/pythonv/Modules/_ssl.c: In function ‘PySSL_compression’: /Users/vinay/projects/pythonv/Modules/_ssl.c:1011: warning: implicit declaration of function ‘SSL_get_current_compression’ /Users/vinay/projects/pythonv/Modules/_ssl.c:1011: warning: assignment makes pointer from integer without a cast /Users/vinay/projects/pythonv/Modules/_ssl.c: In function ‘set_ecdh_curve’: /Users/vinay/projects/pythonv/Modules/_ssl.c:2048: error: ‘EC_KEY’ undeclared (first use in this function) /Users/vinay/projects/pythonv/Modules/_ssl.c:2048: error: (Each undeclared identifier is reported only once /Users/vinay/projects/pythonv/Modules/_ssl.c:2048: error: for each function it appears in.) /Users/vinay/projects/pythonv/Modules/_ssl.c:2048: error: ‘key’ undeclared (first use in this function) /Users/vinay/projects/pythonv/Modules/_ssl.c:2060: warning: implicit declaration of function ‘EC_KEY_new_by_curve_name’ /Users/vinay/projects/pythonv/Modules/_ssl.c:2065: warning: implicit declaration of function ‘SSL_CTX_set_tmp_ecdh’ /Users/vinay/projects/pythonv/Modules/_ssl.c:2066: warning: implicit declaration of function ‘EC_KEY_free’ Failed to build these modules: _ssl -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 out if OPENSSL_NO_ECDH is defined? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12627] Implement PEP 394: The python Command on Unix-Like Systems
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 the choice of symlink vs hardlink is really more cosmetic than consequential, it didn't feel like an appropriate change to make in a maintenance release without a compelling reason (introducing a *new* link meant we had such a reason for 2.7, but that's not applicable to 3.2). Handing the issue over to Ned to confirm the OS X framework builds align with the PEP. -- assignee: - ned.deily stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
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 module namings, so that they can be removed in a later version. -- components: Interpreter Core, Library (Lib) files: impsuffix.patch keywords: patch messages: 153544 nosy: barry, brett.cannon, dmalcolm, loewis, neologix, pitrou priority: normal severity: normal stage: patch review status: open title: Deprecate some of the module file formats type: performance versions: Python 3.3 Added file: http://bugs.python.org/file24544/impsuffix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14036] urlparse insufficient port property validation
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. Also, rather than hardcoding default port numbers for selected protocols, it would make more sense to just look them up via socket.getservbyname(scheme) (and still return None if the scheme isn't recognised). However, I'll need to think about that one for a while - urlparse is designed to be almost purely a string *parsing* library. Looking up default port numbers if one isn't specified really isn't its job. (For one thing, you'd break the ability to exactly recreate the original URL text from the parsed version). There should definitely by a try/except around that conversion to int(), though - it's just that I'm not yet sure what an appropriate return value is at that point. The raw port string? None? Should there be a separate raw_port descriptor that always returns some kind of string, with the port descriptor promising to always return a valid 16-bit port number or None? -- nosy: +ncoghlan versions: -Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14036 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
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 worry about compiling an extension module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13977] importlib simplification
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). That's why it's a slice off of __name__ based on name itself; name is some funky tail section of __name__ for relative imports. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13961] Have importlib use os.replace()
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13961] Have importlib use os.replace()
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 http://bugs.python.org/issue13961 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
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 follows such naming. This patch deprecates such module namings, so that they can be removed in a later version. +1 In Debian/Ubuntu I have seen some third party extensions (not built with distutils) that still use this naming convention in their Python 3 extension module, but it's usually pretty easy to rename them to PEP 3149 style names in the platform build scripts. I think it's a great idea to eventually get rid of the untagged names altogether, and saving some stat calls is added benefit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14040] Deprecate some of the module file formats
Changes by Ralf Schmitt python-b...@systemexit.de: -- nosy: +schmir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14040 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14041] bsddb DB_RUNRECOVERY crash on write access
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 recovery -- PANIC: Invalid argument') Full traceback: http://pastebin.com/A1VSPV9Q I can reproduce the crash with python 2.7.2 with just these lines (it doesn't crash on empty db files): import shelve a = shelve.open(data.db) b=crashin..*2 a['content/scenarios/tutorial_da.yaml'] = b a['content/scenarios/tutorial_cs.yaml'] = b -- files: data.db messages: 153551 nosy: totycro priority: normal severity: normal status: open title: bsddb DB_RUNRECOVERY crash on write access versions: Python 2.7 Added file: http://bugs.python.org/file24545/data.db ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13966 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14033] distutils problem with setup.py build setup.py install vs direct setup.py install
勇刚 罗 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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13991] namespace packages depending on order
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 everything on sys.path upfront and use pkgutil to extend __path__ it sees the other 'a' directory and adds it to __path__. -- nosy: +brett.cannon resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 being included. Presumably, even if only an old version of OpenSSL is available, Python should still build cleanly, even if it's without Elliptic Curve cipher support? If you'd like me to try anything else, just ask. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14009] Clearer documentation for cElementTree
É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 question: when I merge the new doc from 3.2 to 3.3, do I remove the new section, as the cET module is now deprecated? If I do that we’d lose the indexing (i.e. without a module directive there will be no entry in the module index not the alphabetical index). I could leave the cET section so that we get the indexing but change the text to “Deprecated alias of ET.” -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14042] json.dumps() documentation is slightly incorrect.
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 return value MAY BE be a unicode instance. (Without the caps of course) bash: python Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type help, copyright, credits or license for more information. import json type(json.dumps({'a': 1}, ensure_ascii=False)) type 'str' Tested against 2.6 and 2.7. -- components: Library (Lib) messages: 153558 nosy: tomchristie priority: normal severity: normal status: open title: json.dumps() documentation is slightly incorrect. type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14041] bsddb DB_RUNRECOVERY crash on write access
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 item 5 has bad pgno 59 db_verify: BDB1107 Page 36: offpage item 9 has bad pgno 94 db_verify: BDB1107 Page 37: offpage item 9 has bad pgno 57 db_verify: data.db: BDB0090 DB_VERIFY_BAD: Database verification failed BDB5105 Verification of data.db failed. For real world usage, you must use Berkeley DB transactional storage mode. If you use a concurrent datastore or anything like that (anything more simple that the transactional mode), you can corrupt your database if the application or the computer crash in a bad moment. Or if you try to backup the database while writes are in progress, for instance. Briefly: use the transactional mode and read the Oracle documentation carefully!. Closing the report as invalid, since the database is actually corrupt. -- nosy: +jcea resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
É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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14033] distutils problem with setup.py build setup.py install vs direct setup.py install
É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 resolution: - invalid stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14033 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
É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 :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14032] test_cmd_line_script prints undefined 'data' variable
Changes by Éric Araujo mer...@netwok.org: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14020] Improve HTMLParser doc
É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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14020 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13988] Expose the C implementation of ElementTree by default when importing ElementTree
É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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug
É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 about the Python version in that paragraph. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 loops, best of 3: 69.9 usec per loop $ ./python -m timeit -s import imp imp.find_module('bisect', None) 1 loops, best of 3: 108 usec per loop - unpatched importlib: $ ./python -m timeit -s from importlib._bootstrap import _DefaultPathFinder as Finder Finder.find_module('logging', None) 1000 loops, best of 3: 431 usec per loop $ ./python -m timeit -s from importlib._bootstrap import _DefaultPathFinder as Finder Finder.find_module('bisect', None) 1000 loops, best of 3: 468 usec per loop - patched importlib: $ ./python -m timeit -s from importlib._bootstrap import _DefaultPathFinder as Finder Finder.find_module('logging', None) 1 loops, best of 3: 37.5 usec per loop $ ./python -m timeit -s from importlib._bootstrap import _DefaultPathFinder as Finder Finder.find_module('bisect', None) 1 loops, best of 3: 36.9 usec per loop -- components: Interpreter Core, Library (Lib) files: find_module_cache.patch keywords: patch messages: 153566 nosy: brett.cannon, pitrou priority: normal severity: normal stage: patch review status: open title: Speed-up importlib's _FileFinder type: performance versions: Python 3.3 Added file: http://bugs.python.org/file24547/find_module_cache.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9631] Python 2.7 installation issue for Linux gcc-4.1.0-3 (Fedora Core 5?)
É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 rep...@bugs.python.org http://bugs.python.org/issue9631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14020] Improve HTMLParser doc
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14020 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14030] Be more careful about selecting the compiler in distutils
É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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14034] the example in argparse doc is too complex
É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 wording idea for a gentler introduction? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13974] packaging: test for set_platform()
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14038] Packaging test support code raises exception
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue812369] module shutdown procedure based on GC
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 didn't get a particular bug report about this so far, so it seems to work. (This is just a report about PyPy's situation; I understand that the situation in CPython is a bit more delicate if CPython is embedded in a larger process.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14020] Improve HTMLParser doc
É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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13974] packaging: test for set_platform()
É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 http://bugs.python.org/issue13974 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14038] Packaging test support code raises exception
É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 http://bugs.python.org/issue14038 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl
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 this may be due to a problem with the server and chunked data transfer. (See links below.) I can't understand what that means. However, this works fine with urllib (Py2), curl, wget, and all regular web browsers I've tried it with. Thus, I would have expected urllib2 (Py2) and urllib.request (Py3) to cope with it similarly. Versions I've tested with: - Fails with urllib2 + Python 2.5.4, 2.6.1, 2.7.2 (Error messages vary.) - Fails with urllib.request + Python 3.1.2, 3.2.2 - Succeeds with urllib + Python 2.5.4, 2.6.1, 2.7.2 - Succeeds with wget 1.11.1 - Succeeds with curl 7.15.5 ___ TEST CASES # FAILS - Python 2.7, 2.6, 2.5 import urllib2 url = http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199; xml_str = urllib2.urlopen(url).read() # Raises httplib.IncompleteRead # FAILS - Python 3.2, 3.1 import urllib.request url = http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199; xml_str = urllib.request.urlopen(url).read() # Raises http.client.IncompleteRead # SUCCEEDS - Python 2.7, 2.6, 2.5 import urllib url = http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199; xml_str = urllib.urlopen(url).read() dom = xml.dom.minidom.parseString(xml_str) # Verify XML is complete print(urllib: %d bytes received and parsed successfully%len(xml_str)) # SUCCEEDS - wget wget -O- http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199; | wc # SUCCEEDS - curl - prints an error, but returns the full data anyway curl http://info.kingcounty.gov/health/ehs/foodsafety/inspections/XmlRest.aspx?Zip_Code=98199; | wc ___ RELATED DISCUSSIONS http://www.gossamer-threads.com/lists/python/python/847985 http://bugs.python.org/issue11463 (closed) http://bugs.python.org/issue6785 (closed) http://bugs.python.org/issue6312 (closed) -- components: Library (Lib) messages: 153581 nosy: Alex Quinn priority: normal severity: normal status: open title: IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 some changes to importlib today. Will do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14034] the example in argparse doc is too complex
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 written optparse users. It’s just an accident of history, and we can try to make it better instead of calling people names :) I did not mean to sound rude. Forgive me. Do you have a wording idea for a gentler introduction? I will work on something. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14034 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14030] Be more careful about selecting the compiler in distutils
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14030 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 change before it simply looked at a frozenset of directory contents. That does away with having to stat for every file type (directory, module, extension, etc.) and replaces it with one upfront listdir() and then a single directory stat per lookup. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 change before it simply looked at a frozenset of directory contents. That does away with having to stat for every file type (directory, module, extension, etc.) and replaces it with one upfront listdir() and then a single directory stat per lookup. Ah, then it's basically what my patch does (except that it also computes all potential module names instead of dumping the os.listdir() result in a frozenset). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14009] Clearer documentation for cElementTree
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 :) One question: when I merge the new doc from 3.2 to 3.3, do I remove the new section, as the cET module is now deprecated? If I do that we’d lose the indexing (i.e. without a module directive there will be no entry in the module index not the alphabetical index). I could leave the cET section so that we get the indexing but change the text to “Deprecated alias of ET.” I don't see a need for cElementTree to be indexed in the doc of 3.3 Assuming a new Python user who starts with 3.3, he should not even know about the existence of cElementTree (bar a small notice that says it's deprecated, which will be of no interest to him). The cElementTree module stays in its place in 3.3, but that's only for backwards compatibility. Officially, it doesn't exist :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 will get cached in sys.modules, alleviating the need to hit the finder again. So from a performance standpoint wouldn't it be better not to do all of the pre-calculation and instead do that as needed assuming that sys.modules will shield the finder from having to do repetitive things like figuring out what loader is needed? You will have to do the calculation regardless for the first import, but you might not need to import every module in a directory. Plus if the finder gets its cache invalidated frequently it will simply be wasting its time. I'm not going to argue from the perspective that most modules won't get imported as that's purely a stdlib thing; I am willing to bet most projects import nearly all of their modules in each execution. Otherwise it's good to know three of us now have independently come up with fundamentally the same idea for speeding up imports. =) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13995] sqlite3 Cursor.rowcount documentation for old sqlite bug
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 is 3.0.8 or newer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13995 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 wouldn't it be better not to do all of the pre-calculation and instead do that as needed assuming that sys.modules will shield the finder from having to do repetitive things like figuring out what loader is needed? I figured it would avoid repetitive tests for all 10 suffixes. That said, I have now tried the alternative: find_module() is around 50% slower, but building the cache is 10x faster. Perhaps this is a winner. It would depend on the situation (short or long sys.path, few or many imports, etc.). Perhaps you can try both patches on your bootstrap repo? Plus if the finder gets its cache invalidated frequently it will simply be wasting its time. Well, in real-world situations I don't think the cache will ever get invalidated: because imports are mostly done at startup, and because invalidating the cache means you are installing new libraries or updating existing ones while a running program is about to import something. Otherwise it's good to know three of us now have independently come up with fundamentally the same idea for speeding up imports. =) Yup :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11689] sqlite: Incorrect unit test fails to detect failure
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 variable scoping error in an sqlite3 test http://hg.python.org/cpython/rev/ce023c95db9f New changeset 6b834e3c0882 by Petri Lehtinen in branch 'default': Merge branch '3.2' http://hg.python.org/cpython/rev/6b834e3c0882 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11689] sqlite: Incorrect unit test fails to detect failure
Petri Lehtinen pe...@digip.org added the comment: Fixed, thanks for the patches! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 it is imported it will get cached in sys.modules, alleviating the need to hit the finder again. So from a performance standpoint wouldn't it be better not to do all of the pre-calculation and instead do that as needed assuming that sys.modules will shield the finder from having to do repetitive things like figuring out what loader is needed? I figured it would avoid repetitive tests for all 10 suffixes. That said, I have now tried the alternative: find_module() is around 50% slower, but building the cache is 10x faster. Perhaps this is a winner. What is the time increase for find_module() vs. the speed-up of building the cache? I.e. how many imports are needed before doing the full calculation is a benefit? And would it make sense to have a hybrid of caching the contents for fast start-up but then caching full details after a successful find? That would mean no work is ever simply tossed out and forgotten. It would depend on the situation (short or long sys.path, few or many imports, etc.). Perhaps you can try both patches on your bootstrap repo? Yep, that's not hard (and it will only get faster as I replace the bodies of __import__() and _gcd_import() with C code so that sys.modules is C-fast again). Question is what to benchmark against? I should probably get the standard benchmarks up and running and see how those are affected (especially the start-up ones). Plus if the finder gets its cache invalidated frequently it will simply be wasting its time. Well, in real-world situations I don't think the cache will ever get invalidated: because imports are mostly done at startup, and because invalidating the cache means you are installing new libraries or updating existing ones while a running program is about to import something. I agree, but it was just something to consider. Otherwise it's good to know three of us now have independently come up with fundamentally the same idea for speeding up imports. =) Yup :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 interned and used again by the loaders for setting __file__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14009] Clearer documentation for cElementTree
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 current situation, since there is a warning, but leaving it indexed wouldn't hurt IMHO.) -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14009] Clearer documentation for cElementTree
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 interned and used again by the loaders for setting __file__. Well, you shouldn't call find_module() on the same module twice (except for benchmarks), so I'm not sure what caching the results would bring. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14026] test_cmd_line_script should include more sys.argv checks
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, append them to the run_args in _check_script, and check them against sys.argv[1:] with assertEqual() in the test script. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14026 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue812369] module shutdown procedure based on GC
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 even do it already, without any changes to the test suite). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13641] decoding functions in the base64 module could accept unicode strings
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 type. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 ride home tonight to make sure semantics didn't surprisingly change (I don't see how). And then I can benchmark against the standard benchmark suite to see if it speeds things up in my bootstrap branch. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode
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 concept of encoding characters and text as numbers, and 2) this issue (and the python-ideas discussion) is not about Unicode, but about using pre- (and non-)Unicode encodings with Python3's bytes and string types, and how that differs in Python3 versus using Python2's unicode and string types. If only Unicode encodings were used, with utf-8 dominant on the Internet (and it is now most common for web pages), the problems of concern here would not exist. Learning about Unicode would mean learning about code units versus codepoints, normal versus surrogate chars, BMP versus extended chars (all of which are non-issues in wide builds and Py 3.3), 256-char planes, BOMs, surrogates, normalization forms, and character properties. While sometimes useful, these subjects are not the issue here. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 test failures (in test_import, test_runpy, test_reprlib). Apparently this is due to false positives when comparing directory modification times. If I sleep() enough between tests, the failures disappear... I wonder if this could be a problem in real-life (say, someone compiling some DSL to Python code on-the-fly and expecting import to pick up without any timestamp problems). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 choose which they preferred. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14043] Speed-up importlib's _FileFinder
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 to see if no time has changed it would kill the performance gain. I don't know. I might give it a try but it might still be fragile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
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__ list.__len__.__self__ ... AttributeError: 'wrapper_descriptor' object has no attribute '__self__' So it makes no sense to me that builtin non-method functions should have this attribute. Built-in methods This is really a different disguise of a built-in function, this time containing an object passed to the C function as an implicit extra argument. An example of a built-in method is alist.append(), assuming alist is a list object. In this case, the special read-only attribute __self__ is set to the object denoted by alist. should have 'method' replaced with 'instance method' as it is only talking about instance methods, as the term is used in the rest of the section. Or this section should be deleted as it duplicates the previous Instance Method section. Or it should be revised to actually discuss unbound builtin methods. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14020] Improve HTMLParser doc
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 HTMLParser documentation. http://hg.python.org/cpython/rev/569566cbfd13 New changeset 1850f45f6169 by Ezio Melotti in branch 'default': #14020: merge with 3.2. http://hg.python.org/cpython/rev/1850f45f6169 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14020 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14020] Improve HTMLParser doc
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13997] Clearly explain the bare minimum Python 3 users should know about Unicode
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13997 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14005] IDLE Crash when running/saving a file
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 rep...@bugs.python.org http://bugs.python.org/issue14005 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13627] Python SSL stack doesn't support Elliptic Curve ciphers
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 -Wstrict-prototypes -IInclude -I. -I./Include -I/Users/vinay/projects/pythonv -c /Users/vinay/projects/pythonv/Modules/_ssl.c -o build/temp.macosx-10.5-i386-3.3/Users/vinay/projects/pythonv/Modules/_ssl.o /Users/vinay/projects/pythonv/Modules/_ssl.c: In function ‘_get_peer_alt_names’: /Users/vinay/projects/pythonv/Modules/_ssl.c:645: warning: passing argument 2 of ‘ASN1_item_d2i’ from incompatible pointer type /Users/vinay/projects/pythonv/Modules/_ssl.c:650: warning: passing argument 2 of ‘method-d2i’ from incompatible pointer type /Users/vinay/projects/pythonv/Modules/_ssl.c: In function ‘PySSL_compression’: /Users/vinay/projects/pythonv/Modules/_ssl.c:1022: warning: implicit declaration of function ‘SSL_get_current_compression’ /Users/vinay/projects/pythonv/Modules/_ssl.c:1022: warning: assignment makes pointer from integer without a cast gcc -bundle -undefined dynamic_lookup build/temp.macosx-10.5-i386-3.3/Users/vinay/projects/pythonv/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.macosx-10.5-i386-3.3/_ssl.so *** WARNING: renaming _ssl since importing it failed: dlopen(build/lib.macosx-10.5-i386-3.3/_ssl.so, 2): Symbol not found: _SSL_get_current_compression Referenced from: /Users/vinay/projects/pythonv/build/lib.macosx-10.5-i386-3.3/_ssl.so Expected in: dynamic lookup Failed to build these modules: _ssl It looks as if OPENSSL_NO_COMP needs to be defined in _ssl.c if the OpenSSL version is too old and not already defined. With this change: #if OPENSSL_VERSION_NUMBER 0x0090800fL !defined(OPENSSL_NO_COMP) # define OPENSSL_NO_COMP #endif the ssl library builds without errors. However, test_ssl fails because it still expects OP_SINGLE_ECDH_USE to be defined. With this change in test_constants: if ssl.HAS_ECDH: ssl.OP_SINGLE_ECDH_USE all tests pass. I notice that the test there for OP_NO_COMPRESSION is version-based rather than capability-based, and it might be a good idea to change this too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13627 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14023] bytes implied to be mutable
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14023 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14023] bytes implied to be mutable
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 http://bugs.python.org/issue14023 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
Changes by Matt Joiner anacro...@gmail.com: -- nosy: +anacrolix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13999] Queue references in multiprocessing doc points to Queue module and not to self
É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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13948] rm needless use of set function
É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() in []” does not print anything, whereas “test() in set()” does. So test_hash now uses a set again, and I added a comment to clarify why.) -- resolution: duplicate - invalid superseder: Get rid of doctests in packaging.tests.test_version - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7694] DeprecationWarnings in distutils are pointless
É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 from build_ext needs stacklevel - DeprecationWarnings in distutils are pointless versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7694 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14003] __self__ on built-in functions is not as documented
É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 http://bugs.python.org/issue14003 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14042] json.dumps() documentation is slightly incorrect.
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 If ensure_ascii is True (the default), the output is guaranteed to be str objects with all incoming unicode characters escaped. If ensure_ascii is False, the output will be a unicode object. I suspect the latter two meant to say something like If ensure_ascii is False and any chunk would be unicode, then the whole output is unicode. And should 'all incoming unicode characters' either be or include 'all non-ascii chars (as in 3.x)? --- In 3.x, ensure_ascii apparently has a different meaning. If ensure_ascii is True (the default), the output is guaranteed to have all incoming non-ASCII characters escaped. If ensure_ascii is False, these characters will be output as-is. Unlike other params used in multiple json functions, ensure_ascii is only defined once, under json.JSONEncoder and not under dump and dumps. Should the JSONEncoder entry to copied to dump and dumps? -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python, ezio.melotti, rhettinger, terry.reedy stage: - needs patch versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com