[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread picomancer
New submission from picomancer: Try the following in your favorite Python version: import json json.loads(.5) On my Python (2.7.4 and 3.3.1 on Ubuntu Saucy Salamander), I get an exception. However, x = .5 is a valid Python number. With respect to the parsing of floats by the json

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Attached the patch to remove unused imports in pathlib. -- components: Library (Lib) files: remove_unused_import_in_pathlib.patch keywords: patch messages: 205081 nosy: pitrou, vajrasky priority: normal severity: normal status: open title: Remove unused

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: Here it is (Lib/test/test_pathlib.py, line 1240): def _check_resolve_relative(self, p, expected): q = p.resolve() self.assertEqual(q, expected) def _check_resolve_absolute(self, p, expected): q = p.resolve()

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think it would be better to adhere to the JSON spec, which doesn't allow numbers to start with a decimal point: http://json.org/ If we go this way, the documentation should at least be fixed; and, as you say, we could also add a unit test for it.

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___ Python-bugs-list

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Anthony Baire
Anthony Baire added the comment: The patch is fine, but it is hard to rely on it to prevent bugs from happening because that requires cooperation from all modules registering signal handlers. Anyway it facilitates reusing code that was not written for an event-driven context (and many will do

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset a6245b10e8b6 by Antoine Pitrou in branch 'default': Issue #19872: remove unused imports in pathlib. Patch by Vajrasky Kok. http://hg.python.org/cpython/rev/a6245b10e8b6 -- nosy: +python-dev ___ Python

[issue19872] Remove unused imports in pathlib

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19872 ___

[issue19800] Write more detailed framing tests

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c04427fff07 by Antoine Pitrou in branch 'default': Issue #19800: make the pickle framing tests more precise. http://hg.python.org/cpython/rev/1c04427fff07 -- nosy: +python-dev ___ Python tracker

[issue19800] Write more detailed framing tests

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed with offset replaced with pos. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19800

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it's not really a duplicate function (the code is the same, but the intent is different). I'm not sure it's worth deduplicating. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19873

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Strictly speaking b) is not a semantic change. Depending on your semantic definition of semantics. At any rate it is even less so than a) since the temporary list is hidden from view and the only side effect is additional memory usage. --

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree with Antoine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___ Python-bugs-list mailing

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: d), We could also simply issue a (documentation) warning, that the iterator methods of these dictionares are known to be fragile, and recommend that people use the keys(), values() and items() instead. --

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: d) sounds like a good enough resolution at this point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7105 ___

