[issue16595] Add resource.prlimit
Roundup Robot added the comment: New changeset 87d41a5a9077 by Christian Heimes in branch 'default': Issue #16595: prlimit() needs Linux kernel 2.6.36+ http://hg.python.org/cpython/rev/87d41a5a9077 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16595] Add resource.prlimit
Christian Heimes added the comment: The buildbot is Linux-2.6.35-vs2.3.0.36.32-gentoo-i686-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.1 but prlimit() requires 2.6.36+. I didn't expect to see a combination of glibc with prlimit() and Kernel without prlimit(). According to man prlimit it's not suppose to fail with ENOSYS, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16595] Add resource.prlimit
STINNER Victor added the comment: Or we should extend with supress(OSerror, errno=errno.ENOSYS): ... :-) (Just kidding, ignored tests must be marked as skipped.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
New submission from Claudiu.Popa: This problem occurred in issue19282. Basicly, dbm.dumb is not consistent with dbm.gnu and dbm.ndbm when the database is closed, as seen in the following: import dbm.dumb as d db = d.open('test.dat', 'c') db.close() db.keys() Traceback (most recent call last): File stdin, line 1, in module File /tank/libs/cpython/Lib/dbm/dumb.py, line 212, in keys return list(self._index.keys()) AttributeError: 'NoneType' object has no attribute 'keys' vs import dbm.gnu as g db = g.open('test.dat', 'c') db.close() db.keys() Traceback (most recent call last): File stdin, line 1, in module _gdbm.error: GDBM object has already been closed Attaching a patch. -- components: Library (Lib) messages: 201209 nosy: Claudiu.Popa priority: normal severity: normal status: open title: dbm.dumb should be consistent when the database is closed type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Eric Snow added the comment: Here's a patch just for the changes to the import page in the language reference. It's not perfect, but should represent the target pretty closely. -- nosy: +ncoghlan Added file: http://bugs.python.org/file32348/import-system-reference.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Changes by Claudiu.Popa pcmantic...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file32347/dbm_dumb.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19384] test_py_compile fails with OSError on FreeBSD for root user
Christian Heimes added the comment: The patch looks good to me. I'm curious, is a root user on FreeBSD allowed to create files inside a read-only directory? -- nosy: +christian.heimes stage: - patch review type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file32348/import-system-reference.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Eric Snow added the comment: Let's try that again with the proper diff. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19384] test_py_compile fails with OSError on FreeBSD for root user
Claudiu.Popa added the comment: Yes, you can create files in a read-only directory if you are root, that's why os.chmod(directory, stat.S_IREAD is redundant there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Changes by Eric Snow ericsnowcurren...@gmail.com: Added file: http://bugs.python.org/file32349/import-system-reference.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
Christian Heimes added the comment: The issue hasn't seen an update for over two years. Were you able to solve the issue? -- nosy: +christian.heimes status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19358] Integrate Argument Clinic into CPython build
Antoine Pitrou added the comment: Patches welcome! I have bigger fish to fry. That doesn't solve the why question. You wrote the code and it probably takes you two minutes to make a fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19358 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19384] test_py_compile fails with OSError on FreeBSD for root user
Roundup Robot added the comment: New changeset e7b97822110f by Christian Heimes in branch 'default': Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa. http://hg.python.org/cpython/rev/e7b97822110f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19384] test_py_compile fails with OSError on FreeBSD for root user
Christian Heimes added the comment: The test also fails for root user on Linux: $ sudo ./python Lib/test/test_py_compile.py .F. == FAIL: test_exceptions_propagate (__main__.PyCompileTests) -- Traceback (most recent call last): File Lib/test/test_py_compile.py, line 92, in test_exceptions_propagate py_compile.compile(self.source_path, self.pyc_path) AssertionError: OSError not raised -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19384 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18404] Memory leak in gdbmmodule
Christian Heimes added the comment: The problem is already fixed in 3.3 and 3.4. Thank you nevertheless! :) -- nosy: +christian.heimes resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18404 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2552] test_ctypes failed Python 2.6a2 Solaris 10 SUN C
Changes by Christian Heimes li...@cheimes.de: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2552 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers
Roundup Robot added the comment: New changeset 19b512bfc8d2 by Ned Deily in branch '2.7': Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/19b512bfc8d2 New changeset 5ff4f0100a40 by Ned Deily in branch '3.3': Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+ http://hg.python.org/cpython/rev/5ff4f0100a40 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15663 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19019] Investigate using Apple clang for building OS X installers
Roundup Robot added the comment: New changeset 323f1dcceb73 by Ned Deily in branch '2.7': Issue #19019: Change the OS X installer build script to use CFLAGS instead http://hg.python.org/cpython/rev/323f1dcceb73 New changeset 689b5c2d6959 by Ned Deily in branch '3.3': Issue #19019: Change the OS X installer build script to use CFLAGS instead http://hg.python.org/cpython/rev/689b5c2d6959 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19019 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1584] Mac OS X: building with X11 Tkinter
Roundup Robot added the comment: New changeset e7474d4d85ca by Ned Deily in branch '2.7': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/e7474d4d85ca New changeset d7662958b27a by Ned Deily in branch '3.3': Issue #1584: Provide options to override default search paths for Tcl and Tk http://hg.python.org/cpython/rev/d7662958b27a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1584 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1516] make _ctypes work with non-gcc compilers
Changes by Christian Heimes li...@cheimes.de: -- status: open - languishing versions: +Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1516 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10284] NNTP should accept bytestrings for username and password
Changes by Christian Heimes li...@cheimes.de: -- versions: +Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10284 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1274324] 'setup.py install' fails on linux from read-only storage
Changes by Christian Heimes li...@cheimes.de: -- status: open - languishing versions: +Python 3.3, Python 3.4 -3rd party, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1274324 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1584] Mac OS X: building with X11 Tkinter
Ned Deily added the comment: Committed to default for release in 3.4.0. With the consent of the release managers, this change has been backported to 2.7 (for release in 2.7.6) and 3.3 (for 3.3.3) in support of Issue15663. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1584 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19273] Update PCbuild/readme.txt
Roundup Robot added the comment: New changeset 212b4b61fa05 by Tim Golden in branch 'default': Closes issue #19273: clean up the pcbuild readme.txt (Patch by Zachary Ware) http://hg.python.org/cpython/rev/212b4b61fa05 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19273 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Nick Coghlan added the comment: Thanks, that looks pretty good - so much less work for loaders to do. After this, we may even be able to finally fix the circular import bug and the one where submodule imports succeed but the overall package import fails. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
New submission from Christian Heimes: The test seems to be unstable on some build bots: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/5271/steps/test/logs/stdio == FAIL: test_interrupted_retry (test.test_selectors.EpollSelectorTestCase) -- Traceback (most recent call last): File /var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_selectors.py, line 299, in test_interrupted_retry self.assertLess(time() - t, 2.5) AssertionError: 105.86884237639606 not less than 2.5 -- Ran 58 tests in 127.113s -- assignee: neologix components: Tests messages: 201225 nosy: christian.heimes, neologix priority: normal severity: normal stage: needs patch status: open title: selectors test_interrupted_retry is flaky type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19273] Update PCbuild/readme.txt
Tim Golden added the comment: Done. Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19273 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19380] Optimize parsing of regular expressions
Serhiy Storchaka added the comment: ### regex_compile ### Min: 2.897919 - 2.577488: 1.12x faster Avg: 3.066306 - 2.681966: 1.14x faster Significant (t=26.77) Stddev: 0.08789 - 0.05085: 1.7283x smaller -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19380 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers
Roundup Robot added the comment: New changeset 66398e1307f4 by Tim Golden in branch 'default': Issue4905: use INVALID_FILE_ATTRIBUTES where appropriate. (Patch by Ulrich Eckhardt) http://hg.python.org/cpython/rev/66398e1307f4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4905 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers
Tim Golden added the comment: Fixed on tip. Thanks for the issue and the original patch. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4905 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5717] os.defpath includes unix /bin on windows
Tim Golden added the comment: This is, in principle, a backwards-incompatible change as any code will stop working which relies on exec* running useful tools in c:\bin. (I have a c:\tools which is basically the same thing). Frankly, I'm -0 on changing it; it does no real harm that I can see. If we do decide to ditch it, I'd only do it for the current release and not backport. -- versions: -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5717 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat
Breinjhel Mata added the comment: Hi this bug still exist in Python 3.3.2. seems like a bug in cygwincompiler.py but Im using MinGW. Why is it using cygwincompiler? -- nosy: +breinjhel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2698 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19387] Explain and test the sre overlap table
New submission from Antoine Pitrou: Since I had to understand this while reviewing code, here is a patch making things clearer. (I tried to get the docstring right :-)) -- components: Library (Lib), Tests files: overlap.patch keywords: patch messages: 201232 nosy: pitrou, serhiy.storchaka, tim.peters priority: low severity: normal stage: patch review status: open title: Explain and test the sre overlap table type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file32350/overlap.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19387 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18685] Restore re performance to pre-PEP393 level
Antoine Pitrou added the comment: Posted review on Rietveld. See also issue #19387. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19388] Inflated download counts
New submission from Dustin Oprea: Noah recommended that I approach the distutils mailing list to report a potential PyPI problem. I can't seem to find a webpage for the distutils list, so I'm posting an official bug. I have a few packages on PyPI, and I often find my counts immediately taking hold, and, for the more useful projects, skyrocketing. However, I recently started a service that requires membership. In the last month, PyPI reports 3000 downloads of the client, yet Google Analytics only reports a handful of visits to the website. I have even less membership signups (as expected, so soon after launch). Why are the download counts so inflated? Obviously, they're very misleading and limited if they don't ignore spurious visitors (like robots). What has to be done to get this to be accurate? I've included two screenshots of PyPI and GA. -- assignee: eric.araujo components: Distutils messages: 201234 nosy: dsoprea, eric.araujo, tarek priority: normal severity: normal status: open title: Inflated download counts type: enhancement Added file: http://bugs.python.org/file32351/inflated_counts.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19388 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19388] Inflated download counts
Antoine Pitrou added the comment: Dustin: see https://mail.python.org/mailman/listinfo/distutils-sig -- nosy: +pitrou resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19388 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16595] Add resource.prlimit
Charles-François Natali added the comment: I didn't expect to see a combination of glibc with prlimit() and Kernel without prlimit(). According to man prlimit it's not suppose to fail with ENOSYS, too. Yeah, we've seen this several times on some buildbots. Note that actually, any syscall can fail with ENOSYS: the configure check just checks that the libc exposes the wrapper library, but when the libc wrapper makes the actual syscall, the kernel can return -ENOSYS if it doesn't implement the syscall. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16595 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
Charles-François Natali added the comment: This failure doesn't make sense: whether SIGALRM is delivered or not, epoll() should time out after 2 seconds, not 105s. What's more, here's another test_subprocess failure: == ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCase) -- Traceback (most recent call last): File /var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_subprocess.py, line 993, in test_wait_timeout self.assertEqual(p.wait(timeout=3), 0) File /var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/subprocess.py, line 1514, in wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['/var/lib/buildslave/3.x.murray-gentoo-wide/build/python', '-c', 'import time; time.sleep(0.3)']' timed out after 3 seconds Even more strange, a test_asyncio failure: == FAIL: test_interrupted_retry (test.test_selectors.EpollSelectorTestCase) -- Traceback (most recent call last): File /var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_selectors.py, line 299, in test_interrupted_retry self.assertLess(time() - t, 2.5) AssertionError: 105.86884237639606 not less than 2.5 asyncio uses selectors as backend, so let's admit the test fails, but what's really surprising is that the timeout is *exactly* the same, up to the last digit. Something fishy is going on: David, did something change recently on that buildbot? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
Antoine Pitrou added the comment: Flaky VM clock perhaps? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12340] Access violation when using the C version of the io module
OscarL added the comment: I can't reproduce the access violation on Windows, using Python 2.7.3. Using the test_bufio.py script by santa4nt, I can see that the fail still happens. As Santoso Wijaya (santa4nt) said in a previous comment: The `write(data)` method is getting a `memoryview` object, thus the test code should be using `data.tobytes()` instead of using `bytes(data)`. If we introduce that logic on the test_bufio.py script it passes. The thing is that if we, instead of doing `import io` (the C version of the module) we do `import _pyio as io` (the pure Python version) the FAIL does not appears at all in the original script! That difference (`write` might receive a `memoryview` object if using the C version of this module) is not documented anywhere. It should, if that's the expected behavior [*], and the code using the io module is responsible for using .tobytes() instead of bytes(). [*] Why _pyio.py behaves differently? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12340 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
Charles-François Natali added the comment: Flaky VM clock perhaps? Yeah, thought about that, but here we see *exactly* the same value for two time intervals (using time.monotonic()), computed over different test suite runs. I'd expected something more erratic... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
R. David Murray added the comment: The only change on the buildbot for some months now was increasing the size of the in-memory /tmp filesystem, which I did yesterday. That also involved a reboot, though, and it is conceivable that there were software changes made since the last reboot and before this one. I don't *think* there were, but I can't promise it. No kernel changes, though, for sure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19386] selectors test_interrupted_retry is flaky
Charles-François Natali added the comment: Could you try to run the test in a loop under strace (strace -ttTf) ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19386 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19358] Integrate Argument Clinic into CPython build
Larry Hastings added the comment: For a long time it was actually 3.4+ only. I was depending on a particular AST node that wasn't exposed to Python until 3.4 trunk. But that went away, and I tried it with 3.3 and it worked fine, so I labeled it 3.3+. For all I know it works fine under 3.1, never tried it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19358 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Brett Cannon added the comment: I've added a review -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19389] find_file might return a different directory than the tested file
New submission from Mathieu Virbel: With Maverick OSX (latest version), there is no /usr/include/zlib.h anymore. If you try to compile Python with -sysroot, it trigger a error message: error: /usr/include/zlib.h: No such file or directory The issue is in setup.py, where find_file is checking the existence of a filename, but if the filename has been found in a sysroot, it will return the path _without_ the sysroot. In this case (zlib), find_file correctly find the zlib.h in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/zlib.h, but return /usr/include, and then the setup.py open '/usr/include/zlib.h', which fail. -- components: Build files: fix-setup-find-file-path.patch keywords: patch messages: 201245 nosy: Mathieu.Virbel priority: normal severity: normal status: open title: find_file might return a different directory than the tested file type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file32352/fix-setup-find-file-path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19389 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19390] clinic.py: unhandled syntax error
New submission from Stefan Krah: The attached syntax error should probably be handled by clinic.py. -- components: Demos and Tools files: syntax-err-1.patch keywords: patch messages: 201246 nosy: skrah priority: normal severity: normal status: open title: clinic.py: unhandled syntax error versions: Python 3.4 Added file: http://bugs.python.org/file32353/syntax-err-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19390] clinic.py: unhandled syntax error
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Nick Coghlan added the comment: The problem we're trying to solve is CPython *silently* breaking subclass invariants, which is what the concrete APIs currently do. At the moment, trying to swap out dicts with ordered dicts in various places will corrupt the ordered dict instead of calling the appropriate subclass methods or throwing a type error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Antoine Pitrou added the comment: The problem we're trying to solve is CPython *silently* breaking subclass invariants, which is what the concrete APIs currently do. To be clear: the problem is with CPython calling the concrete APIs when it shouldn't, rather than with the concrete APIs not behaving properly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Nick Coghlan added the comment: On 26 Oct 2013 02:18, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou added the comment: The problem we're trying to solve is CPython *silently* breaking subclass invariants, which is what the concrete APIs currently do. To be clear: the problem is with CPython calling the concrete APIs when it shouldn't, rather than with the concrete APIs not behaving properly. The boilerplate required to use them correctly renders them broken in my view, particularly when they silently corrupt internal subclass state when misused instead of throwing an exception. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19390] clinic.py: unhandled syntax error
Larry Hastings added the comment: You're proposing that Clinic allow = ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Antoine Pitrou added the comment: To be clear: the problem is with CPython calling the concrete APIs when it shouldn't, rather than with the concrete APIs not behaving properly. The boilerplate required to use them correctly renders them broken in my view, particularly when they silently corrupt internal subclass state when misused instead of throwing an exception. IMO the boilerplate should actually be included inside the abstract APIs, so as to automatically enable optimized shortcuts when possible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3
New submission from Zachary Ware: As discussed in issue19273, here are a pair of patches that correct factual errors in PCbuild/readme.txt in both 2.7 and 3.3. The 3.3 patch makes the following changes: - Remove Win2k mentions, it is not supported (Tcl nmake command also adjusted) - MSVCRT9 - MSVCRT10 - SQLite 3.7.4 - 3.7.12, remove (see below) with nothing to see - .vcproj - .vcxproj, all occurrences - _bz2.vcxproj isn't as magical as it was made out to be, and it can clean itself - nasmw - nasm - Remove untrue part of Building for Itanium section - Update msdn link - .vsprops - .props - Trim trailing space Due to the large number of lines in the diff due to trailing space, I'll also be attaching a patch created by `hg diff -w` for ease of review. -- assignee: docs@python components: Documentation, Windows files: pcbuild_readme-3.3.diff keywords: patch messages: 201253 nosy: brian.curtin, christian.heimes, docs@python, ezio.melotti, loewis, python-dev, tim.golden, zach.ware priority: normal severity: normal status: open title: Fix PCbuild/readme.txt in 2.7 and 3.3 type: enhancement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32354/pcbuild_readme-3.3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19391 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16803] Make test_import test_importlib run tests under both _frozen_importlib and importlib._bootstrap
Roundup Robot added the comment: New changeset becc0a488189 by Brett Cannon in branch 'default': Issue #16803: Stop having test.test_importlib.abc ABCs inherit from http://hg.python.org/cpython/rev/becc0a488189 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16803 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file32357/pcbuild_readme-2.7.diff-w ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19391 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file32355/pcbuild_readme-3.3.diff-w ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19391 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19391] Fix PCbuild/readme.txt in 2.7 and 3.3
Zachary Ware added the comment: The 2.7 patch makes the following changes: - python30.dll - python27.dll - remove (see below) from _bsddb and _sqlite3 which have nothing to see below - bz2.vcproj isn't as magical as it made out to be, and it can clean itself - nasmw - nasm - Remove untrue part of Building for Itanium section - Update msdn link - Trim trailing space There is also a diff -w patch for 2.7, due to the large number of lines with trailing space. -- Added file: http://bugs.python.org/file32356/pcbuild_readme-2.7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19391 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16037] httplib: header parsing is unlimited
Jyrki Pulliainen added the comment: Third version of the 3.2 patch, this time with documentation of the exception TooManyHeaders -- Added file: http://bugs.python.org/file32358/issue16037_py32_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16037 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Stefan Behnel added the comment: Nick Coghlan added the comment: Antoine Pitrou added the comment: To be clear: the problem is with CPython calling the concrete APIs when it shouldn't, rather than with the concrete APIs not behaving properly. The boilerplate required to use them correctly renders them broken in my view I think we disagree here. There is no boilerplate at all involved, as long as its guaranteed that they are being called on the correct type of object. User code may provide that guarantee either implicitly or explicitly, and only the explicit way involves additional code (such as a type check). The implicit way (that simply knows the exact type) would suffer from any code additions to the fast paths in the specific C-API functions. particularly when they silently corrupt internal subclass state when misused instead of throwing an exception. It has bothered me more than once that even the fast paths in those functions usually contain type checks, which often means that the type check is being executed twice: once as a special casing check before calling the function and once as a safety check after entering it. As long as the functions are being used correctly, the second check is just useless code that unnecessarily takes time. IMHO, it would be nice to have those internal type checks enabled *only* for debug builds, although even then, there may be legitimate usages that call these functions on subtypes (such as when called from within a well defined subtype implementation, as you mentioned). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16803] Make test_import test_importlib run tests under both _frozen_importlib and importlib._bootstrap
Roundup Robot added the comment: New changeset e2c3f638c3d0 by Brett Cannon in branch 'default': Issue #16803: Have test.test_importlib.builtin test both frozen and http://hg.python.org/cpython/rev/e2c3f638c3d0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16803 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19390] clinic.py: unhandled syntax error
Stefan Krah added the comment: Larry Hastings rep...@bugs.python.org wrote: You're proposing that Clinic allow = ? No, but it should print an error message and exit. Currently it silently generates garbage which does not compile. [I've noticed that you handle many other syntax errors. Nice work.] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19392] document importlib.reload() requires __loader__ to be defined
New submission from Brett Cannon: Make sure importlib.reload() (and by extension imp.reload()) mention that __loader__ must be defined as well as __name__. -- assignee: docs@python components: Documentation messages: 201259 nosy: brett.cannon, docs@python priority: normal severity: normal status: open title: document importlib.reload() requires __loader__ to be defined versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10977] Concrete object C API considered harmful to subclasses of builtin types
Nick Coghlan added the comment: Keep in mind that part of the problem here is finding stdlib code that needs to be fixed to handle subclasses correctly. The existing APIs have permitted use with subclasses for years but are, in fact, the wrong tool for that in many cases. The problem to be solved isn't this code should handle ducktyping but, this code should either reject subclasses or else handle them without corrupting them. Using the same API for both external invocation and for subclasses calling up to the parent is a problem. For code in critical paths, doing the same type check twice is also a problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10977 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19339] telnetlib: time.monotonic() should be used instead of time.time() for timeout
Charles-François Natali added the comment: Victor, did you see Serhiy's comment? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19339 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15477] test_cmath failures on OS X 10.8
Mark Dickinson added the comment: Perfect. Thanks, Ned! I'll update the Apple issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15477 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19392] document importlib.reload() requires __loader__ to be defined
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19389] find_file might return a different directory than the tested file
Ned Deily added the comment: Thanks for the report. The issue of setup.py not looking in an OS X SDK for zlib.h was recently fixed in currently active branches: f3a2dab1623b (default), 2d8d5fea6194 (3.3), c207ac413457 (2.7). By the way, there has been a lot of confusion about the installation of header files in OS X 10.9 Mavericks, brought on by Apple itself. In recent previous releases, most header files were only installed in the normal locations (/usr/include, /System/Library/Frameworks) as part of the Command Line Tools component (either through Xcode or the downloadable standalone package). Early on in the life cycle of Mavericks development, there apparently was an attempt to no longer install the header files by the CLT packages, forcing everyone to reference them via an SDK. For whatever reason, that attempt was dropped before Mavericks was released. With the 10.9 CLT properly installed, you should see /usr/include correctly populated, including zlib.h. In 10.9, the new way to force CLT to be installed is: xcode-select --install -- nosy: +ned.deily resolution: - out of date stage: - committed/rejected status: open - closed versions: -Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19389 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19392] document importlib.reload() requires __loader__ to be defined
Roundup Robot added the comment: New changeset f575f6298eb1 by Brett Cannon in branch '3.3': Issue #19392: Document that imp.reload() now relies on __loader__ http://hg.python.org/cpython/rev/f575f6298eb1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19393] symtable.symtable can return the wrong top SymbolTable
New submission from Steven Winfield: The attached script creates calls symtable.symtable many times on a code snippet that contains a single class with a method called top, and some other important (to trigger the behaviour) properties: * a class variable * at least three other methods The symtable module is reloaded each time, which seems to exacerbate the problem, but it not necessary. The return value of symtable.symtable is sometimes a SymbolTable object, as expected, and sometimes a symtable.Function object. Here is some example output from the script: c:\Python27python.exe C:\Temp\symtable_weirdness.py Counter({'SymbolTable': 59, 'Function': 41}) c:\Python33python.exe C:\Temp\symtable_weirdness.py Counter({'SymbolTable': 89, 'Function': 11}) The values are consistent between runs, but can be changed by altering PYTHONHASHSEED between runs. -- components: Library (Lib) files: symtable_weirdness.py messages: 201265 nosy: Steven.Winfield priority: normal severity: normal status: open title: symtable.symtable can return the wrong top SymbolTable type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file32359/symtable_weirdness.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19393 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11161] futures.ProcessPoolExecutor hangs
Roundup Robot added the comment: New changeset 44b69e95d276 by bquinlan in branch 'default': Issue #11161: Update the documentation for ProcessPoolExecutor to note that it will not work in the interactive shell. http://hg.python.org/cpython/rev/44b69e95d276 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11161 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11161] futures.ProcessPoolExecutor hangs
Changes by Brian Quinlan br...@sweetapp.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11161 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19392] document importlib.reload() requires __loader__ to be defined
Brett Cannon added the comment: importlib.reload() already states that the loader is reused, so this only required imp.reload() to be updated. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19392 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19172] selectors: add keys() method
Charles-François Natali added the comment: Antoine Pitrou added the comment: FWIW, I think the ideal solution would be for keys() (*) to return a read-only Mapping implementation, allowing for file object lookup (using __getitem__) as well as iteration on SelectorKeys (using __iter__) and fast emptiness checking (using __len__). Thanks, I think that's a great idea. I'm attaching a patch updating yours with the following: - asyncio/test_asyncio update - selectors' documentation update IMO, it really offers both a compact, easy to use and performant API. (Note: the mapping doesn't really have to be recreated upon each get_map() call and could be kept as a private member, but IMO that's not a performance issue). -- Added file: http://bugs.python.org/file32360/selectors_map-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19172 ___diff -r eb1edc9e3722 Doc/library/selectors.rst --- a/Doc/library/selectors.rst Fri Oct 25 17:56:00 2013 +0200 +++ b/Doc/library/selectors.rst Fri Oct 25 19:47:35 2013 +0200 @@ -157,12 +157,13 @@ This must be called to make sure that any underlying resource is freed. The selector shall not be used once it has been closed. - .. method:: get_key(fileobj) + .. method:: get_map() - Return the key associated to a registered file object. + Return a mapping of file objects to selector keys. - This returns the :class:`SelectorKey` instance associated to this file - object, or raises :exc:`KeyError` if the file object is not registered. + This returns a :class:`~collections.abc.Mapping` instance mapping + registered file objects to their associated :class:`SelectorKey` + instance. .. class:: DefaultSelector() diff -r eb1edc9e3722 Lib/asyncio/selector_events.py --- a/Lib/asyncio/selector_events.pyFri Oct 25 17:56:00 2013 +0200 +++ b/Lib/asyncio/selector_events.pyFri Oct 25 19:47:35 2013 +0200 @@ -122,7 +122,7 @@ Add a reader callback. handle = events.make_handle(callback, args) try: -key = self._selector.get_key(fd) +key = self._selector.get_map()[fd] except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) @@ -136,7 +136,7 @@ def remove_reader(self, fd): Remove a reader callback. try: -key = self._selector.get_key(fd) +key = self._selector.get_map()[fd] except KeyError: return False else: @@ -157,7 +157,7 @@ Add a writer callback.. handle = events.make_handle(callback, args) try: -key = self._selector.get_key(fd) +key = self._selector.get_map()[fd] except KeyError: self._selector.register(fd, selectors.EVENT_WRITE, (None, handle)) @@ -171,7 +171,7 @@ def remove_writer(self, fd): Remove a writer callback. try: -key = self._selector.get_key(fd) +key = self._selector.get_map()[fd] except KeyError: return False else: diff -r eb1edc9e3722 Lib/selectors.py --- a/Lib/selectors.py Fri Oct 25 17:56:00 2013 +0200 +++ b/Lib/selectors.py Fri Oct 25 19:47:35 2013 +0200 @@ -6,7 +6,7 @@ from abc import ABCMeta, abstractmethod -from collections import namedtuple +from collections import namedtuple, Mapping import functools import select import sys @@ -44,6 +44,25 @@ selected event mask and attached data. +class _SelectorMapping(Mapping): +Mapping of file objects to selector keys. + +def __init__(self, selector): +self._fd_to_key = selector._fd_to_key + +def __len__(self): +return len(self._fd_to_key) + +def __getitem__(self, fileobj): +try: +return self._fd_to_key[_fileobj_to_fd(fileobj)] +except KeyError: +raise KeyError({!r} is not registered.format(fileobj)) from None + +def __iter__(self): +return iter(self._fd_to_key) + + class BaseSelector(metaclass=ABCMeta): Base selector class. @@ -151,16 +170,9 @@ self._fd_to_key.clear() -def get_key(self, fileobj): -Return the key associated to a registered file object. - -Returns: -SelectorKey for this file object - -try: -return self._fd_to_key[_fileobj_to_fd(fileobj)] -except KeyError: -raise KeyError({!r} is not registered.format(fileobj)) from None +def get_map(self): +Return a mapping of file objects to selector keys. +return _SelectorMapping(self) def __enter__(self): return self diff -r eb1edc9e3722 Lib/test/test_asyncio/test_selector_events.py --- a/Lib/test/test_asyncio/test_selector_events.py Fri Oct 25 17:56:00 2013 +0200 +++
[issue13785] Make concurrent.futures.Future state public
Brian Quinlan added the comment: Any progress on this or can I close the bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13785 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19394] distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed
New submission from robotron: When empty string element is passed in include_dirs or library_dirs (e.g. include_dirs = []) param of distutils.core.Extension constructor, it is propagated to compiler/linker params and in the case of gcc it eats subsequent command line option. setup.py excerpt: --- extensions = [ Extension(test_extension, [test_extension.cpp], include_dirs = [], libraries = [rt], library_dirs = [], ) ] --- $ python setup.py build ... gcc ... -I -I/usr/include/python2.7 -c test_extension.cpp ... Standard include dir /usr/include/python2.7 is ommited now. The same is valid for library_dirs. Example scripts attached. -- assignee: eric.araujo components: Distutils files: bug_test_case.zip messages: 201269 nosy: eric.araujo, robotron, tarek priority: normal severity: normal status: open title: distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file32361/bug_test_case.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19394 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17432] PyUnicode_ functions not accessible in Limited API on Windows
Christian Heimes added the comment: Martin, do you want to change the def-file for Python 3.4? -- nosy: +christian.heimes priority: normal - high versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17432 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?
Brian Quinlan added the comment: The only thing that I've used .running() for is for UI reasons. But it is easier to just iterative over your futures and call a method than to install a callback and handle the state yourself. -- nosy: +bquinlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18699 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16287] Sporadic test_utime() failures on Solaris
Christian Heimes added the comment: Trent, do you still see the failures on Solaris? -- nosy: +christian.heimes priority: normal - low status: open - languishing type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16287 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows
Brian Quinlan added the comment: Take a look at http://bugs.python.org/issue11161 and its fix. Do you think that just saying that ProcessPoolExecutor will not work from the interactive shell is sufficient? -- nosy: +bquinlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17874 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18834] Add Clang to distutils to build C/C++ extensions
Changes by Christian Heimes li...@cheimes.de: -- stage: - patch review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18834 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13789] _tkinter does not build on Windows 7
Terry J. Reedy added the comment: I got sufficient answers on core-mentorship list to build and run. #19273 revised and updated readme.txt. -- resolution: - out of date stage: - committed/rejected status: open - closed superseder: - Update PCbuild/readme.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13789 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19387] Explain and test the sre overlap table
Serhiy Storchaka added the comment: LGTM. I guess that new code can be even a little faster. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19387 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14255] tempfile.gettempdir() didn't return the path with correct case.
Changes by Tim Golden m...@timgolden.me.uk: Removed file: http://bugs.python.org/file32338/issue14255.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14255] tempfile.gettempdir() didn't return the path with correct case.
Tim Golden added the comment: New patch, tested on Windows Linux -- Added file: http://bugs.python.org/file32362/issue14255.3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module?
New submission from cantor: import lzma from functools import partial import multiprocessing def run_lzma(data,c): return c.compress(data) def split_len(seq, length): return [str.encode(seq[i:i+length]) for i in range(0, len(seq), length)] def lzma_mp(sequence,threads=3): lzc = lzma.LZMACompressor() blocksize = int(round(len(sequence)/threads)) strings = split_len(sequence, blocksize) lzc_partial = partial(run_lzma,c=lzc) pool=multiprocessing.Pool() lzc_pool = list(pool.map(lzc_partial,strings)) pool.close() pool.join() out_flush = lzc.flush() return b.join(lzc_pool + [out_flush]) sequence = 'AJKGJFKSHFKLHALWEHAIHWEOIAH IOAHIOWEHIOHEIOFEAFEASFEAFWEWEWFQWEWQWQGEWQFEWFDWEWEGEFGWEG' lzma_mp(sequence,threads=3) -- components: ctypes messages: 201278 nosy: cantor priority: normal severity: normal status: open title: lzma hangs for a very long time when run in parallel using python's muptiprocessing module? type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module?
cantor added the comment: lzma -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Add functools.partialmethod
alon horev added the comment: I just want to make sure I understand the semantics concerning class methods, the following example demonstrates a usage similar to regular methods as much as possible: class A(object): def add(self, x, y): print(self) return x + y add10 = partialmethod(add, 10) add10class = classmethod(partialmethod(add, 10)) assert A().add10(5) == 15 # prints __main__.A object at 0x1097e1390 assert A.add10class(5) == 15 # prints class '__main__.A' Another option would be to return a class-bound partial from the __get__ method. It's not as consistent as the first example but perhaps nicer: class A(object): def add(self, x, y): print(self) return x + y add10 = partialmethod(add, 10) assert A().add10(5) == 15 # prints __main__.A object at 0x1097e1390 assert A.add10(5) == 15 # prints class '__main__.A' Is the first option what you had in mind? -- nosy: +alonho ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module?
Changes by cantor cantorma...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17432] PyUnicode_ functions not accessible in Limited API on Windows
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17432 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19395] lzma hangs for a very long time when run in parallel using python's muptiprocessing module?
Changes by cantor cantorma...@gmail.com: -- components: -ctypes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19395 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16803] Make test_import test_importlib run tests under both _frozen_importlib and importlib._bootstrap
Roundup Robot added the comment: New changeset f3d50720dee0 by Brett Cannon in branch 'default': Issue #16803: Move test.test_importlib.extension to use both frozen and source importlib code http://hg.python.org/cpython/rev/f3d50720dee0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16803 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19375] Deprecate site-python in site.py
Roundup Robot added the comment: New changeset 90c56229efb7 by Antoine Pitrou in branch 'default': Issue #19375: The site module adding a site-python directory to sys.path, if it exists, is now deprecated. http://hg.python.org/cpython/rev/90c56229efb7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19375 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19387] Explain and test the sre overlap table
Roundup Robot added the comment: New changeset a2ed12e014ef by Antoine Pitrou in branch 'default': Issue #19387: explain and test the sre overlap table http://hg.python.org/cpython/rev/a2ed12e014ef -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19387 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19387] Explain and test the sre overlap table
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19387 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19375] Deprecate site-python in site.py
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19375 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19396] test_contextlib fails with -S
New submission from Antoine Pitrou: $ ./python -S -m test test_contextlib [1/1] test_contextlib test test_contextlib failed -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_contextlib.py, line 640, in test_redirect_to_string_io help(pow) NameError: name 'help' is not defined -- assignee: ncoghlan components: Tests messages: 201284 nosy: ncoghlan, pitrou priority: low severity: normal status: open title: test_contextlib fails with -S versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19396 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19398] test_trace fails with -S
New submission from Antoine Pitrou: $ ./python -S -m test test_trace [1/1] test_trace test test_trace failed -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_trace.py, line 313, in test_coverage self.assertTrue(pprint.cover in files) AssertionError: False is not true -- components: Tests messages: 201286 nosy: pitrou priority: low severity: normal status: open title: test_trace fails with -S type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19398 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19397] test_pydoc fails with -S
New submission from Antoine Pitrou: $ ./python -S -m test test_pydoc [1/1] test_pydoc test test_pydoc failed -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/test/test_pydoc.py, line 473, in test_namedtuple_public_underscore help(NT) NameError: name 'help' is not defined -- components: Tests messages: 201285 nosy: pitrou priority: low severity: normal status: open title: test_pydoc fails with -S type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19397 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com