[issue3067] setlocale error message is confusing
Petri Lehtinen pe...@digip.org added the comment: If *locale* is specified, it may be a None, a string, or an iterable of two strings, language code and encoding. String pairs are converted to a single string using the locale aliasing engine. What about the possible None value then? Do you think that mentions to it be dropped? I don't think so, because setlocale(locale.LC_ALL, None) is an explicit way of saying Return me the current value, especially because the function's name is SETlocale, which doesn't make it explicit. If None is not dropped, the , language code and encoding should maybe be in parentheses insteead: to strings (language code and encoding), or None... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Terry J. Reedy tjre...@udel.edu added the comment: Yes, parentheses would be better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13322] buffered read() and write() does not raise BlockingIOError
Charles-François Natali neolo...@free.fr added the comment: write() is a bit simpler, since BlockingIOError has a characters_written attribute which is meant to inform you of the partial success: we can just reuse that. That said, BlockingIOError could grow a partial_read attribute containing the read result... Now that I think about it, it's probably the best solution: always raise a BlockingIOError in case of partial write, with characters_written set correctly (sbt's patch). And do the same thing on partial read/readline, and return the partially read data as an attribute of BlockingIOError (we could also return a characters_read that would indicate the exact number of bytes read: then the user could call read()/read_into() with exactly characters_read). That could certainly break existing - sloppy - code, but this would be more much consistent than the current behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13322 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13347] .py extension not auto added
New submission from Kaleb702 ronneymiche...@gmail.com: Python IDLE does not auto add the .py extension when saving a file. -- components: IDLE messages: 147072 nosy: Kaleb702 priority: normal severity: normal status: open title: .py extension not auto added ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13254] maildir.items() broken
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5f27a9f67a34 by Petri Lehtinen in branch '3.2': Fix Maildir initialization so that maildir contents are read correctly. http://hg.python.org/cpython/rev/5f27a9f67a34 New changeset 91a0f6879173 by Petri Lehtinen in branch 'default': Fix Maildir initialization so that maildir contents are read correctly. http://hg.python.org/cpython/rev/91a0f6879173 New changeset 0b754ee12dbd by Petri Lehtinen in branch '2.7': Fix Maildir initialization so that maildir contents are read correctly. http://hg.python.org/cpython/rev/0b754ee12dbd -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13254] maildir.items() broken
Petri Lehtinen pe...@digip.org added the comment: In the absence of any complaints, I went on and committed the fix. Thanks for reporting the issue! -- assignee: r.david.murray - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 34c9465f5023 by Petri Lehtinen in branch '2.7': Issue #3067: Enhance the documentation and docstring of locale.setlocale() http://hg.python.org/cpython/rev/34c9465f5023 New changeset 98806dd03506 by Petri Lehtinen in branch '3.2': Issue #3067: Enhance the documentation and docstring of locale.setlocale() http://hg.python.org/cpython/rev/98806dd03506 New changeset 8a27920efffe by Petri Lehtinen in branch 'default': Issue #3067: Enhance the documentation and docstring of locale.setlocale() http://hg.python.org/cpython/rev/8a27920efffe -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3067] setlocale error message is confusing
Petri Lehtinen pe...@digip.org added the comment: I decided to restructure the documentation of setlocale() a bit and I think it's better now overall. It includes Terry's suggestions. I think this issue can now be closed. Thanks for the report and patches! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7777] Support needed for AF_RDS family
Charles-François Natali neolo...@free.fr added the comment: So, what do you think of the new patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
Charles-François Natali neolo...@free.fr added the comment: The patch looks good to me. Note that the whole kill(pid, SIGKILL) looks overkill to me... -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13348] test_unicode_file fails: shutil.copy2 says same file
New submission from Florent Xicluna florent.xicl...@gmail.com: I stopped on this error on buildbot x86 Tiger 3.2. It looks strange. test_single_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR == ERROR: test_single_files (test.test_unicode_file.TestUnicodeFiles) -- Traceback (most recent call last): File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/test/test_unicode_file.py, line 120, in test_single_files self._test_single(TESTFN_UNICODE) File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/test/test_unicode_file.py, line 113, in _test_single self._do_single(filename) File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/test/test_unicode_file.py, line 40, in _do_single self._do_copyish(filename, filename) File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/test/test_unicode_file.py, line 75, in _do_copyish shutil.copy2(filename1, filename2 + .new) File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/shutil.py, line 144, in copy2 copyfile(src, dst) File /Users/db3l/buildarea/3.2.bolen-tiger/build/Lib/shutil.py, line 85, in copyfile raise Error(`%s` and `%s` are the same file % (src, dst)) shutil.Error: `@test_19432_tmp-àòɘŁğ` and `@test_19432_tmp-àòɘŁğ.new` are the same file -- Ran 2 tests in 0.013s FAILED (errors=1) http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.2/builds/637/steps/test/logs/stdio -- keywords: buildbot messages: 147079 nosy: flox priority: normal severity: normal stage: test needed status: open title: test_unicode_file fails: shutil.copy2 says same file type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4489] shutil.rmtree is vulnerable to a symlink attack
Charles-François Natali neolo...@free.fr added the comment: FYI, I have a pathlib experiment in http://hg.python.org/features/pathlib/, with an optional openat-based accessor. Interesting: I used to think that the current API for dealing with paths was a little too basic and terse. Concerning this issue, one (last) thing: rmtree performs a depth-first traversal of the directory tree, keeping an open FD at each directory level: in case of deeply-nested directory hierarchy, or if there are many open FDs, there's the risk of running out of FDs. I think the best thing would be to let rmtree fail (provided it closes all the FDs it opened): falling back to the unsafe version would be stupid (an attacker would just have to create a deeply-nested hierarchy, and then use the same old symlink race). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13309] test_time fails: time data 'LMT' does not match format '%Z'
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It's not just Gentoo. I get this error repeatably on Ubuntu Oneiric 64- bit and Linux Mint Katya 64-bit, though not on the 32-bit variants. -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13309 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13348] test_unicode_file fails: shutil.copy2 says same file
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13348 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I get the opposite failure to Nadeem as far as InstallDataTestCase.test_resources: it works on Ubuntu 64-bit, but fails on 32-bit. Digging into it a bit further, I find that _generate_cache in Lib/packaging/database.py returns prematurely in the failing case, because _cache_generated_egg is True in the failing case but not in the test run which succeeds. My guess is that this could be due to a missing call to clear_cache() in the same module, as _cache_generated_egg is set to True only in the last part of _generate_cache, and my guess is that the value is a holdover from an earlier test. If I add the line packaging.database.clear_cache() just above with packaging.database.get_file('Spamlib', 'spamd') as fp: then the test succeeds. -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I added the packaging.database.clear_cache() at the end of setUp(); that works, too. Gotta love global variables - not! ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7777] Support needed for AF_RDS family
Antoine Pitrou pit...@free.fr added the comment: Oops, sorry. I wonder if it would be possible to test the address returned by recvfrom(). Same for the flags and ancillary data in recvmsg(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I looked in packaging/test, and noticed that database.get_distribution is called from test_depgraph, test_xmlrpc and test_database. These may also need looking over to see if cache invalidation needs to happen. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Nadeem Vawda nadeem.va...@gmail.com added the comment: I added the packaging.database.clear_cache() at the end of setUp(); that works, too. That fixes the InstallDataTestCase failure for me as well (on both Ubuntu 11.10 64-bit and Windows 7 64-bit). I get the opposite failure to Nadeem as far as InstallDataTestCase.test_resources: it works on Ubuntu 64-bit, but fails on 32-bit. FTR, I haven't checked this on Ubuntu 32-bit. It's rather odd for the failure to be architecture-dependent. Are these two machines running different versions of Ubuntu, perhaps? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13345] Invisible Files in Windows 7
Martin v. Löwis mar...@v.loewis.de added the comment: Most likely, you are using a 32-bit Python on a 64-bit Windows. 32-bit programs can't access c:\windows\system32, as that will contain the 64-bit DLLs. Instead, access is redirected to c:\windows\syswow64. Please confirm whether or not this is the case here also. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13345 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Roumen Petrov bugtr...@roumenpetrov.info added the comment: Test test_install and test_command_install_data interference cache . Adding clear_cache as clean up routine will resolve reported issue with Spamlib. The patch is trivial. Also one of the test set clear_cache as cleanup. Most important is why packaging use global variables . To me good solution will not use globals , but this require authors to rewrite packaging itself. -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13204] sys.flags.__new__ crashes
Éric Araujo mer...@netwok.org added the comment: I’m not sure it is useful to fix this bug. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13033] Add shutil.chowntree
Éric Araujo mer...@netwok.org added the comment: See also #13229. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13033 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13033] Add shutil.chowntree
Éric Araujo mer...@netwok.org added the comment: Tigger: Could you provide a patch for Python 3.3? (more info at http://docs.python.org/devguide/) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13033 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13204] sys.flags.__new__ crashes
Ezio Melotti ezio.melo...@gmail.com added the comment: Why not? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Éric Araujo mer...@netwok.org added the comment: During the discussion about adding a chowntree function to shutil (http://mail.python.org/pipermail/python-dev/2011-May/111661.html and ), Victor suggested this: I don't like the idea of a recursive flag. I would prefer a map-like function to apply a function on all files of a directory. Something like shutil.apply_recursive(shutil.chown)... ... maybe with options to choose between deep-first search and breadth-first search, filter (filenames, file size, files only, directories only, other attributes?), directory before files (may be need for chmod(0o000)), etc. Such a function removes the need for copytee, rmtree, dosomethingelsetree, etc. When I first read this feature request I thought it was the same idea, but after reading it again I see that you propose a function that walks and returns, not a function that walks and applies a callback. Both use cases are important, so an apply_tree function could be implemented on top of your filter_walk (I’ll open another report if we reach agreement on the idea of these two functions working together). -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Éric Araujo mer...@netwok.org added the comment: s/and /and #13033/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13200] Add start, stop and step attributes to range objects
Éric Araujo mer...@netwok.org added the comment: The other bug is older and has more discussion, I’m closing this one as duplicate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13200] Add start, stop and step attributes to range objects
Changes by Éric Araujo mer...@netwok.org: -- resolution: - duplicate stage: patch review - committed/rejected status: open - closed superseder: - Introspectable range objects ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13200 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9896] Introspectable range objects
Éric Araujo mer...@netwok.org added the comment: I think this is ready for commit. -- nosy: +smarnach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13290] get vars for object with __slots__
Éric Araujo mer...@netwok.org added the comment: You should attach diffs (context diffs, I believe) Nope, these are hard to read :) The universal diff format is the unified one. That’s also what Mercurial uses (see the devguide for more info on contributing). -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13290] get vars for object with __slots__
Changes by Éric Araujo mer...@netwok.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13292] missing versionadded for bytearray
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - eric.araujo nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13292 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Éric Araujo mer...@netwok.org added the comment: Thanks, I’ll add the disable_cache call. Westley: I’ve installed Arch. Is there a command I can run to get zlib, openssl, gcc, make and all that, similar to “aptitude build-dep python3.2”? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Éric Araujo mer...@netwok.org added the comment: I’ll open another reports for the possible bug in _generate_cache and for review of the other tests calling get_distribution. Test test_install and test_command_install_data interference cache I’ve added checks in regrtest to make sure that each tests clears the caches some time ago. Most important is why packaging use global variables. [citation needed]. First, mutable objects with a global name (let’s not use “variable” for Python) are not unconditionally evil; see sys.path and sys.modules for example. Second, how concretely would you change that implementation? We need shared caches for functions in packaging.database. They should be built on demand, and should be cleared by higher-level libraries or applications when the filesystem has changed (after an installation or removal for example). With these constraints, do you have implementation ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13204] sys.flags.__new__ crashes
Éric Araujo mer...@netwok.org added the comment: Because the class of sys.flags is an implementation detail. Most people won’t try to instantiate it, IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4eee9dd61147 by Éric Araujo in branch 'default': Try to fix buildbot failures from #13193 http://hg.python.org/cpython/rev/4eee9dd61147 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12392] pthread_kill() doesn't work on the main thread on FreeBSD6
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8ea34a74f118 by Éric Araujo in branch '2.7': Add missing versionadded (fixes #12392) http://hg.python.org/cpython/rev/8ea34a74f118 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13204] sys.flags.__new__ crashes
Ezio Melotti ezio.melo...@gmail.com added the comment: That's probably true, but IMHO it's not a valid reason to keep the buggy behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9896] Introspectable range objects
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4643be424293 by Benjamin Peterson in branch 'default': add introspection to range objects (closes #9896) http://hg.python.org/cpython/rev/4643be424293 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13338] Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER
Changes by Petri Lehtinen pe...@digip.org: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13338] Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13338 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13326] make clean failed on OpenBSD
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 41ab1dfaf1d4 by Petri Lehtinen in branch '3.2': Remove __pycache__ directories correctly on OpenBSD http://hg.python.org/cpython/rev/41ab1dfaf1d4 New changeset f853a2cbd68b by Petri Lehtinen in branch 'default': Remove __pycache__ directories correctly on OpenBSD http://hg.python.org/cpython/rev/f853a2cbd68b -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13204] sys.flags.__new__ crashes
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why would we want to prevent users from creating new instances of FlagsType? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13204 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12163] str.count
Petri Lehtinen pe...@digip.org added the comment: This already seems fixed on 2.7, 3.2 and 3.3: ''.find('', None) 0 -- nosy: +petri.lehtinen resolution: - out of date status: open - closed versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12163 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Petri Lehtinen pe...@digip.org added the comment: The same issue exists for tuples: (1, 2, 3).index(2, None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must be integers or None or have an __index__ method -- components: +Interpreter Core nosy: +petri.lehtinen stage: - needs patch versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13349] Uninformal error message in index() and remove() functions
New submission from Petri Lehtinen pe...@digip.org: For example: (1, 2, 3).index(4) Traceback (most recent call last): File stdin, line 1, in module ValueError: tuple.index(x): x not in tuple The x not in tuple error message should be replaced with 4 is not in tuple. list.index() already does this (see #7252): [1, 2, 3].index(4) Traceback (most recent call last): File stdin, line 1, in module ValueError: 4 is not in list Although in #7252 it was claimed that no other place in stdlib has this error message, I found many occurences: Modules/_collectionsmodule.c:PyErr_SetString(PyExc_ValueError, deque.remove(x): x not in deque Modules/_elementtree.c:list.remove(x): x not in list Modules/_elementtree.c:list.remove(x): x not in list Modules/arraymodule.c:PyErr_SetString(PyExc_ValueError, array.index(x): x not in list); Modules/arraymodule.c:PyErr_SetString(PyExc_ValueError, array.remove(x): x not in list); Objects/abstract.c:sequence.index(x): x not in sequence); Objects/listobject.c:PyErr_SetString(PyExc_ValueError, list.remove(x): x not in list); Objects/tupleobject.c:PyErr_SetString(PyExc_ValueError, tuple.index(x): x not in tuple); There's also documentation and tests that depend on this actual error message: Doc/library/doctest.rst: ValueError: list.remove(x): x not in list Lib/test/test_xml_etree.py:ValueError: list.remove(x): x not in list #7252 was fixed in r76058, and it's quite a lot of code. I think it could be done more easily using PyUnicode_FromFormat() and the %R format. -- messages: 147109 nosy: petri.lehtinen priority: normal severity: normal status: open title: Uninformal error message in index() and remove() functions ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13349] Uninformal error message in index() and remove() functions
Changes by Petri Lehtinen pe...@digip.org: -- components: +Extension Modules, Interpreter Core type: - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7980] time.strptime not thread safe
Zsolt Kendi kzsoltkzs...@freemail.hu added the comment: I recognize the same problem problem at linux with 4 core 64 processor. The python version is 2.6.5 . Looks like occured randomly but maybe this is depend from thread sequence. -- nosy: +kzsolt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0f0eda4daac7 by Petri Lehtinen in branch '2.7': Accept None as start and stop parameters for list.index() and tuple.index() http://hg.python.org/cpython/rev/0f0eda4daac7 New changeset 5c1fcaf3cf1c by Petri Lehtinen in branch '3.2': Accept None as start and stop parameters for list.index() and tuple.index() http://hg.python.org/cpython/rev/5c1fcaf3cf1c New changeset c33aa14f4edb by Petri Lehtinen in branch 'default': Accept None as start and stop parameters for list.index() and tuple.index(). http://hg.python.org/cpython/rev/c33aa14f4edb -- nosy: +python-dev resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13350] Use PyUnicode_FromFomat instead of PyUnicode_Format for fixed formats
New submission from Amaury Forgeot d'Arc amaur...@gmail.com: A code simplification suggested by a comment in issue13349: Replace most usages of PyUnicode_Format (a.k.a. str.__mod__) by PyUnicode_FromFormat, which is easier to use from C: no need to build a tuple, and the format accept both C strings (%s) and Python strings (%S or %R) -- files: FromFormat.diff keywords: patch messages: 147112 nosy: amaury.forgeotdarc, petri.lehtinen priority: normal severity: normal status: open title: Use PyUnicode_FromFomat instead of PyUnicode_Format for fixed formats versions: Python 3.3 Added file: http://bugs.python.org/file23614/FromFormat.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13350 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Petri Lehtinen pe...@digip.org added the comment: Committed a fix for both list and tuple. I considered this a bug fix rather than a new feature based on discussion in #11828, especially msg133532, and applied the fix to 2.7 and 3.2, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The relevant code is in _PyEval_SliceIndex() in Python/ceval.c. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: [citation needed]. First, mutable objects with a global name (let’s not use variable for Python) are not unconditionally evil; see sys.path and sys.modules for example. Second, how concretely would you change that implementation? We need shared caches for functions in packaging.database. They should be built on demand, and should be cleared by higher-level libraries or applications when the filesystem has changed (after an installation or removal for example). With these constraints, do you have implementation ideas? I agree, we shouldn't have a knee-jerk reaction to global bindings - they definitely have their uses, and I'm sometimes driven to defend their use in logging. Since you ask, though - one possible approach might be: Have those bindings be instance variables in a Database class in database.py, and have a module-level binding to an instance of it. Then, tests can have their own instance which is thrown away aftereach test. This problem was not trivial to find, because it appears that test execution order may not be entirely deterministic: I couldn't see any other reason why the flag would have different values on different machines. I believe that you (Éric) had difficulty reproducing it. Perhaps we don't need to re-implement, but instead add more tests around cache invalidation and cache contents. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I think this fix was too hastily committed. 1) It was an API change. 2) It probably should have been done in _PyEval_SliceIndex(). Be careful. Don't rush to commit. Especially for backports. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Petri Lehtinen pe...@digip.org added the comment: 2) It probably should have been done in _PyEval_SliceIndex(). I saw that other code used the same approach as I used in the fix. The comment above _PyEval_SliceIndex() suggests it's used in other contexts too. It seems that 2.7 uses it to implement the SLICE opcode, while in 3.x it's only used to convert slice-like arguments. What do you suggest? Doing it in _PyEval_SliceIndex() in 2.7 is problematic, as we don't want x[None:2], right? :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: FTR, I haven't checked this on Ubuntu 32-bit. It's rather odd for the failure to be architecture-dependent. Are these two machines running different versions of Ubuntu, perhaps? They are (Ubuntu Natty 32-bit failing, Ubuntu Oneiric 64-bit passing). However, I don't believe the failure is directly architecture-related, but indirectly so. For example, test execution order might not be identical on all machines, depending for example on hash values and dict bucket sizes, which I would expect to be different on different machines for any number of reasons. In my limited testing, I found the following: Ubuntu Natty 32-bit - failed. Windows 7 32-bit - failed. Ubuntu Oneiric 64-bit - passed. Linux Mint Katya 11 64-bit (based on Ubuntu Natty) - passed. With non-deterministic test execution order combined with module-level data updated by tests, it can be hard to reproduce these failures - a bit like uninitialised data errors in C :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Nadeem Vawda nadeem.va...@gmail.com added the comment: How strange. I've had no problem reproducing the failures; they've occurred every time I've run test_packaging since the bug was opened (on both Ubuntu and Windows). And the Windows buildbots seem to be failing consistently as well... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Raymond Hettinger raymond.hettin...@gmail.com added the comment: The API in 2.7 shouldn't be changed. The error message can be fixed though. Also, it is not clear that the API should change even in 3.3. The list.index() method is not required to accept None. It is not different than other APIs that use PyArg_ParseTuple() with an i field for a start, stop, or step argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13340] list.index does not accept None as start or stop
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: str.index does accept None, though -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13316] build_py_2to3 does not convert when there was an error in the last run
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13317 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13309] test_time fails: time data 'LMT' does not match format '%Z'
Antoine Pitrou pit...@free.fr added the comment: I also get this error on Mageia. If this can't be fixed, the test should be skipped or removed. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13309 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13342] input() builtin always uses strict error handler
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 421c8e291221 by Antoine Pitrou in branch '3.2': Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode http://hg.python.org/cpython/rev/421c8e291221 New changeset 992ba03d60a8 by Antoine Pitrou in branch 'default': Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode http://hg.python.org/cpython/rev/992ba03d60a8 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13342] input() builtin always uses strict error handler
Antoine Pitrou pit...@free.fr added the comment: Committed. I hope the test won't disturb the buildbots. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13193] test_packaging and test_distutils failures
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: How strange. I've had no problem reproducing the failures; they've occurred every time I've run test_packaging since the bug was opened (on both Ubuntu and Windows). And the Windows buildbots seem to be failing consistently as well... On a given machine, if the failure occurs, it fails every time. I got failures on Ubuntu 32-bit and Windows 32-bit every time, too. One more data point: on OS X Leopard (32-bit), there were no failures at all in my testing. I only saw the tests pass when I tested on 64-bit Ubuntu variants (and OS X 32-bit). N.B. All my testing was on the pythonv branch - though I don't believe that had any bearing on the tests, as they also failed on the default branch (on Ubuntu Jaunty 32-bit, where I do maintenance for logging etc.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13351] Strange time complexity when creating nested lists
New submission from Jonas LM quak...@gmail.com: Consider the following snippets: def lists(n): start_time = time.time() lists = [None]*n for i in xrange(n): lists[i] = [None]*n for j in xrange(n): lists[i][j] = [] print time.time() - start_time def simple_lists(n): start_time = time.time() lists = [None]*n for i in xrange(n): lists[i] = [None]*n for j in xrange(n): lists[i][j] = False print time.time() - start_time Both of these snippets seem like they should run in O(n^2), right? Observe the following test runs: for i in [4000, 8000, 16000]: simple_lists(i) 2.11170578003 8.67467808723 34.0958559513 for i in [1000, 2000, 4000]: lists(i) 1.13742399216 7.39806008339 78.0808939934 While simple_lists() seem to run roughly in O(n^2), it seems like lists() runs in upwards of O(n^3) or worse! Something funky is going on, and I have no idea what. -- components: None messages: 147126 nosy: quakes priority: normal severity: normal status: open title: Strange time complexity when creating nested lists type: performance versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13351] Strange time complexity when creating nested lists
R. David Murray rdmur...@bitdance.com added the comment: In the case of 'lists' an object is being allocated each time through the inner loop. In the case of simple_lists, no such allocation is being done. Your timing issues are probably related to the memory allocation behavior of your system. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now 10.3 but 10.5 during configure
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Nick Coghlan ncogh...@gmail.com added the comment: I should probably update that posted recipe to my latest version (which adds excluded_files and excluded_dirs parameters). However, since I've been dealing with remote filesystems where os.listdir() and os.stat() calls from the local machine aren't possible lately, I also think we may need to reconsider how this is structured and look at the idea of building a more effective pipeline model that permits more efficient modes of interaction. Let's take 'os.walk' as the base primitive - the basis of the pipeline will always be an iterator that produces 3-tuples of a base name, a list of subdirectories and a list of files. The filtering pipeline elements will require that the underlying walk include topdown=True and pay attention to changes in the subdirectory list. Then consider the following possible pipeline elements: def filter_dirs(walk_iter, *include_filters, exclude_filters=()): def should_include(dirname): return any(fnmatch(dirname, include) for include in include_filters) def should_exclude(dirname): return any(fnmatch(dirname, include) for exclude in exclude_filters) for dirpath, subdirs, files in walk_iter: subdirs[:] = [subdir for subdir in subdirs if should_include(subdir) and not should_exclude(subdir)] yield dirpath, subdirs, files def filter_files(walk_iter, *include_filters, exclude_filters=()): def should_include(dirname): return any(fnmatch(dirname, include) for include in include_filters) def should_exclude(dirname): return any(fnmatch(dirname, include) for exclude in exclude_filters) for dirpath, subdirs, files in walk_iter: files[:] = [fname for fname in files if should_include(fname) and not should_exclude(fname)] yield dirpath, subdirs, files def limit_depth(walk_iter, depth): if depth 0: msg = Depth limit greater than 0 ({!r} provided) raise ValueError(msg.format(depth)) sep = os.sep for top, subdirs, files in walk_iter: yield top, subdirs, files initial_depth = top.count(sep) if depth == 0: subdirs[:] = [] break for dirpath, subdirs, files in walk_iter: yield dirpath, subdirs, files current_depth = dirpath.count(sep) - initial_depth if current_depth = depth: subdirs[:] = [] def detect_symlink_loops(walk_iter, onloop=None): if onloop is None: def onloop(path): msg = Symlink {!r} refers to a parent directory, skipping\n sys.stderr.write(msg.format(path)) sys.stderr.flush() for top, subdirs, files in walk_iter: yield top, subdirs, files real_top = os.path.abspath(os.path.realpath(top)) break for dirpath, subdirs, files in walk_iter: if os.path.islink(dirpath): # We just descended into a directory via a symbolic link # Check if we're referring to a directory that is # a parent of our nominal directory relative = os.path.relpath(dirpath, top) nominal_path = os.path.join(real_top, relative) real_path = os.path.abspath(os.path.realpath(dirpath)) path_fragments = zip(nominal_path.split(sep), real_path.split(sep)) for nominal, real in path_fragments: if nominal != real: break else: if not onloop(dirpath): subdirs[:] = [] continue yield dirpath, subdirs, files And pipeline terminators: def walk_dirs(walk_iter): for dirpath, subdirs, files in walk_iter: yield dirpath def walk_files(walk_iter): for dirpath, subdirs, files in walk_iter: for fname in files: yield os.path.join(dirpath, fname) def walk_all(walk_iter): for dirpath, subdirs, files in walk_iter: yield dirpath for fname in files: yield os.path.join(dirpath, fname) The pipeline terminators could then be combined with ordinary iterable consumers like comprehensions: base_walk = detect_symlink_loops(os.walk(os.path.abspath(base_dir, followlinks=True))) depth_limited_walk = limit_depth(base_walk, 2) filtered_walk = filter_dirs(filter_files(depth_limited_walk, *.py), *.pyp) tree_info = {path, os.stat(path) for path in walk_all(filtered_walk)} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Nick Coghlan ncogh...@gmail.com added the comment: This needs more thought - pypi package coming soon :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13351] Strange time complexity when creating nested lists
Antoine Pitrou pit...@free.fr added the comment: It's because of the cyclic garbage collector. If you call gc.disable() at the beginning of your benchmark, you'll see that runtimes get more similar in both cases. You can also use tuples instead of lists as much as possible, it will reduce pressure on the GC. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Antoine Pitrou pit...@free.fr added the comment: Nick, perhaps you want to have a look at http://hg.python.org/features/pathlib/ (it doesn't have a filter_walk equivalent but it could grow one :-)) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Nick Coghlan ncogh...@gmail.com added the comment: That's one of the nicer attempts I've seen at an object-oriented path library, but I have a core problem with OOP path APIs, and it relates to the Unicode encoding/decoding problem: the ultimate purpose of path objects is almost always to either pass them to the OS, or else to another application. That exchange will almost *always* happen as a plain string. So when your approach is based on a more sophisticated type internally, you end up having to be very careful about all of your system boundaries, making sure that paths are correctly being turned into Paths. However, one of my hopes for iterwalk will be that it *won't* care if the underlying walk iterator produces Path objects instead of ordinary strings, so long as those objects can be passed to fnmatch, os, etc and work correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13351] Strange time complexity when creating nested lists
Jonas LM quak...@gmail.com added the comment: Confirmed that this was caused by the garbage collector, as pitrou suspected. Thanks! -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13351 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13347] .py extension not auto added
Ned Deily n...@acm.org added the comment: A request for this change in behavior is already being tracked by Issue10364. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - IDLE: make .py default added extension on save ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13347 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10364] IDLE: make .py default added extension on save
Changes by Ned Deily n...@acm.org: -- nosy: +Kaleb702 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Add shutil.filter_walk
Nick Coghlan ncogh...@gmail.com added the comment: Initial version available at: https://bitbucket.org/ncoghlan/iterwalk/src I'll get it published to PyPI once the test suite is in a slightly better state (no filesystem based tests as yet). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13328] pdb shows code from wrong module
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13328 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: The entry in Misc/NEWS mentions the change in curses.tigetstr(), but actually curses.tparm() has been changed. Please fix that entry to avoid confusion. (curses.tigetstr() still expects a unicode string and returns a bytes string.) -- nosy: +Arfrever resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13309] test_time fails: time data 'LMT' does not match format '%Z'
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13309 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13352] tutorial section 9.3.3 documentation problem
New submission from Eli Bendersky eli...@gmail.com: User report on the docs@ list: - http://docs.python.org/tutorial/classes.html#instance-objects I think the counter attribute is mentioned for the first time in the example code, not in Instance of MyClass created above, i.e. class MyClass does not contain counter attribute. x.counter = 1 while x.counter 10: x.counter = x.counter * 2 print x.counter del x.counter Best Regards, Jussi Peltonen -- assignee: docs@python components: Documentation keywords: easy messages: 147137 nosy: docs@python, eli.bendersky priority: normal severity: normal status: open title: tutorial section 9.3.3 documentation problem versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13353] documentation problem in logging.handlers.TimedRotatingFileHandler for 2.7
New submission from Eli Bendersky eli...@gmail.com: User (Yoann Roman) report on docs@ maillist: The docs for logging.handlers.TimedRotatingFileHandler in Python 2.7 say that the utc keyword argument was added in 2.7: http://docs.python.org/library/logging.handlers.html#timedrotatingfilehandler This isn't correct, however, since it was available as of 2.6 (I verified the source as well): http://docs.python.org/release/2.6/library/logging.html#timedrotatingfilehandler It did appear to change to True/False in 2.7 instead of 0/1 in 2.6. I'd recommend changing it to indicate this or removing the fact that this was added in 2.7 altogether. -- assignee: docs@python components: Documentation keywords: easy messages: 147138 nosy: docs@python, eli.bendersky priority: low severity: normal status: open title: documentation problem in logging.handlers.TimedRotatingFileHandler for 2.7 versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13352] tutorial section 9.3.3 documentation problem
Ori Livneh ori.liv...@gmail.com added the comment: That's exactly the point: in Python, data attributes don't need to be declared in the class definition. -- nosy: +ori.livneh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13352] tutorial section 9.3.3 documentation problem
Eli Bendersky eli...@gmail.com added the comment: Yep, I agree, Ori. The paragraph immediately preceding the code sample says: Data attributes need not be declared; like local variables, they spring into existence when they are first assigned to [...] the following piece of code will print the value 16, without leaving a trace Which is what the code sample demonstrates. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13352] tutorial section 9.3.3 documentation problem
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13352 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10287] NNTP authentication should check capabilities
Nathan Clayton nathanclay...@gmail.com added the comment: By always sending capabilities at connection, some servers immediately throw an error. I've modified the class initialization to include an optional parameter to indicate if this should be disabled. -- keywords: +patch nosy: +Nathan.Clayton Added file: http://bugs.python.org/file23615/nntplib_optcapabilities.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10287 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8087] Unupdated source file in traceback
Oleg Oshmyan chor...@inbox.lv added the comment: I just want to note that the code might be edited not only while it is running it in the interactive interpreter but also while it is running as a standalone script. In this case the script naturally would not know to reload its own code nor allow the user to do it manually, and even if it would, some objects created from the old code would probably remain alive. Here is a simple shell script that causes Python to show a stack traceback with '# This is just a comment' as the offending line by launching it in the background and then overwriting the Python code. What happened in reality is that I launched a front-end tool for video transcoding I had written in Python and after a while tweaked the code while it was still running. When the actual encode finished, my (buggy) clean-up code raised an exception and I got a traceback saying it had been raised in a line that only had a comment in it. cat EOF proof.py import time time.sleep(5) raise Exception EOF python proof.py sleep 1 cat EOF proof.py # This is just a comment EOF sleep 5 -- nosy: +chortos ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8087 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13300] IDLE 3.3 Restart Shell command fails
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ce483d696c06 by Ned Deily in branch 'default': Issue #13300: Fix IDLE Restart Shell command failure introduced by http://hg.python.org/cpython/rev/ce483d696c06 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13300] IDLE 3.3 Restart Shell command fails
Changes by Ned Deily n...@acm.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com