[issue16748] Make CPython test package discoverable
Serhiy Storchaka added the comment: There are tests outside of Lib/test/ hierarchy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16871] Cleanup a few minor things
Serhiy Storchaka added the comment: Agreed. Maintainers of asynchat, tkinter.tix, optparse and difflib must pay attention to this. -- nosy: +aronacher, giampaolo.rodola, gpolo, josiahcarlson, stutzbach resolution: - rejected stage: patch review - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
New submission from Dmitry Mugtasimov: http://docs.python.org/2/tutorial/modules.html should be rewritten. AS IS 6.1.2. The Module Search Path When a module named spam is imported, the interpreter first searches for a built-in module with that name. If not found, it then searches for a file named spam.py in a list of directories given by the variable sys.path. sys.path is initialized from these locations: TO BE 6.1.2. The Module Search Path When a module named spam is imported, the interpreter first searches for a built-in module with that name. If not found, it looks in the containing package (the package of which the current module is a submodule). If not found, it then searches for a file named spam.py in a list of directories given by the variable sys.path. sys.path is initialized from these locations: -- Note that now 6.1.2. The Module Search Path and 6.4.2. Intra-package References are contradictary since in 6.4.2 it is said: In fact, such references are so common that the import statement first looks in the containing package before looking in the standard module search path., but this is not reflected in 6.1.2. -- EXAMPLE (for more information see http://stackoverflow.com/questions/14183541/why-python-finds-module-instead-of-package-if-they-have-the-same-name#comment19687166_14183541 ): /home/dmugtasimov/tmp/name-res3/xyz __init__.py a.py b.py t.py xyz.py Files init.py, b.py and xyz.py are empty File a.py: import os, sys ROOT_DIRECTORY = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if not sys.path or ROOT_DIRECTORY not in sys.path: print 'sys.path is modified in a.py' sys.path.insert(0, ROOT_DIRECTORY) else: print 'sys.path is NOT modified in a.py' print 'sys.path:', sys.path print 'BEFORE import xyz.b' import xyz.b print 'AFTER import xyz.b' File t.py: import os, sys ROOT_DIRECTORY = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if not sys.path or ROOT_DIRECTORY not in sys.path: print 'sys.path is modified in t.py' sys.path.insert(0, ROOT_DIRECTORY) else: print 'sys.path is NOT modified in t.py' import xyz.a Run: python a.py Output: sys.path is modified in a.py sys.path: ['/home/dmugtasimov/tmp/name-res3', '/home/dmugtasimov/tmp/name-res3/xyz', '/usr/local/lib/python2.7/dist-packages/tornado-2.3-py2.7.egg', '/home/dmugtasimov/tmp/name-res3/xyz', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg-info', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client'] BEFORE import xyz.b AFTER import xyz.b Run: python -vv a.py Output: import xyz # directory /home/dmugtasimov/tmp/name-res3/xyz # trying /home/dmugtasimov/tmp/name-res3/xyz/__init__.so # trying /home/dmugtasimov/tmp/name-res3/xyz/__init__module.so # trying /home/dmugtasimov/tmp/name-res3/xyz/__init__.py # /home/dmugtasimov/tmp/name-res3/xyz/__init__.pyc matches /home/dmugtasimov/tmp/name-res3/xyz/__init__.py import xyz # precompiled from /home/dmugtasimov/tmp/name-res3/xyz/__init__.pyc # trying /home/dmugtasimov/tmp/name-res3/xyz/b.so # trying /home/dmugtasimov/tmp/name-res3/xyz/bmodule.so # trying /home/dmugtasimov/tmp/name-res3/xyz/b.py # /home/dmugtasimov/tmp/name-res3/xyz/b.pyc matches /home/dmugtasimov/tmp/name-res3/xyz/b.py import xyz.b # precompiled from /home/dmugtasimov/tmp/name-res3/xyz/b.pyc Run: python t.py Output: sys.path is modified in t.py sys.path is NOT modified in a.py sys.path: ['/home/dmugtasimov/tmp/name-res3', '/home/dmugtasimov/tmp/name-res3/xyz', '/usr/local/lib/python2.7/dist-packages/tornado-2.3-py2.7.egg', '/home/dmugtasimov/tmp/name-res3/xyz', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg-info', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client'] BEFORE import xyz.b Traceback (most recent call last): File t.py, line 9, in module import xyz.a File /home/dmugtasimov/tmp/name-res3/xyz/a.py, line 11, in module import xyz.b ImportError: No module named b Run: python -vv t.py Output: import xyz # directory
[issue16891] Fix docs about module search order
Dmitry Mugtasimov added the comment: UPDATE: CHANGE http://stackoverflow.com/questions/14183541/why-python-finds-module-instead-of-package-if-they-have-the-same-name#comment19687166_14183541 TO http://stackoverflow.com/questions/14183541/why-python-finds-module-instead-of-package-if-they-have-the-same-name Because the whole question and replies are important. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14323] Normalize math precision in RGB/YIQ conversion
Serhiy Storchaka added the comment: According to Wikipedia FCC conversion is defined as: y = 0.30*r + 0.59*g + 0.11*b i = 0.5990*r - 0.2773*g - 0.3217*b q = 0.2130*r - 0.5251*g + 0.3121*b and non-FCC conversion is defined as: y = 0.299*r + 0.587*g + 0.114*b i = 0.595716*r - 0.274453*g - 0.321263*b q = 0.211456*r - 0.522591*g + 0.311135*b Our current code y = 0.30*r + 0.59*g + 0.11*b i = 0.60*r - 0.28*g - 0.32*b q = 0.21*r - 0.52*g + 0.31*b looks like FCC conversion with the precision of two decimal places. Actually with this precision the difference between the different conversions are almost absent. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8489] Support UTF8SMTP as part of RFC 5336 in smptlib
Changes by David Lam d...@dlam.me: -- nosy: +dlam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14468] Update cloning guidelines in devguide
Ezio Melotti added the comment: Here is another iteration of the patch. I removed some of the old material, added half of the FAQs and the title and outline for the other FAQs. If the structure looks good I'll proceed. -- assignee: sandro.tosi - ezio.melotti Added file: http://bugs.python.org/file28628/issue14468-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14468] Update cloning guidelines in devguide
Changes by Ezio Melotti ezio.melo...@gmail.com: Added file: http://bugs.python.org/file28629/committing.rst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15845] Fixing some byte-to-string conversion warnings
Roundup Robot added the comment: New changeset 9458a516f769 by Serhiy Storchaka in branch '3.2': Issue #15845: Fix comparison between bytes and string. http://hg.python.org/cpython/rev/9458a516f769 New changeset f6cf2985348a by Serhiy Storchaka in branch '3.3': Issue #15845: Fix comparison between bytes and string. http://hg.python.org/cpython/rev/f6cf2985348a New changeset 51e60d9ee389 by Serhiy Storchaka in branch 'default': Issue #15845: Fix comparison between bytes and string. http://hg.python.org/cpython/rev/51e60d9ee389 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15845] Fixing some byte-to-string conversion warnings
Serhiy Storchaka added the comment: Fixed. Thank your for report and patch, Alessandro. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] ismethod and isfunction methods error
Changes by Federico Reghenzani federico@reghe.net: -- keywords: +patch Added file: http://bugs.python.org/file28630/inspect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16890] minidom error
Javier Domingo added the comment: I know that is the problem, but that shouldn't happen! if you remove a item from a list, that doesn't happen. That is why I tagged the error as minidom's El 08/01/2013 04:24, Ezio Melotti rep...@bugs.python.org escribió: Ezio Melotti added the comment: The problem is that you are mutating parent.childNodes while you are iterating on it. Iterating over a copy seems to solve the problem. -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16890 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Charles-François Natali added the comment: So I assume that the second failure is fixed, which means that OS-X returns a funny event (and not POLLIN/POLLHUP/POLLERR) in case of ECONNREFUSED :-( 2 - In EventLoopTestsMixin::test_writer_callback if the writer socket isn't non-blocking, the test hangs forever.. This test is buggy: def test_writer_callback(self): el = events.get_event_loop() r, w = unix_events.socketpair() el.add_writer(w.fileno(), w.send, b'x'*100) el.call_later(0.1, el.remove_writer, w.fileno()) el.run() w.close() Because the writer socket isn't non-blocking, if the output socket buffer fills up in less than 0.1 seconds, the call to w.send(b'x'*100) will block. select()/poll()/kqueue() use a watermark to decide whether the FD is readable/writable: for a Unix domain socket, I guess OS-X returns that the socket is writable is there's at least one byte free in the output socket buffer: since send() tries to write 100 bytes at once, it blocks. I can reproduce the hang on Linux with vanilla (unpatched) tulip by increasing the number of bytes sent() in one syscall: --- tulip-bf4cb136c121/tulip/events_test.py 2092-08-05 00:00:00.0 +0200 +++ tulip/tulip/events_test.py 2013-01-08 11:35:27.400198000 +0100 @@ -149,7 +149,7 @@ def test_writer_callback(self): el = events.get_event_loop() r, w = unix_events.socketpair() -el.add_writer(w.fileno(), w.send, b'x'*100) +el.add_writer(w.fileno(), w.send, b'x'*(118)) el.call_later(0.1, el.remove_writer, w.fileno()) el.run() w.close() (I have to do that because Linux uses an adaptive watermark, see http://lxr.free-electrons.com/source/net/unix/af_unix.c#L2156 and http://lxr.free-electrons.com/source/net/unix/af_unix.c#L319 ). That's why all FDs monitored with select()/poll()/epoll() must be non-blocking (and there's also the risk of spurious wakeups...). 3 - Errors: ERROR: testCreateSslTransport (tulip.events_test.PollEventLoopTests) File /Users/felipecruz/Projects/tulip3/tulip/selectors.py, line 180, in _key_from_fd raise RuntimeError(No key found for fd {}.format(fd)) RuntimeError: No key found for fd -2 ERROR: test_sock_client_ops (tulip.events_test.KqueueEventLoopTests) File /Users/felipecruz/Projects/tulip3/tulip/selectors.py, line 180, in _key_from_fd raise RuntimeError(No key found for fd {}.format(fd)) RuntimeError: No key found for fd 77 Yes, it's the same problem: poll()/kqueue() returning garbage. I guess I'll have to patch Selector to ignore unknown FDs, but that really looks like an OS-X bug. Could you dump the content of the returned kevent when the fd is not found? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16890] minidom error
Ezio Melotti added the comment: It happens with lists too: l = list(range(10)) for x in l: ... l.remove(x) ... l [1, 3, 5, 7, 9] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Vinay Sajip added the comment: I agree this is a reasonable expectation, but I've not encountered this problem before. Can you provide a short script demonstrating the problem? Which platform did you encounter these problems on, and what was the logging configuration? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16890] minidom error
Javier Domingo added the comment: Ok, sorry then. Javier Domingo 2013/1/8 Ezio Melotti rep...@bugs.python.org Ezio Melotti added the comment: It happens with lists too: l = list(range(10)) for x in l: ... l.remove(x) ... l [1, 3, 5, 7, 9] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16890 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16884] logging handler automatically added starting in 3.2+
Roundup Robot added the comment: New changeset 51138680b968 by Vinay Sajip in branch '2.7': Issue #16884: Updated docs to use 'note' directives. http://hg.python.org/cpython/rev/51138680b968 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16884] logging handler automatically added starting in 3.2+
Roundup Robot added the comment: New changeset 50af862d0625 by Vinay Sajip in branch '3.2': Issue #16884: Updated docs to use 'note' directives in a couple of places missed earlier. http://hg.python.org/cpython/rev/50af862d0625 New changeset b00c4a095b00 by Vinay Sajip in branch '3.3': Issue #16884: Merged doc fix from 3.2. http://hg.python.org/cpython/rev/b00c4a095b00 New changeset 4617b7ac302a by Vinay Sajip in branch 'default': Issue #16884: Merged doc fix from 3.3. http://hg.python.org/cpython/rev/4617b7ac302a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Chris Jerdonek added the comment: This can happen with any standard logging configuration when there are writes to sys.stderr that don't end with \n. I'm using Mac OS X 10.7. A minimal script: import logging, unittest log = logging.getLogger() class Test(unittest.TestCase): def setUp(self): log.info(setting up) def test1(self): pass def test2(self): pass logging.basicConfig(level=logging.INFO) unittest.main() Output: INFO:root:setting up .INFO:root:setting up . -- Ran 2 tests in 0.001s -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16884] logging handler automatically added starting in 3.2+
Chris Jerdonek added the comment: Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16884 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16871] Cleanup a few minor things
Giampaolo Rodola' added the comment: Ok for asyncore/asynchat in 3.4 branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Ezio Melotti added the comment: Note that for this specific problem you could call unittest.main(verbosity=0). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15442] Expand the list of default dirs filecmp.dircmp ignores
Éric Araujo added the comment: Should __pycache__ be ignored too? Sounds good. I don't know how to compile python without having to install it See the devguide http://docs.python.org/devguide -- stage: needs patch - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15442 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Vinay Sajip added the comment: Oh, I see what you mean now. I guess the approach you used is straightforward, and perhaps something could be added to test.support. It's only an aesthetic thing, though, IIUC. I normally don't run into this because I log to file when running unit tests, or run with -v so that the runner prints complete lines rather than just dots. And if you need to test that logging is happening, you can use the TestHandler and Matcher classes in test.support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Chris Jerdonek added the comment: Ezio, the use case is to add to the existing test output additional diagnostic logging. In particular, you might want to run tests even with verbosity=2 in addition to the log messages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Chris Jerdonek added the comment: Yes, it's primarily for easier scanning/reading as well as aesthetic. With -v I get the following output though: test1 (test_logging.Test) ... INFO:root:setting up ok test2 (test_logging.Test) ... INFO:root:setting up ok -- Ran 2 tests in 0.000s At least it's good to know that I wasn't missing anything obvious. And yes, I did read about TestHandler/Matcher (for making assertions about logging) from the following informative thread a couple years ago (which I came across when filing issue 16884): http://mail.python.org/pipermail/python-dev/2010-December/106526.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13198] Remove duplicate definition of write_record_file
Éric Araujo added the comment: Please don’t; distutils2 still exists and is mutating into one or more projects where these bug reports will be useful. If it bothers Python core devs to have the bugs in this tracker, they will be migrated, but for the moment please leave them open so they can be found. -- resolution: out of date - stage: - patch review status: closed - open versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12944] Accept arbitrary files for packaging's upload command
Éric Araujo added the comment: distutils2, while not actively developed any more for inclusion in the stdlib in 3.4, will mutate into one or more projects where these bug reports will be useful. Bugs will certainly be migrated (and closed in this tracker), but please keep them open for easy query. -- resolution: out of date - status: closed - open versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Chris Jerdonek added the comment: and perhaps something could be added to test.support. Also, just to clarify, I had in mind outside projects and the larger community for this request rather than CPython development, so I'm not sure test.support would be the right location. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16842] Allow to override a function signature for pydoc with a docstring
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16842 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16805] when building docs on Debian 7 -- ERROR: Error in note directive
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14470] Remove using of w9xopen in subprocess module
Éric Araujo added the comment: FTR, was the deprecation for 3.3 committed? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16814] use --directory option of make in describing how to build the docs
Éric Araujo added the comment: FWIW I use make -C Doc all the time but agree with Georg’s point about conciseness. Ezio, I suggest you bookmark some make doc page if you can’t remember it :) -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16814 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] ismethod and isfunction methods error
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] Hint about correct ismethod and isfunction usage
Changes by Éric Araujo mer...@netwok.org: -- title: ismethod and isfunction methods error - Hint about correct ismethod and isfunction usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brett.cannon, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16748] Make CPython test package discoverable
R. David Murray added the comment: Yes, but not many, and not as many as there used to be. I'd like to see them all moved, but met resistance on that front. It may be that those just can't be run using unittest discovery, and perhaps that will eventually convince the maintainers to move them. But probably not until a number of years from now :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Éric Araujo added the comment: Idle needs to find its text help files at runtime, so they are installed as data alongside with the code. The rst doc files however can be installed anywhere or not installed at all, so we can’t change Idle to look for them. An alternate idea to avoid duplication could be to copy the rst file to the code directory at build time. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16748] Make CPython test package discoverable
R. David Murray added the comment: Also, it may be possible to add unittest discovery hooks to the stubs that *are* in Lib/test. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16851] Hint about correct ismethod and isfunction usage
Changes by Federico Reghenzani federico@reghe.net: -- nosy: +federico.reghenzani ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Éric Araujo added the comment: Yes, we definitely want to eat our dogfood and stop relying on dict order, especially now that hashing is randomized. I would argue for backporting this to stable branches. Patch looks good. A semi-related improvement for this bug would be to switch these doctests to proper unit tests. -- keywords: +easy nosy: +eric.araujo stage: - patch review versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled
Martin v. Löwis added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16892] Windows bug picking up stdin from a pipe
New submission from Robert Oeffner: Hi, This is a bug that seems to exist on python 2.7, python 3.3 on Windows versions XP, Vista, 7 and 8 and has been around for some years, presumably also in other python versions. It is only recently I have managed to better isolate it although not completely. My Windows PC is set up with some doskey macros that are loaded at each instance of the commandline interpreter cmd.exe with the registry key HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun\mymacros.cmd Unfortunately this seems to delete stdin when stdin is piped to python scripts that runs another executable invoked with subprocess. In this case the command: python32 testsubproc.py mytextfile.txt will not work. The textfile mytextfile.txt will be ignored. If subprocess is invoked with shell=False the textfile does get piped into stdin. This is however not an option as our porgrams are distributed on other platforms. It would also give an inconsistent experience on the same OS (Windows). If mymacros.cmd is called interactively from the command prompt the problem does not exist and stdin can be piped into the python script with no problem. I have attached a working script below which includes a comment section with a small C++ program and the registry key in question to demonstrate the problem. I would be grateful if there are people who know how to get to the bottom of this bug or even fix it. Many thanks, Robert -- components: Build, Windows files: testsubproc.py messages: 179352 nosy: oeffner priority: normal severity: normal status: open title: Windows bug picking up stdin from a pipe type: behavior versions: Python 2.6, Python 2.7, Python 3.3 Added file: http://bugs.python.org/file28631/testsubproc.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16892 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
Dmitry Mugtasimov added the comment: As I investigate it a little closer it seems to me that it is not a documentation issue, but an implementation issue. http://docs.python.org/2/reference/simple_stmts.html#import A package can contain other packages and modules while modules cannot contain other modules or packages. The only why to import name from module is from xyz import b where b is name defined inside xyz module. Issuing import xyz.b means that b is module or package. Therefore xyz cannot be a module, since ...modules cannot contain other modules or packages. This means that xyz is package. The problem is that it is considered as module for case: python t.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable
Eli Bendersky added the comment: Daniel, thanks for this patch, it looks very good. I had some comments in the code review. As for TreeBuilder, let's split it into a separate issue - I think it's much less critical. We can discuss it later once we're done with Element. If anything, it's more important to handle ElementTree itself first - it should be very easy (much simpler than Element). With the factory method I'm not sure how the Py pickling happens. I need to dig a bit in pickling for that, because I don't know how method reference pickling works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
R. David Murray added the comment: So it looks like if import xyz.b bahaves different depending on how a.py was initially loaded as a script or imported from another module. There are several differences between importing a module and running a script, one of which is what is on sys.path. You constructed your example to mask the path difference. You are getting hit by the difference between absolute and relative imports. How implicit relative imports behave are one of the other things that are different between running a file as a script and importing it. This kind of confusion is one of the reasons implicit relative imports were dropped in Python3. If you add from __future__ import absolute_import to the top of your a and t files, t will no longer produce an import error. It could be that the documentation could be improved, but I'm not sure it is worth the effort for 2.7. If there are statements in the 3.x docs that are incorrect now that implicit relative imports are gone, those would definitely be worth fixing. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable
Eli Bendersky added the comment: P = import_fresh_module('xml.etree.ElementTree', blocked=['_elementtree']) tb = P.TreeBuilder(element_factory=lambda a, b: [a, b]) print(pickle.dumps(tb)) Gives: _pickle.PicklingError: Can't pickle class 'function': attribute lookup builtins.function failed -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
Dmitry Mugtasimov added the comment: A lot of people are still using python 2.7, even 2.6. For me it would be a nice fix in docs since I spent a plenty of time, trying to figure out what is going on. In my previous comment I also pointed out that implementation probably should be fixed too, since interpreter tries to import module from module, which should not be possible according to docs. It may be an issue for Python 3 too, but I did not check. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16889] facilitate log output starting at beginning of line
Vinay Sajip added the comment: I had in mind outside projects and the larger community for this request Fair enough - then the best place for the specialisation of stream and handler would seem to be unittest/unittest2. So I'll add Michael Foord to the nosy list. -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Senthil Kumaran added the comment: Regardless of the topic of merge, the suggested improvements for both idle.rst and help.txt are great! Thanks for working the patch, Todd. I am +1 with the changes. If no else has any comments, I can go ahead with committing this. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16730 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Zachary Ware added the comment: I'd like to see Éric, Ezio, and my comments on v3 in Rietveld addressed, but after that I'm good with it :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16748] Make CPython test package discoverable
Brett Cannon added the comment: It's totally doable to set up stubs in Lib/test to use test discovery on those tests which exist outside of that directory. test_importlib actually has some code for that left over from when it lived in Lib/importlib/test: http://hg.python.org/cpython/file/4617b7ac302a/Lib/test/test_importlib/__init__.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16893] Create IDLE help.txt from Doc/library/idle.rst
New submission from Zachary Ware: Lib/idlelib/help.txt and Doc/library/idle.rst contain almost exactly the same information, only formatted a bit differently. This issue is to suggest the merger of the two files, by way of creating help.txt from idle.rst as a part of the build or install process. This could be as simple as merely copying the one to the other, but that of course leaves in place all reST directives that mean nothing to a simple text document. Thus, idle.rst should be processed to create help.txt. This could be done with sphinx/docutils, but to avoid having the CPython build process (not just the doc build process) depend on those tools, I think a very simple dedicated script could be created to do the processing without much trouble. As far as I can tell, this new script would only have to do a few simple steps: - Remove comments (including index markers, etc.) - Remove reST roles (replace :role:` with `, possibly remove ` as well) - Remove backslash escapes - Remove (or undouble) double colons - Replace #. with 1., etc. Thoughts? -- assignee: docs@python components: Documentation, IDLE messages: 179362 nosy: Todd.Rovito, docs@python, eric.araujo, zach.ware priority: normal severity: normal status: open title: Create IDLE help.txt from Doc/library/idle.rst type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16893 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Zachary Ware added the comment: Issue 16893 has been filed to deal with the idea of merging the files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5066 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16894] Function attribute access doesn't invoke methods in dict subclasses
New submission from David Beazley: Suppose you subclass a dictionary: class mdict(dict): def __getitem__(self, index): print('Getting:', index) return super().__getitem__(index) Now, suppose you define a function and perform these steps that reassign the function's attribute dictionary: def foo(): ... pass ... foo.__dict__ = mdict() foo.x = 23 foo.x # Observe: No output from overridden __getitem__ 23 type(foo.__dict__) class '__main__.mdict' foo.__dict__ {'x': 23} Carefully observe that access to foo.x does not invoke the overridden __getitem__() method in mdict. Instead, it just directly accesses the default __getitem__() on dict. Admittedly, this is a really obscure corner case. However, if the __dict__ attribute of a function can be legally reassigned, it might be nice for inheritance to work ;-). -- components: Interpreter Core messages: 179364 nosy: dabeaz priority: normal severity: normal status: open title: Function attribute access doesn't invoke methods in dict subclasses type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16894] Function attribute access doesn't invoke methods in dict subclasses
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: Ok, I fixed test_writer_callback() in the tulip repo. Indeed the error I reported first is gone now. I logged the value of kev on failure, and got this output: ERROR:root:kev = select.kevent ident=83 filter=-2 flags=0x1 fflags=0x0 data=0x131750 udata=0x0 Traceback (most recent call last): File /Users/guido/tulip/tulip/selectors.py, line 178, in _key_from_fd return self._fd_to_key[fd] KeyError: 83 During handling of the above exception, another exception occurred: Traceback (most recent call last): File /Users/guido/tulip/tulip/selectors.py, line 330, in select key = self._key_from_fd(fd) File /Users/guido/tulip/tulip/selectors.py, line 180, in _key_from_fd raise RuntimeError(No key found for fd {}.format(fd)) RuntimeError: No key found for fd 83 The full traceback printed by the unittest framework was: ERROR: test_sock_client_ops (tulip.events_test.KqueueEventLoopTests) -- Traceback (most recent call last): File /Users/guido/tulip/tulip/selectors.py, line 178, in _key_from_fd return self._fd_to_key[fd] KeyError: 83 During handling of the above exception, another exception occurred: Traceback (most recent call last): File /Users/guido/tulip/tulip/events_test.py, line 168, in test_sock_client_ops el.run_until_complete(el.sock_sendall(sock, b'GET / HTTP/1.0\r\n\r\n')) File /Users/guido/tulip/tulip/unix_events.py, line 146, in run_until_complete self.run() File /Users/guido/tulip/tulip/unix_events.py, line 110, in run self._run_once() File /Users/guido/tulip/tulip/unix_events.py, line 582, in _run_once event_list = self._selector.select(timeout) File /Users/guido/tulip/tulip/selectors.py, line 330, in select key = self._key_from_fd(fd) File /Users/guido/tulip/tulip/selectors.py, line 180, in _key_from_fd raise RuntimeError(No key found for fd {}.format(fd)) RuntimeError: No key found for fd 83 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16894] Function attribute access doesn't invoke methods in dict subclasses
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16894 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled
Roundup Robot added the comment: New changeset 1d8effd379c3 by Charles-François Natali in branch '2.7': Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. http://hg.python.org/cpython/rev/1d8effd379c3 New changeset d5df9ed118c5 by Charles-François Natali in branch '3.2': Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. http://hg.python.org/cpython/rev/d5df9ed118c5 New changeset ebfd847bc15a by Charles-François Natali in branch '3.3': Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. http://hg.python.org/cpython/rev/ebfd847bc15a New changeset f7e563478349 by Charles-François Natali in branch 'default': Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. http://hg.python.org/cpython/rev/f7e563478349 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled
Charles-François Natali added the comment: Should be fixed now, thanks. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Serhiy Storchaka added the comment: It would be good actually get rid of doctests, turning them into unittests. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16748] Make CPython test package discoverable
Chris Jerdonek added the comment: Also, it may be possible to add unittest discovery hooks to the stubs that *are* in Lib/test. The load_tests protocol (2.7, 3.2+) seems like the right approach for this: http://docs.python.org/dev/library/unittest.html#load-tests-protocol -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16748 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9242] unicodeobject.c: use of uninitialized values
Serhiy Storchaka added the comment: I forgot mention the issue number in commit messages. See changeset3570e04f4ea9 and changesetbf347198fbaf. Is the issue fixed now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9242] unicodeobject.c: use of uninitialized values
Serhiy Storchaka added the comment: changeset 3570e04f4ea9 and changeset bf347198fbaf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16896] Fix test discovery for test_asyncore.py
New submission from Zachary Ware: Here's the fix for test_asyncore.py. -- components: Tests files: test_asyncore_fix.diff keywords: patch messages: 179373 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_asyncore.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28633/test_asyncore_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16897] Fix test discovery for test_bisect.py
New submission from Zachary Ware: Here's the fix for test_bisect.py. This one has an extra change, that of replacing the manual method of obtaining c_bisect and py_bisect with two calls to support.import_fresh_module. This one also has an extra wrench thrown in the gears by including a few doctests. I haven't changed anything in relation to those doctests, but I wonder if there's really any point to keeping them there considering they claim to be pulled from the docs but are in fact significantly different from what is in the docs these days. -- components: Tests files: test_bisect_fix.diff keywords: patch messages: 179374 nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_bisect.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28634/test_bisect_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16897 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16898] Fix test discovery for test_bufio.py
Changes by Zachary Ware zachary.w...@gmail.com: -- components: Tests files: test_bufio_fix.diff keywords: patch nosy: brett.cannon, ezio.melotti, zach.ware priority: normal severity: normal status: open title: Fix test discovery for test_bufio.py type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28635/test_bufio_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11461] UTF-16 incremental decoder doesn't support partial surrogate pair
Roundup Robot added the comment: New changeset f2353e74b335 by Serhiy Storchaka in branch '2.7': Issue #11461: Fix the incremental UTF-16 decoder. Original patch by http://hg.python.org/cpython/rev/f2353e74b335 New changeset 4677c5f6fcf7 by Serhiy Storchaka in branch '3.2': Issue #11461: Fix the incremental UTF-16 decoder. Original patch by http://hg.python.org/cpython/rev/4677c5f6fcf7 New changeset eed1883b1974 by Serhiy Storchaka in branch '3.3': Issue #11461: Fix the incremental UTF-16 decoder. Original patch by http://hg.python.org/cpython/rev/eed1883b1974 New changeset 5e84d020d001 by Serhiy Storchaka in branch 'default': Issue #11461: Fix the incremental UTF-16 decoder. Original patch by http://hg.python.org/cpython/rev/5e84d020d001 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11461] UTF-16 incremental decoder doesn't support partial surrogate pair
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11461 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9242] unicodeobject.c: use of uninitialized values
Stefan Krah added the comment: The utf_32_le_decode invalid access is gone; for Valgrind the issue is fixed (I didn't look at the patch, no time ATM, sorry). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4773] HTTPMessage not documented and has inconsistent API across Py2/Py3
Piotr Dobrogost added the comment: @joel.verhagen Should HTTPResponse.getheaders() comma-separate the values (...) No, it should not. RFC 2616 states: Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. As field-values for some header fields ('Set-Cookie' being an example) are not defined as a comma-separated list such fields must not be merged. Side note: RFC 2616 is very soon to be obsoleted by the new RFC from httpbin working group. However, in the current/newest draft (http://trac.tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-3.2) although wording is different the sense is the same. -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex
New submission from Vladimir Rutsky: It would be nice if Python will be able to access variables with C99 complex types through ctypes module. -- components: ctypes messages: 179378 nosy: rutsky priority: normal severity: normal status: open title: Add support for C99 complex type (_Complex) as ctypes.c_complex type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16899 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4773] HTTPMessage not documented and has inconsistent API across Py2/Py3
Piotr Dobrogost added the comment: ...continuing my previous comment Joining headers with the same name by , by HTTPResponse.getheaders() in Python 2.7 is wrong and there's a bug for this - see http://bugs.python.org/issue1660009 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16843] sporadic test_sched failure
Roundup Robot added the comment: New changeset ab36d3bb5996 by Serhiy Storchaka in branch '3.3': Issue #16843: Make concurrent tests for sched module deterministic. http://hg.python.org/cpython/rev/ab36d3bb5996 New changeset f65eae38f71e by Serhiy Storchaka in branch 'default': Issue #16843: Make concurrent tests for sched module deterministic. http://hg.python.org/cpython/rev/f65eae38f71e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16843] sporadic test_sched failure
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9242] unicodeobject.c: use of uninitialized values
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9242 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: Figured it out. KqueueSelector was missing the unregister() implementation. Here it is: def unregister(self, fileobj): key = super().unregister(fileobj) mask = 0 if key.events SELECT_IN: mask |= KQ_FILTER_READ if key.events SELECT_OUT: mask |= KQ_FILTER_WRITE kev = kevent(key.fd, mask, KQ_EV_DELETE) self._kqueue.control([kev], 0, 0) I also added a __repr__ to the _Key class: def __repr__(self): return '{}fileobje={}, fd={}, events={:#x}, data={}'.format( self.__class__.__name__, self.fileobj, self.fd, self.events, self.data) Attached a new patch for tulip (but no new patch for select.py). I think I may have left the debug logging in. I will submit this to the Tulip repo, but we still need the changes for SELECT_CONNECT (I can't really test that, still no Windows access). -- Added file: http://bugs.python.org/file28636/tulip-selectors-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Charles-François Natali added the comment: This should fix some kqueue failures (the FDs were not unregistered, which could result in spurious FDs being reported at a later time). For the negative FDs, all spurious events are now caught and logged (I think it's better than silently ignoring them as it is now). Hopefully we'll see an EV_ERROR with kev.data set to a sensible errno. The implementation should now be more or less complete, apart from the WSAPoll, which I'm unable to add/test. Richard, in Tulip's WSAPoll code, it reads: class WindowsPollPollster(PollPollster): Pollster implementation using WSAPoll. WSAPoll is only available on Windows Vista and later. Python does not currently support WSAPoll, but there is a patch available at http://bugs.python.org/issue16507. Does this means that this code need the patch from issue #16507 to work? Also, I've read something about IOCP: is this a replacement for WSAPoll, are there plans to get it merged at some point to python (and if yes, would the select module be a proper home for this)? -- Added file: http://bugs.python.org/file28637/tulip-selectors-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___diff --git a/runtests.py b/runtests.py --- a/runtests.py +++ b/runtests.py @@ -2,9 +2,12 @@ # Originally written by Beech Horn (for NDB). +import logging import sys import unittest +##logging.basicConfig(level=logging.DEBUG) + def load_tests(): mods = ['events', 'futures', 'tasks'] diff --git a/tulip/events_test.py b/tulip/events_test.py --- a/tulip/events_test.py +++ b/tulip/events_test.py @@ -10,6 +10,7 @@ from . import events from . import transports from . import protocols +from . import selectors from . import unix_events @@ -37,8 +38,8 @@ class EventLoopTestsMixin: def setUp(self): -pollster = self.POLLSTER_CLASS() -event_loop = unix_events.UnixEventLoop(pollster) +selector = self.SELECTOR_CLASS() +event_loop = unix_events.UnixEventLoop(selector) events.set_event_loop(event_loop) def testRun(self): @@ -230,24 +231,24 @@ el.run_once() -if hasattr(select, 'kqueue'): +if hasattr(selectors, 'KqueueSelector'): class KqueueEventLoopTests(EventLoopTestsMixin, unittest.TestCase): -POLLSTER_CLASS = unix_events.KqueuePollster +SELECTOR_CLASS = selectors.KqueueSelector -if hasattr(select, 'epoll'): +if hasattr(selectors, 'EpollSelector'): class EPollEventLoopTests(EventLoopTestsMixin, unittest.TestCase): -POLLSTER_CLASS = unix_events.EPollPollster +SELECTOR_CLASS = selectors.EpollSelector -if hasattr(select, 'poll'): +if hasattr(selectors, 'PollSelector'): class PollEventLoopTests(EventLoopTestsMixin, unittest.TestCase): -POLLSTER_CLASS = unix_events.PollPollster +SELECTOR_CLASS = selectors.PollSelector # Should always exist. class SelectEventLoopTests(EventLoopTestsMixin, unittest.TestCase): -POLLSTER_CLASS = unix_events.SelectPollster +SELECTOR_CLASS = selectors.SelectSelector class HandlerTests(unittest.TestCase): diff --git a/tulip/selectors.py b/tulip/selectors.py new file mode 100644 --- /dev/null +++ b/tulip/selectors.py @@ -0,0 +1,372 @@ +Select module. + +This module supports asynchronous I/O on multiple file descriptors. + + + +import logging +from select import * + + +# generic events, that must be mapped to implementation-specific ones +# read event +SELECT_IN = (1 0) +# write event +SELECT_OUT = (1 1) +# connect event +SELECT_CONNECT = SELECT_OUT + + +def _fileobj_to_fd(fileobj): +Return a file descriptor from a file object. + +Parameters: +fileobj -- file descriptor, or any object with a `fileno()` method + +Returns: +corresponding file descriptor + +if isinstance(fileobj, int): +fd = fileobj +else: +try: +fd = int(fileobj.fileno()) +except (ValueError, TypeError): +raise ValueError(Invalid file object: {}.format(fileobj)) +return fd + + +class _Key: +Object used internally to associate a file object to its backing file +descriptor, selected event mask and attached data. + +def __init__(self, fileobj, events, data=None): +self.fileobj = fileobj +self.fd = _fileobj_to_fd(fileobj) +self.events = events +self.data = data + + +class _BaseSelector: +Base selector class. + +A selector supports registering file objects to be monitored for specific +I/O events. + +A file object is a file descriptor or any object with a `fileno()` method. +An arbitrary object can be attached to the file object, which can be used +for example to store context information, a callback, etc. + +A selector can use various implementations (select(), poll(), epoll()...) +
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: Whoops, the unregister() function needs to return key. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: That ought to be added to the docstrings for register()/unregister() in _BaseSelector. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: A patch for making register()/unregister() return the key. -- Added file: http://bugs.python.org/file28638/return_key_fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Charles-François Natali added the comment: As it is now, _Key is actually an implementation detail, that's why it's not part of the methods signature. Oonly the base register()/unregister() return the key because it's an easy way for the derived classes to get the FD without calling _fileobj_to_fd again (it's not really elegant, I'm open to suggestions). We could make it part of the API though, and maybe return it also from get_info() instead of the (fileobj, data) tuple. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable
Daniel Shahaf added the comment: Eli Bendersky wrote on Tue, Jan 08, 2013 at 15:00:42 +: Eli Bendersky added the comment: P = import_fresh_module('xml.etree.ElementTree', blocked=['_elementtree']) tb = P.TreeBuilder(element_factory=lambda a, b: [a, b]) print(pickle.dumps(tb)) Gives: _pickle.PicklingError: Can't pickle class 'function': attribute lookup builtins.function failed Is that with or without the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16850] Add e mode to open(): close-and-exec (O_CLOEXEC) / O_NOINHERIT
STINNER Victor added the comment: According to the following script, FD_CLOEXEC is available on: * Solaris 8 * HP-UX 11 * Unicos 9.0 * Digital UNIX 4.0 * SunOS 4.1.1_U1 * IRIX 6.5 * Linux 2.0 and Linux 2.4 with glibc 2.2.3 * AIX 4.2 (Versions are tested versions, it doesn't mean that the flag didn't exist before) http://sam.nipl.net/ssh-fast/fsh/fshcompat.py -- Note: On Windows, it's possible to implement fcntl(fd, F_SETFD, FD_CLOEXEC) using: SetHandleInformation(fd, HANDLE_FLAG_INHERIT, 1). See for example: https://github.com/tav/pylibs/blob/master/tornado/win32_support.py#L36 I don't know if it's useful since it's possible to set the flag directly when the file is opened (using O_NOINHERIT). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: Please consider my patches instead; it seems our patches crossed. Merging is now difficult because I already submitted my version to Tulip. Your version still has a bug: it uses select.kevent(...) twice, where it should just use kevent(...). Also my version makes fewer syscalls when unregistering a FD that has both read and write events registered. Regarding the _Key return value: I think it's asking for trouble if the signature of the base class differs from that of the subclass. The return value may even be useful occasionally. Given that no spurious FD events are now reported by the unittests, I'm not sure that it is useful to log and ignore them; it may be better to have the exception be raised, as it might expose an app bug, and in my experience it usually ends up in an infinite busy-wait loop once it happens. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
STINNER Victor added the comment: See also #5715 which asks for something similar. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1660009] continuing problem with httplib multiple set-cookie headers
Piotr Dobrogost added the comment: @jjlee What you said re commas in 2007 was wrong and still is. Joining (with commas) multiple header field values having the same field name unconditionally (without knowing it's safe) was not allowed by RFC 2616 and still is not allowed by the upcoming new RFC. See my comment at http://bugs.python.org/issue4773#msg179377 This was fixed in Python 3 - see http://bugs.python.org/issue4773#msg154781 As this is backward incompatible change (and I guess weather this is private api or not does not matter here) and there's working alternative (although it's private api) nothing will be done here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1660009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Richard Oudkerk added the comment: Richard, in Tulip's WSAPoll code, it reads: class WindowsPollPollster(PollPollster): Pollster implementation using WSAPoll. WSAPoll is only available on Windows Vista and later. Python does not currently support WSAPoll, but there is a patch available at http://bugs.python.org/issue16507. Does this means that this code need the patch from issue #16507 to work? Yes. Also, I've read something about IOCP: is this a replacement for WSAPoll, are there plans to get it merged at some point to python (and if yes, would the select module be a proper home for this)? IOCP is not a replacement for WSAPoll (or select). Among other things it is not possible to use the current ssl module with IOCP (although Twisted manages to use IOCP with PyOpenSSL). Tulip should have IOCP support, so presumable when tulip is merged some support for IOCP will also be available in python. But I am not convinced that the select module is the proper home. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable
Eli Bendersky added the comment: On Tue, Jan 8, 2013 at 2:51 PM, Daniel Shahaf rep...@bugs.python.orgwrote: Daniel Shahaf added the comment: Eli Bendersky wrote on Tue, Jan 08, 2013 at 15:00:42 +: Eli Bendersky added the comment: P = import_fresh_module('xml.etree.ElementTree', blocked=['_elementtree']) tb = P.TreeBuilder(element_factory=lambda a, b: [a, b]) print(pickle.dumps(tb)) Gives: _pickle.PicklingError: Can't pickle class 'function': attribute lookup builtins.function failed Is that with or without the patch? Without. Pickle can't handle functions that are not top-level, so bound methods, internal functions, lambdas are all out. So pickling probably wasn't a first priority for the Python version of TreeBuilder as well... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16900] SSL sockets don't give resource warnings
New submission from Benjamin Peterson: Python 3.3.0+ (3.3:ab36d3bb5996+, Jan 8 2013, 17:08:35) [GCC 4.5.4] on linux Type help, copyright, credits or license for more information. import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) del s __main__:1: ResourceWarning: unclosed socket.socket object, fd=3, family=2, type=1, proto=0 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) import ssl ssl.wrap_socket(s) ssl.SSLSocket object, fd=3, family=2, type=1, proto=0 del s We can just remove the __del__ on SSLSocket, right? -- messages: 179394 nosy: benjamin.peterson priority: normal severity: normal status: open title: SSL sockets don't give resource warnings type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16900 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element is no longer pickleable
Daniel Shahaf added the comment: Dissociating TreeBuilder from this issue per recent comments. -- title: xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable - xml.etree.ElementTree.Element is no longer pickleable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
STINNER Victor added the comment: Note that I don't like the idea of falling back to FD_CLOEXEC since it's not atomic, and some people might rely on this. There is a similar question (atomic or best effort) for the #16860 issue. It looks like more people prefer the best effort option. IMO most people prefer to use the best available method to set the close-on-exec flag, but doesn't really care if the method is not atomic (and the OS doesn't provide an atomic function). If someone cannot accept the best effort option: I guess that it is still possible to override TCPServer constructor to ensure that the action is atomic. It would already be a nice piece of progress if you could request the SO_CLOEXEC (with fallback to FD_CLOEXEC), say, in the constructor, or even with a module variable. Yes, close-on-exec flag should be configurable, as TCPServer.allow_reuse_address for example. I like the class attribute, something like TCPServer.close_on_exec, False by default, for example. -- I realize this bugreport cannot fix 35 years of a bad design decision in linux. Well... Ruby made a brave choice :-) Ruby (2.0?) does set close-on-exec flag on *ALL file descriptors (except 0, 1, 2) *by default*: http://bugs.ruby-lang.org/issues/5041 This change solves the problem of having to close all file descriptor after a fork to run a new program (see closed Python issues #11284 and #8052)... if you are not using C extensions creating file descriptors? Ruby applications relying on passing FD to child processes have to explicitly disable close-on-exec the flag: it was done in Unicorn for example. But we can't simply change the default to FD_CLOEXEC, for two reasons: - we can't silently change the Unix semantics - this is going to break some applications: for example, FD inherited across exec is used by super servers such as inetd, and there are others very legitimate uses Yes, changing the default value of the flag (enable close-on-exec by default) will break some applications. But if we chose to do it, developers of these applications can still disable close-on-exec (because the option must be configurable) to fix their application for Python 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
STINNER Victor added the comment: Oh, by the way: I never understood why SimpleXMLRPCServer does set FD_CLOEXEC (since the issue #1222790), whereas TCPServer doesn't. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16901] In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work
New submission from py.user: import http.cookiejar cjf = http.cookiejar.FileCookieJar() cjf.load('file.txt') Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/http/cookiejar.py, line 1767, in load self._really_load(f, filename, ignore_discard, ignore_expires) AttributeError: 'FileCookieJar' object has no attribute '_really_load' import http.cookiejar cjf = http.cookiejar.FileCookieJar('file.txt') cjf.load() Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/http/cookiejar.py, line 1767, in load self._really_load(f, filename, ignore_discard, ignore_expires) AttributeError: 'FileCookieJar' object has no attribute '_really_load' cjf.revert() Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/http/cookiejar.py, line 1789, in revert self.load(filename, ignore_discard, ignore_expires) File /usr/local/lib/python3.3/http/cookiejar.py, line 1767, in load self._really_load(f, filename, ignore_discard, ignore_expires) AttributeError: 'FileCookieJar' object has no attribute '_really_load' -- components: Library (Lib) messages: 179398 nosy: py.user priority: normal severity: normal status: open title: In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16901 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16891] Fix docs about module search order
Nick Coghlan added the comment: The docs sometimes try to draw a sharp distinction between modules and packages, but it's essentially a lie - a package is really just a module with a __path__ attribute, and if you know what you are doing, you make even an ordinary module behave like a package (e.g. os.path) Until 3.3, the import system had too many internal inconsistencies for sane documentation. That's fixed in 3.3, but no comprehensive docs will be happening for earlier versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16891 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16076] xml.etree.ElementTree.Element is no longer pickleable
Daniel Shahaf added the comment: v8 removes TreeBuilder handling (code + tests) and removes memcpy per review. (Outstanding issues in the review can be fixed post-v8, if needed.) -- Added file: http://bugs.python.org/file28639/i16076-v8.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16715] Get rid of IOError. Use OSError instead
py.user added the comment: found a typo (removed LoadError) commit 80f2b1273e8c0e1a28fabe537ae9c5acbbcee187 Author: Andrew Svetlov andrew.svet...@gmail.com Date: Tue Dec 25 16:47:37 2012 +0200 Replace IOError with OSError (#16715) ... diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py index a77dc3f..7928e9b 100644 --- a/Lib/http/cookiejar.py +++ b/Lib/http/cookiejar.py ... @@ -1786,7 +1786,7 @@ class FileCookieJar(CookieJar): self._cookies = {} try: self.load(filename, ignore_discard, ignore_expires) -except (LoadError, IOError): +except OSError: self._cookies = old_state raise -- nosy: +py.user ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
STINNER Victor added the comment: socketserver_close_on_exec.patch: - Add TCPServer.close_on_exec class attribute: True by default if the fcntl module is present, False otherwise - Use SOCK_CLOEXEC if present, fcntl() + FD_CLOEXEC otherwise Even if SOCK_CLOEXEC is present, fcntl() is used to check the flag works (if FD_CLOEXEC was set). If SOCK_CLOEXEC works, fcntl() will not be called anymore, otherwise we fall back to fcntl() + FD_CLOEXEC. I implemented this fallback for Linux older than 2.6.27. I don't know if SOCK_CLOEXEC is simply ignored, as Linux did for O_CLOEXEC, but I don't have such old Linux version to test. I chose to set close-on-exec flag *by default*. If we chose to disable it by default, the following changes should be done on my patch: - TCPServer.close_on_exec : close_on_exec = (fcntl is not None) = close_on_exec = False - SimpleXMLRPCServer: add close_on_exec class attribute, close_on_exec = (fcntl is not None) (and restore try/except ImportError for fcntl) -- keywords: +patch Added file: http://bugs.python.org/file28640/socketserver_close_on_exec.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12107] TCP listening sockets created without FD_CLOEXEC flag
Changes by STINNER Victor victor.stin...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12107 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com