[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2013-12-03 Thread Vajrasky Kok
Vajrasky Kok added the comment: These functions are only being used in test_resolve_common. def test_resolve_common(self): P = self.cls p = P(BASE, 'foo') with self.assertRaises(OSError) as cm: p.resolve() self.assertEqual(cm.exception.errno,

[issue19717] resolve() fails when the path doesn't exist

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The readlink utility has different modes for canonization: -f, --canonicalize canonicalize by following every symlink in every component of the given name recursively; all but the last component must exist -e,

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: SA_RESTART doesn't need to be enforced. It's better to use it, but selectors and asyncio modules already handle EINTR error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19850

[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: Since 3.4 entered beta last week, it is now in feature freeze, so only bug fixes are allowed, unfortunately. Since I did the ld patch I didn't want to commit it before getting another developer to review it, and it looks as if it just dropped under everyone's

[issue19874] test_logging failures on Snow Leopard

2013-12-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: test_race in test_logging fails intermittently on the Snow Leopard buildbot: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/741 == ERROR: test_race

[issue19875] test_getsockaddrarg occasional failure

2013-12-03 Thread Antoine Pitrou
New submission from Antoine Pitrou: It's on the FreeBSD 10.0 buildbot: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1169 == ERROR: test_getsockaddrarg (test.test_socket.GeneralModuleTests)

[issue19665] test_logging fails with SMTPHandler timeout

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: I think the test is fragile, but I'll bump the timeout as suggested. -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19665 ___

[issue19717] resolve() fails when the path doesn't exist

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think every mode has use cases. Probably, but which ones are the most likely? A ternary flag leads to a clumsier API than a simple binary flag. -- ___ Python tracker rep...@bugs.python.org

[issue19665] test_logging fails with SMTPHandler timeout

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4c5fc9f08b4d by Vinay Sajip in branch '3.3': Issue #19665: Increased timeout for SMTPHandler test. http://hg.python.org/cpython/rev/4c5fc9f08b4d New changeset bfd45dc46569 by Vinay Sajip in branch 'default': Closes #19665: Merged fi from 3.3.

[issue19874] test_logging failures on Snow Leopard

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: I think this is the same as #19690. -- resolution: - duplicate status: open - closed superseder: - test_logging test_race failed with PermissionError ___ Python tracker rep...@bugs.python.org

[issue19869] BaseCookie does not complain if a non RFC compliant cookie header was given

2013-12-03 Thread R. David Murray
R. David Murray added the comment: RFCs and cookies don't have much to do with each other in real life. The 'httponly' flag bug was fixed in issue 16611. For backward compatibility reasons we can't start raising errors where we didn't raise them before, so if anything is going to be done it

[issue19870] Backport Cookie fix to 2.7 (httponly / secure flag)

2013-12-03 Thread R. David Murray
R. David Murray added the comment: I'm not sure why that fix was not backported, so I think it should be OK to do so. 3.2 is in security fix only mode. No one argued that it was a securty issue when it was fixed in 3.3. -- nosy: +r.david.murray

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Issue for the failure to detect a native venv: https://github.com/pypa/pip/issues/1358 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734 ___

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Issue for the lack of attention paid to sys.flags.ignore_environment: https://github.com/pypa/pip/issues/1359 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- priority: deferred blocker - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19734 ___

[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Relevant pip issue: https://github.com/pypa/pip/issues/1165 -- nosy: +larry priority: high - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19744

[issue19347] PEP 453 implementation tracking issue

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 19766 covers the fact that the vendored urllib3 needs to be updated in order to handle the case where Python is built without threading support. -- ___ Python tracker rep...@bugs.python.org

[issue19347] PEP 453 implementation tracking issue

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: Upgrading to release blocker status, since we'd prefer to have everything we can sorted before beta 2 -- nosy: +larry priority: normal - release blocker ___ Python tracker rep...@bugs.python.org

[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module

2013-12-03 Thread Donald Stufft
Donald Stufft added the comment: The urllib3 in requests VCS was updated, I just need to bother Kenneth to make a new release of requests or update pip to an unreleased requests. -- ___ Python tracker rep...@bugs.python.org

[issue19744] test_venv fails if SSL/TLS is not available

2013-12-03 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- title: ensurepip should refuse to install pip if SSL/TLS is not available - test_venv fails if SSL/TLS is not available ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19744

[issue19690] test_logging test_race failed with PermissionError

2013-12-03 Thread Vinay Sajip
Vinay Sajip added the comment: Unfortunately, the race condition can't be removed completely - it was reduced by the patch in #14632 but could not be eliminated altogether. So this test can fail sporadically - tweaking the timeouts might give some temporary respite, but doesn't guarantee the

[issue19690] test_logging test_race failed with PermissionError

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8fe3022af4b3 by Vinay Sajip in branch 'default': Added some diagnostics to help with #19690. http://hg.python.org/cpython/rev/8fe3022af4b3 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Mark Dickinson
Mark Dickinson added the comment: In context, the doc is correct: parse_float, if specified, will be called with the string of every JSON float to be decoded. By default, this is equivalent to float(num_str). IIUC, parse_float only comes into play once the JSON source has already been

[issue9709] test_distutils warning: initfunc exported twice on Windows

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97fb852c5c26 by Stefan Krah in branch 'default': Issue #9709: Stop adding PyInit_ + module_name' to export_symbols. This is http://hg.python.org/cpython/rev/97fb852c5c26 -- nosy: +python-dev ___ Python

[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-12-03 Thread Nick Coghlan
Nick Coghlan added the comment: 1358 (failing to detect native virtual environments) will be resolved upstream, but for 1359 (telling pip to ignore the environment variables), I've decided I agree with Paul's suggestion on the pip issue that it makes sense for venv to just strip all

[issue9709] test_distutils warning: initfunc exported twice on Windows

2013-12-03 Thread Stefan Krah
Stefan Krah added the comment: Éric, thanks for taking a look. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9709

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread STINNER Victor
New submission from STINNER Victor: I remember a discussion about EBADF, but I don't remember the conclusion. The documentation of the asyncio doesn't explain the behaviour of selectors when a file/socket is closed, without unregistering it from the selector. I should be explicitly

[issue19744] test_venv fails if SSL/TLS is not available

2013-12-03 Thread Piotr Dobrogost
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19744 ___ ___

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Ned Batchelder
Ned Batchelder added the comment: There are other forms of numbers allowed by Python that are not allowed by JSON: 001.1 Oddly, with all of the strictness in JSON, the exponent-marker e can be upper- or lower-case: 1e1 and 1E1 are both valid JSON. -- nosy: +nedbat

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Radomir Dopieralski
Radomir Dopieralski added the comment: I prepared a proof of concept solution at: https://bitbucket.org/thesheep/cpython-lru_cache-weakref/commits/66c1c9f3256785552224ca177ed77a8312de6bb8 -- hgrepos: +215 ___ Python tracker rep...@bugs.python.org

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Please answer this question. Under what circumstances can a signal handler interrupt a blocking system call in a thread that is not the main thread? -- ___ Python tracker rep...@bugs.python.org

[issue19864] multiprocessing Proxy docs need locking semantics explained

2013-12-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: From what I remember a proxy method will be thread/process-safe if the referent's corresponding method is thread safe. It should certainly be documented that the exposed methods of a proxied object should be thread-safe. --

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the behavior is at least different for each type of polling system calls, and possibly also for different platforms. It would be good to describe at least all the different possible behaviors. -- ___

[issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Note: it is possible that SO_REUSEPORT is defined yet not implemented (and you'll get an OSError when using it). -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16594

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not sure I understand the hesitation about backporting the Python 3 solution. We're acknowledging it's a bug, so the fix is not a feature. The Python 3 solution is the future. So why not fix it? -- ___ Python

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: 2013/12/3 Guido van Rossum rep...@bugs.python.org: Please answer this question. Under what circumstances can a signal handler interrupt a blocking system call in a thread that is not the main thread? There is no guarantee that the signal handler is called in

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Vajrasky Kok
New submission from Vajrasky Kok: You must run this test as administrator. C:\Users\vajrasky\Code\cpythonPCbuild\python.exe Lib\test\test_pathlib.py ..s..s..s..s.s.E

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Wow, thank you. It's a pity none of the Windows buildbots runs in administrator mode. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19877 ___

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 076824de7650 by Antoine Pitrou in branch 'default': Issue #19877: fix regression in test_pathlib when Windows has symlink support available (i.e. in administrator mode). http://hg.python.org/cpython/rev/076824de7650 -- nosy: +python-dev

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now committed. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19877 ___

[issue19871] json module won't parse a float that starts with a decimal point

2013-12-03 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19871 ___ ___ Python-bugs-list mailing list

[issue19833] asyncio: patches to document EventLoop and add more examples

2013-12-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19833 ___

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2013-12-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18699 ___ ___ Python-bugs-list

[issue19875] test_getsockaddrarg occasional failure

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: This test is inherently subject to a race condition: port = support.find_unused_port() [...] try: self.assertRaises(OverflowError, sock.bind, (host, big_port)) self.assertRaises(OverflowError, sock.bind,

[issue19866] tests aifc, sunau and wave failures on a fresh Win64 installation

2013-12-03 Thread Zachary Ware
Zachary Ware added the comment: Francis, would you like to work on a patch for this? The change should go in Tools/msi/msi.py, if I'm not mistaken. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19866

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I see no point in keeping this open. -- resolution: - works for me stage: - committed/rejected status: open - closed type: enhancement - behavior ___ Python tracker rep...@bugs.python.org

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: Well, unregister() documentation currently contains this: .. method:: unregister(fileobj) Unregister a file object from selection, removing it from monitoring. A file object shall be unregistered prior to being closed. I'm not sure

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I think we should give the reader some kind of hint, since a bug in this area may cause a lot of pain when it has to be debugged on porting from a system where the issue is silent to one where it causes a crash. These docs (unlike a PEP) are not a formal

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: (I don' like the idea of documenting possible behaviors, because it's non-portable, and really might change in a future version). The description doesn't need to be precise, you can just say depending on the platform, closing a file descriptor while

[issue19878] PyFile_DecUseCount() SIGSEGV

2013-12-03 Thread Matthew Bergin
New submission from Matthew Bergin: [level@removed fuzz]# cat pyfile.py import bz2 obj = bz2.BZ2File('/tmp/fileName') obj.__init__(fileName) obj.__reduce__ [level@removed fuzz]# gdb --args python pyfile.py GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free Software

[issue19879] PyCFunction_NewEx() SIGABRT

2013-12-03 Thread Matthew Bergin
New submission from Matthew Bergin: [level@removed fuzz]# cat PyCFunction.py # # PyCFunction_NewEx crach poc (sigabrt) # import imageop imageop.rgb82rgb(u%J8CBej uFBi-,True,8.36) imageop.grey2grey(None,5,uCRi) [level@removed fuzz]# gdb --args python PyCFunction.py GNU gdb (GDB) Red Hat

[issue19878] PyFile_DecUseCount() SIGSEGV

2013-12-03 Thread Matthew Bergin
Changes by Matthew Bergin mber...@coresecurity.com: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19878 ___ ___ Python-bugs-list

[issue19877] test_resolve_dot of test_pathlib.py fails on Windows Vista

2013-12-03 Thread Brian Curtin
Brian Curtin added the comment: My build slave ran as admin in order to make sure symlinks were covered, but I don't have the hardware anymore. I'll see if I can get another machine up and running. -- nosy: +brian.curtin ___ Python tracker

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: The patch is fine, but it is hard to rely on it to prevent bugs from happening because that requires cooperation from all modules registering signal handlers. Once again, that's why the bug report says *limit* EINTR occurrences. We all know this

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I've harassed you enough. Sorry. Go ahead and commit this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19850 ___

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: I think you're looking for the discussion in issue 19017. IIRC the conclusion is that not only do you not get the same error everywhere, but you get it at different points -- sometimes register() of a bad FD passes and then [Selector.]select() fails, other

[issue19878] PyFile_DecUseCount() SIGSEGV

2013-12-03 Thread Ned Deily
Ned Deily added the comment: Sorry, the Python 2.6 series is now officially retired. As of 2.6.9, All official maintenance for Python 2.6, including security patches, has ended. If you can reproduce the problem with a currently supported version of Python, such as Python 2.7.6 or 3.3.3,

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file32950/66c1c9f32567.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19859 ___

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ncoghlan, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19859 ___ ___

[issue19138] doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists

2013-12-03 Thread Tim Peters
Tim Peters added the comment: I agree this is a bug, and at a first scan your fix looks good. I'll make it a priority to pay more attention to it now ;-) -- assignee: - tim.peters ___ Python tracker rep...@bugs.python.org

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19859 ___ ___

[issue19862] Unclear xpath caching for custom namespaces

2013-12-03 Thread Stefan Behnel
Stefan Behnel added the comment: This is a duplicate of issue17011. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19862 ___ ___

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Weak references make no sense in most cases when arguments disappear just after function call. For the self argument of a method it makes more sense. Perhaps lru_cache can return not a function, but a descriptor. This will allow implement special processing

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- type: resource usage - enhancement versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19859

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps following technique can be used to prevent object's life prolongation: def spam(self, *args, **kwargs): @lru_cache(maxsize=20) def spam(foo, bar=1, *, baz=None): ... self.spam = spam return self.spam(*args, **kwargs)

[issue19859] functools.lru_cache keeps objects alive forever

2013-12-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this is an appropriate use of an LRU cache. There are other ways to freeze a method return value (typically by storing the result in an instance). Here's one way of doing it (taken from the source code for Itty

[issue19878] bz2.BZ2File.__init__() cannot be called twice

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the issue with Python 2.7. The problem is that BZ2File.__init__() doesn't reset the object when __init__() is called twice. For example, the following script fails with too many open files error, before the previous file is not called: ---

[issue19879] imageop: bug in error handler

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: I cannot test the issue, imageop cannot be compiled on 64-bit system and is not present in Python 3. (I don't have access to 32-bit system right now.) Can you reproduce the issue with Python 2.7? I'm interested by your fuzzer, is it public? -- nosy:

[issue19878] bz2.BZ2File.__init__() cannot be called twice

2013-12-03 Thread Matthew Bergin
Matthew Bergin added the comment: I was fuzzing the interpreter otherwise it would init itself -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19878 ___

[issue19879] imageop: bug in error handler

2013-12-03 Thread Matthew Bergin
Matthew Bergin added the comment: I am going to test it against 2.7 a little later on this afternoon. I typically host all of the code I write at https://github.com/levle but atm the github repo I use to host the project is private. Once I work out some of the kinks I will set it to Public.

[issue19879] imageop: bug in error handler

2013-12-03 Thread Ned Deily
Ned Deily added the comment: On 2.7 tip, it fails up front with a TypeError: File /home/nad/PyCFunction.py, line 5, in module imageop.rgb82rgb(u%J8CBej uFBi-,True,8.36) TypeError: integer argument expected, got float [18330 refs] -- nosy: +ned.deily

[issue19879] imageop: bug in error handler

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: I typically host all of the code I write at https://github.com/levle but atm the github repo I use to host the project is private. Once I work out some of the kinks I will set it to Public. I worked on a Python fuzzer some years ago and fixed a lot of similar

[issue19879] imageop: bug in error handler

2013-12-03 Thread Matthew Bergin
Matthew Bergin added the comment: Sweet, I will check it out -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19879 ___ ___ Python-bugs-list

[issue19817] tracemalloc add a memory limit feature

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: This feature cannot be used without a reliable PyErr_NoMemory(): I add issue #19835 as a dependency. -- dependencies: +Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted ___ Python

[issue19827] Optimize socket.settimeout() and socket.setblocking(): avoid syscall

2013-12-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +gvanrossum, neologix, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19827 ___

[issue19879] imageop: bug in error handler

2013-12-03 Thread Ned Deily
Ned Deily added the comment: @Victor: On 2.6, it gets a DeprecationWarning. On 2.7, that is now a TypeError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19879 ___

[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: Kristján Only that issue #10517 mentions reasons to keep the old behavior, specifically http://bugs.python.org/issue10517#msg134573 (...) @Kristján: The behaviour of PyThread_set_key() discussed in this issue is unrelated to the pthread bug related to fork()

[issue19878] bz2.BZ2File.__init__() cannot be called twice

2013-12-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: It appears that this *does* affect 2.7 (though not 3.2, 3.3 or 3.4, fortunately): ~/src/cpython/2.7☿ gdb --ex run --args ./python -c 'import bz2; obj = bz2.BZ2File(/dev/null); obj.__init__()' «... snip banner ...» Starting program:

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: Guido van Rossum added the comment: I think you're looking for the discussion in issue 19017. IIRC the conclusion is that not only do you not get the same error everywhere, but you get it at different points -- sometimes register() of a bad FD

[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: STINNER Victor added the comment: Kristján Only that issue #10517 mentions reasons to keep the old behavior, specifically http://bugs.python.org/issue10517#msg134573 (...) @Kristján: The behaviour of PyThread_set_key() discussed in this issue is

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread STINNER Victor
STINNER Victor added the comment: import selectors, os r,w=os.pipe() s=selectors.SelectSelector() s.register(r, selectors.EVENT_READ) SelectorKey(fileobj=3, fd=3, events=1, data=None) os.close(r) os.close(w) s.unregister(r) SelectorKey(fileobj=3, fd=3, events=1, data=None)

[issue8075] Windows (Vista/7) install error when choosing to compile .py files

2013-12-03 Thread Ethan Furman
Ethan Furman added the comment: Just tried installing 2.6.6 on Windows 7 with compile checked and make default unchecked and did not observe any problems (although it did scroll by at high speed, and the windows didn't stay open for me to peruse). However, since we are no longer releasing

[issue19138] doctest.IGNORE_EXCEPTION_DETAIL doesn't match when no detail exists

2013-12-03 Thread Tim Peters
Tim Peters added the comment: On second thought, I don't want to use a regexp for this. The mandatory colon _was_ a kind of absolute wall, and the various instances of [^:] exploited that to avoid unintended matches. But possibly dotted name followed possibly by a colon is straightforward to

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Guido van Rossum
Guido van Rossum added the comment: Heh, I'd forgotten the behavior of unregister(). It seems that there are two layers to the behavior -- if this FD was never register()ed it will raise; if it was register()ed but has since been close()d it may raise. For the higher-level APIs in asyncio I

  1   2   >