[issue7969] shutil.copytree error handling non-standard and partially broken
Ameya Lokare lokare.am...@gmail.com added the comment: I've attached a proposed doc patch. I figured I'd move the Error argument format in the description of shutil.copytree, since the format is different for other functions (shutil.move, for example). -- keywords: +patch nosy: +lokare.ameya Added file: http://bugs.python.org/file22026/shutil_copytree_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4934] tp_del and tp_version_tag undocumented
Changes by Martin von Gagern martin.vgag...@gmx.net: -- nosy: +gagern ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12068] test_logging failure in test_rollover
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It's not the same error, but there's no point opening another issue for it. The earlier error occurred more frequently, and was specifically due to some changes I made, whereas this error hasn't occurred before and appears to be due to some sort of network glitch. On the same buildbot, later revisions have run without errors, with no changes to test_logging: 162ed9841f147f37d2077a1848eb9aff130b71fb 05836e84e584d3c529e74fba4b99da95df17ef24 c45e92bd4d81713603b7271cc7f61b7457296563 I'll mark as pending and keep an eye on it, but if the failure doesn't recur in the next week or so I'll close the issue again. -- resolution: fixed - status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11969] Can't launch multiproccessing.Process on methods
Ram Rachum cool...@cool-rr.com added the comment: Test attached. -- Added file: http://bugs.python.org/file22027/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1746656] IPv6 Interface naming/indexing functions
STINNER Victor victor.stin...@haypocalc.com added the comment: Here's a patch: - those functions now accept and return str, not bytes arrays You use UTF-8 encoding: +Is, ni[i].if_index, ni[i].if_name); +if (!PyArg_ParseTuple(args, s:if_nametoindex, ifname)) You should also use the FS encoding with surrogateescape error handler: - parse arguments using O format with PyUnicode_FSConverter: it gives you a PyBytes object, then use PyBytes_AS_STRING() and PyBytes_GET_SIZE() - use PyUnicode_DecodeFSDefault() to decode a byte string -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1746656] IPv6 Interface naming/indexing functions
STINNER Victor victor.stin...@haypocalc.com added the comment: Example with a non-ASCII interface name: $ sudo tunctl -u haypo -t unicodeé Set 'unicodeé' persistent and owned by uid 1000 $ sudo ifconfig -a|grep unicode|hexdump -C 75 6e 69 63 6f 64 65 c3 a9 20 4c 69 6e 6b 20 65 |unicode.. Link e| 0010 6e 63 61 70 3a 45 74 68 65 72 6e 65 74 20 20 48 |ncap:Ethernet H| 0020 57 61 64 64 72 20 64 36 3a 30 38 3a 31 63 3a 65 |Waddr d6:08:1c:e| 0030 30 3a 33 33 3a 30 36 20 20 0a|0:33:06 .| 003a So in my setup (UTF-8 locale encoding), U+00E9 is encoded as {0xc3, 0xa9} (UTF-8). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___ 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
New submission from Christophe Devriese christophe.devri...@gmail.com: The specific issue this is creating is that a malicious user could use this socket in a subprocess which is started from a library (ie. I'm using a .so, which calls fork/exec). A second failure mode is starting a daemon from withing, say, a django application. Djano opens a TCP listening socket, then starts up a daemon to provide some sort of service in the background. The daemon keeps running and inherits the socket. Now you restart the django app. It refuses to start ! Why ? Because the socket was inherited, the listening socket isn't actually closed, and this results in the socket being stuck in CLOSE_WAIT as long as the daemon is running. It seems to me that it is almost never the case that you'd want a TCP listening socket to be preserved across exec, and not setting this flag should thus be considered a bug for 2 reasons : 1) it results in accidental disclosure of information that shouldn't be exposed in certain cases. 2) it can result in denial of service Solution : update SocketServer.py : in the class TCPServer add the following 2 lines in __init__ after self.socket = socket( ...: flags = fcntl.fcntl(self.socket, fcntl.F_GETFD) fcntl.fcntl(self.socket, fcntl.F_SETFD, flags | fcntl.FD_CLOEXEC) -- messages: 136273 nosy: Christophe.Devriese priority: normal severity: normal status: open title: TCP listening sockets created without FD_CLOEXEC flag type: security ___ 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 Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ 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
[issue12108] test_packaging monkeypatches httplib
Changes by Antoine Pitrou pit...@free.fr: -- nosy: pitrou priority: normal severity: normal status: open title: test_packaging monkeypatches httplib ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12109] test_packaging monkeypatches httplib
New submission from Antoine Pitrou pit...@free.fr: == ERROR: test_https (test.test_urllib2_localnet.TestUrlopen) -- Traceback (most recent call last): File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 457, in test_https data = self.urlopen(https://localhost:%s/bizarre; % handler.port) File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 364, in urlopen f = urllib.request.urlopen(url, data, **kwargs) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 138, in urlopen return opener.open(url, data, timeout) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 369, in open response = self._open(req, data) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 387, in _open '_open', req) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 347, in _call_chain result = func(*args) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1179, in https_open context=self._context, check_hostname=self._check_hostname) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1116, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) TypeError: https_conn_wrapper() got an unexpected keyword argument 'check_hostname' == ERROR: test_https_with_cafile (test.test_urllib2_localnet.TestUrlopen) -- Traceback (most recent call last): File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 465, in test_https_with_cafile cafile=CERT_localhost) File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 364, in urlopen f = urllib.request.urlopen(url, data, **kwargs) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 138, in urlopen return opener.open(url, data, timeout) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 369, in open response = self._open(req, data) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 387, in _open '_open', req) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 347, in _call_chain result = func(*args) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1179, in https_open context=self._context, check_hostname=self._check_hostname) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1116, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) TypeError: https_conn_wrapper() got an unexpected keyword argument 'check_hostname' -- assignee: tarek components: Distutils2, Tests messages: 136274 nosy: alexis, eric.araujo, pitrou, tarek priority: normal severity: normal stage: needs patch status: open title: test_packaging monkeypatches httplib versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12109 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12110] test_packaging monkeypatches httplib
New submission from Antoine Pitrou pit...@free.fr: == ERROR: test_https (test.test_urllib2_localnet.TestUrlopen) -- Traceback (most recent call last): File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 457, in test_https data = self.urlopen(https://localhost:%s/bizarre; % handler.port) File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 364, in urlopen f = urllib.request.urlopen(url, data, **kwargs) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 138, in urlopen return opener.open(url, data, timeout) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 369, in open response = self._open(req, data) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 387, in _open '_open', req) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 347, in _call_chain result = func(*args) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1179, in https_open context=self._context, check_hostname=self._check_hostname) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1116, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) TypeError: https_conn_wrapper() got an unexpected keyword argument 'check_hostname' == ERROR: test_https_with_cafile (test.test_urllib2_localnet.TestUrlopen) -- Traceback (most recent call last): File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 465, in test_https_with_cafile cafile=CERT_localhost) File D:\Buildslave\3.x.moore-windows\build\lib\test\test_urllib2_localnet.py, line 364, in urlopen f = urllib.request.urlopen(url, data, **kwargs) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 138, in urlopen return opener.open(url, data, timeout) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 369, in open response = self._open(req, data) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 387, in _open '_open', req) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 347, in _call_chain result = func(*args) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1179, in https_open context=self._context, check_hostname=self._check_hostname) File D:\Buildslave\3.x.moore-windows\build\lib\urllib\request.py, line 1116, in do_open h = http_class(host, timeout=req.timeout, **http_conn_args) TypeError: https_conn_wrapper() got an unexpected keyword argument 'check_hostname' -- assignee: tarek components: Distutils2, Tests messages: 136275 nosy: alexis, eric.araujo, pitrou, tarek priority: normal severity: normal stage: needs patch status: open title: test_packaging monkeypatches httplib versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12111] email's use of __setitem__ is highly counterintuitive
New submission from Toni Mueller tonimuel...@users.sourceforge.net: email's usage of __setitem__ is highly counterintuitive to the point of being dangerous. The documented behaviour is (quote): __setitem__(name, val) Add a header to the message with field name name and value val. The field is appended to the end of the message’s existing fields. Note that this does not overwrite or delete any existing header with the same name. If you want to ensure that the new header is the only one present in the message with field name name, delete the field first, e.g.: ... (taken from http://docs.python.org/library/email.message.html ) The use case of *appending* a header of the same type (eg. a Received: header) should be performed by the add_header() method, or an extend_header() method, or something similar, and not by abusing the __setitem__ method. The current behaviour imho deviates extremely from the behaviour of similar libraries in all other programming languages that I'm aware of, and from the standard dict functionality, too. It makes it much too easy to have duplicate headers, esp., duplicate To: headers, resulting in mailbombing and information leakage. For the potential damage, this property of the library is highly under-advertised. A side effect appears to be that trying to have your message headers set up in a unique fashion, probably the most frequent use case, one has to make sure to use each operator only once, or decorate everything with a del msg[myheader], as the operation is not idempotent. -- messages: 136276 nosy: tonimueller priority: normal severity: normal status: open title: email's use of __setitem__ is highly counterintuitive type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12110] test_packaging monkeypatches httplib
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - duplicate status: open - closed superseder: - test_packaging monkeypatches httplib ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12108] test_packaging monkeypatches httplib
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12109] test_packaging monkeypatches httplib
Antoine Pitrou pit...@free.fr added the comment: $ grep -r https_conn_wrapper * Lib/packaging/tests/test_command_upload_docs.py:146:def https_conn_wrapper(*args): Lib/packaging/tests/test_command_upload_docs.py:152: upload_docs_mod.http.client.HTTPSConnection = https_conn_wrapper -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12109 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12109] test_packaging monkeypatches httplib
Roundup Robot devnull@devnull added the comment: New changeset 56aa0aca7186 by Tarek Ziade in branch 'default': Issue #12109 fixing typo in packaging's test_command_upload_docs http://hg.python.org/cpython/rev/56aa0aca7186 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12109 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12111] email's use of __setitem__ is highly counterintuitive
R. David Murray rdmur...@bitdance.com added the comment: This is a long-standing design choice in the email package. If you want to advocate for changing it, please join the email-sig mailing list (see mail.python.org). We are in the process of developing a new version, which will at least reject things like duplicate To headers. I'm closing this issue since as things stand this is not something that is likely to change. If you carry the day in a discussion on the email-sig, we can reopen the issue. In any case it is a feature request, not a bug. -- components: +Library (Lib) nosy: +r.david.murray status: open - closed type: behavior - feature request versions: +Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
New submission from STINNER Victor victor.stin...@haypocalc.com: The locale encoding is not portable, packaging should use UTF-8 instead. Attached patch is a draft to workaround LANG=C ./python -m test test_packaging failures. I'm not sure that my test in Metadata.write_file() of packaging.metadata is a good idea. Moreover, packaging should also maybe use the surrogateescape error handler, but I propose to decide that later and in another issue. We may use this error handler only to read files (like the Python makefile). For write a complete patch, *all* calls to open() in Lib/packaging/* (including Lib/packaging/tests/*) should be checked. distutils uses the locale encoding, which is UTF-8 on Mac OS X and most Linux setup (but never on Windows). But distutils cannot be fixed, whereas packaging is a new module and can be fixed. -- files: packaging_utf8.patch keywords: patch messages: 136280 nosy: haypo priority: normal severity: normal status: open title: The new packaging module should not use the locale encoding versions: Python 3.3 Added file: http://bugs.python.org/file22028/packaging_utf8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Changes by STINNER Victor victor.stin...@haypocalc.com: -- components: +Library (Lib) nosy: +eric.araujo, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #9561 (distutils: set encoding to utf-8 for input and output files) and #6011 (python doesn't build if prefix contains non-ascii characters). If you are curious, read also #8611 (Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)) and #9425 (Rewrite import machinery to work with unicode paths). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Tarek Ziadé ziade.ta...@gmail.com added the comment: Looks good, please commit this -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
New submission from Antoine Pitrou pit...@free.fr: $ ./python -m test -Fv -unetwork test_packaging [...] == ERROR: test_download (packaging.tests.test_pypi_dist.TestDistInfo) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/packaging/tests/pypi_server.py, line 68, in wrapped func(server=server, *args, **kwargs) File /home/antoine/cpython/default/Lib/packaging/tests/test_pypi_dist.py, line 132, in test_download dist.download(self.mkdtemp()) File /home/antoine/cpython/default/Lib/packaging/pypi/dist.py, line 306, in download self._check_md5(filename) File /home/antoine/cpython/default/Lib/packaging/pypi/dist.py, line 339, in _check_md5 % (hashval.hexdigest(), expected_hashval)) packaging.pypi.errors.HashDoesNotMatch: got 8ae6ff9df26ff04232189724d520a17c instead of fe18804c5b722ff024cabdf514924fc4 == FAIL: test_hooks_get_run (packaging.tests.test_dist.DistributionTestCase) -- Traceback (most recent call last): File /home/antoine/cpython/default/Lib/packaging/tests/test_dist.py, line 234, in test_hooks_get_run 'post-test_dist']) AssertionError: Lists differ: ['finalize', 'pre-test_dist', ... != ['finalize', 'pre-test_dist', ... First list contains 4 additional elements. First extra element 4: finalize + ['finalize', 'pre-test_dist', 'run', 'post-test_dist'] - ['finalize', - 'pre-test_dist', - 'run', - 'post-test_dist', - 'finalize', - 'pre-test_dist', - 'run', - 'post-test_dist'] -- -- assignee: tarek components: Distutils2, Tests messages: 136283 nosy: alexis, eric.araujo, pitrou, tarek priority: high severity: normal stage: needs patch status: open title: test_packaging fails when run twice type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12109] test_packaging monkeypatches httplib
Antoine Pitrou pit...@free.fr added the comment: Looks good here, thank you :) -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12109 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
Roundup Robot devnull@devnull added the comment: New changeset 3e0500881003 by Tarek Ziade in branch 'default': Issue #12113: make sure generated module is not reused on a second run http://hg.python.org/cpython/rev/3e0500881003 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12114] packaging.util._find_exe_version(): potential deadlock
New submission from STINNER Victor victor.stin...@haypocalc.com: The following code does deadlock if the subprocess writes a lot of output to stdout and stderr: pipe = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE) try: stdout, stderr = pipe.stdout.read(), pipe.stderr.read() finally: pipe.stdout.close() pipe.stderr.close() Popen.communicate() should be used to avoid the issue. Attached patch uses the .communicate() method and the context manager syntax (with). -- components: Library (Lib) files: packaging_popen_communicate.patch keywords: patch messages: 136286 nosy: haypo, tarek priority: normal severity: normal status: open title: packaging.util._find_exe_version(): potential deadlock versions: Python 3.3 Added file: http://bugs.python.org/file22029/packaging_popen_communicate.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12114 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12115] some tests need to be skipped on threadless systems
New submission from Tarek Ziadé ziade.ta...@gmail.com: == ERROR: packaging.tests.test_command_upload_docs (unittest.loader.ModuleImportFailure) -- Traceback (most recent call last): File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/unittest/case.py, line 407, in _executeTestPart function() File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/unittest/loader.py, line 32, in testFailure raise exception ImportError: Failed to import test module: packaging.tests.test_command_upload_docs Traceback (most recent call last): File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/unittest/loader.py, line 257, in _find_tests module = self._get_module_from_name(name) File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/unittest/loader.py, line 235, in _get_module_from_name __import__(name) File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/packaging/tests/test_command_upload_docs.py, line 14, in module from packaging.tests.pypi_server import PyPIServerTestCase File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/packaging/tests/pypi_server.py, line 36, in module import threading File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/_bootstrap.py, line 437, in load_module return self._load_module(fullname) File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/_bootstrap.py, line 141, in decorated return fxn(self, module, *args, **kwargs) File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/_bootstrap.py, line 342, in _load_module exec(code_object, module.__dict__) File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/threading.py, line 4, in module import _thread ImportError: No module named '_thread' -- assignee: tarek components: Library (Lib) messages: 136287 nosy: alexis, tarek priority: normal severity: normal status: open title: some tests need to be skipped on threadless systems versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
Antoine Pitrou pit...@free.fr added the comment: Still fails on test_download. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10419] distutils command build_scripts fails with UnicodeDecodeError
Roundup Robot devnull@devnull added the comment: New changeset cc5cfeaa4a8d by Victor Stinner in branch 'default': Issue #10419, issue #6011: port 6ad356525381 fix from distutils to packaging http://hg.python.org/cpython/rev/cc5cfeaa4a8d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: I ported a distutils fix (for non-ASCII path) into packaging: New changeset cc5cfeaa4a8d by Victor Stinner in branch 'default': Issue #10419, issue #6011: port 6ad356525381 fix from distutils to packaging http://hg.python.org/cpython/rev/cc5cfeaa4a8d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Antoine Pitrou pit...@free.fr added the comment: +if not isinstance(fileobject, StringIO): +encoding = codecs.lookup(fileobject.encoding).name IMO you should try to get the encoding attribute and silence the AttributeError instead. (also, I'm not even sure why you're adding this check) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
Antoine Pitrou pit...@free.fr added the comment: Also, the hash value is different every time: packaging.pypi.errors.HashDoesNotMatch: got 043840092b5baf155fc94a77319c5f44 instead of fe18804c5b722ff024cabdf514924fc4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12115] some tests need to be skipped on threadless systems
Roundup Robot devnull@devnull added the comment: New changeset 2c01bda139a7 by Tarek Ziade in branch 'default': Issue #12115: skipping all tests that need threading under a threadless environment http://hg.python.org/cpython/rev/2c01bda139a7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
Tarek Ziadé ziade.ta...@gmail.com added the comment: my commit fixed only the first issue. the second one is a separate issue that needs more investigation -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12077] Harmonizing descriptor protocol documentation
Jay Parlar par...@gmail.com added the comment: Another problem is that the examples and text in the section Functions and Methods is no longer correct in 3.x. Namely the the references to unbound methods, and the example showing an unbound method being returned when accessing a method of a class. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12113] test_packaging fails when run twice
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12113 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12114] packaging.util._find_exe_version(): potential deadlock
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12114 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12116] io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer
New submission from STINNER Victor victor.stin...@haypocalc.com: Example: with open(setup.py, rb) as f: # read smaller than the file size to fill the readahead buffer f.read(1) # seek doesn't seek f.seek(0) print(f pos=, f.tell()) print(f.raw pos=, f.raw.tell()) Output: f pos= 0 f.raw pos= 4096 I expect f.raw.tell() to be 0. Extract of Modules/_io/buffered.c: if (whence != 2 self-readable) { Py_off_t current, avail; /* Check if seeking leaves us inside the current buffer, so as to return quickly if possible. Also, we needn't take the lock in this fast path. Don't know how to do that when whence == 2, though. */ /* NOTE: RAW_TELL() can release the GIL but the object is in a stable state at this point. */ current = RAW_TELL(self); avail = READAHEAD(self); printf(current=% PY_PRIdOFF , avail=% PY_PRIdOFF \n, current, avail); if (avail 0) { Py_off_t offset; if (whence == 0) offset = target - (current - RAW_OFFSET(self)); else offset = target; printf(offset=% PY_PRIdOFF \n, offset); if (offset = -self-pos offset = avail) { printf(NO SEEK!\n); self-pos += offset; return PyLong_FromOff_t(current - avail + offset); } } } I found this weird behaviour when trying to understand why: with open(setup.py, 'rb') as f: encoding, lines = tokenize.detect_encoding(f.readline) with open(setup.py, 'r', encoding=encoding) as f: imp.load_module(setup, f, setup.py, (.py, r, imp.PY_SOURCE)) is different than: with tokenize.open(setup.py) as f: imp.load_module(setup, f, setup.py, (.py, r, imp.PY_SOURCE)) imp.load_module() clones the file using something like fd = os.dup(f.fileno()); clone = os.fdopen(fd, r). For tokenizer.open(), a workaround is to replace: buffer.seek(0) by buffer.seek(0); buffer.raw.seek(0) -- components: IO messages: 136296 nosy: haypo, pitrou priority: normal severity: normal status: open title: io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12116] io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer
STINNER Victor victor.stin...@haypocalc.com added the comment: Note: _pyio.BufferedReader(), _pyio.BufferedWriter(), _pyio.BufferedRandom() don't use this optimization. They might be patched too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12116] io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer
Antoine Pitrou pit...@free.fr added the comment: This is by design. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12117] test_importlib failure
New submission from Antoine Pitrou pit...@free.fr: I get the following failure under a fresh checkout: == ERROR: test_file_from_empty_string_dir (importlib.test.source.test_file_loader.SimpleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/importlib/test/source/test_file_loader.py, line 129, in test_file_from_empty_string_dir shutil.rmtree(pycache) File /home/antoine/t/cpython/Lib/shutil.py, line 270, in rmtree onerror(os.listdir, path, sys.exc_info()) File /home/antoine/t/cpython/Lib/shutil.py, line 268, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '__pycache__' -- assignee: brett.cannon components: Tests messages: 136299 nosy: barry, brett.cannon, ncoghlan, pitrou priority: normal severity: normal status: open title: test_importlib failure type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12118] test_imp failure
New submission from Antoine Pitrou pit...@free.fr: I get the following failure under a fresh checkout: == ERROR: test_issue5604 (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_imp.py, line 163, in test_issue5604 temp_mod_name, imp.cache_from_source(temp_mod_name + '.py')) IOError: [Errno 2] No such file or directory -- components: Tests messages: 136300 nosy: barry, brett.cannon, ncoghlan, pitrou priority: normal severity: normal status: open title: test_imp failure type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12119] test_distutils failure
New submission from Antoine Pitrou pit...@free.fr: I get the following failure under a fresh checkout: == FAIL: test_package_data (distutils.tests.test_build_py.BuildPyTestCase) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/distutils/tests/test_build_py.py, line 61, in test_package_data self.assertTrue(__init__.pyc in files) AssertionError: False is not true -- assignee: tarek components: Distutils, Tests messages: 136301 nosy: eric.araujo, pitrou, tarek priority: normal severity: normal status: open title: test_distutils failure type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12119] test_distutils failure
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +alexis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
New submission from Antoine Pitrou pit...@free.fr: I get the following failure under a fresh checkout: == FAIL: test_package_data (packaging.tests.test_command_build_py.BuildPyTestCase) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/packaging/tests/test_command_build_py.py, line 64, in test_package_data self.assertIn(__init__.pyc, files) AssertionError: '__init__.pyc' not found in ['README.txt', '__init__.py'] -- assignee: tarek components: Distutils2, Tests messages: 136302 nosy: alexis, eric.araujo, pitrou, tarek priority: normal severity: normal status: open title: test_packaging failure type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12121] test_packaging failure when ssl is not available
New submission from Antoine Pitrou pit...@free.fr: I get the following failure when the ssl module is not available: == ERROR: test_https_connection (packaging.tests.test_command_upload_docs.UploadDocsTestCase) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/packaging/tests/test_command_upload_docs.py, line 151, in test_https_connection orig_https = upload_docs_mod.http.client.HTTPSConnection AttributeError: 'module' object has no attribute 'HTTPSConnection' -- assignee: tarek components: Distutils2, Tests messages: 136303 nosy: alexis, eric.araujo, pitrou, tarek priority: high severity: normal stage: needs patch status: open title: test_packaging failure when ssl is not available type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12121 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12122] test_runpy failure
New submission from Antoine Pitrou pit...@free.fr: I get the following failures in a fresh checkout: == ERROR: test_explicit_relative_import (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 283, in test_explicit_relative_import self._check_relative_imports(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_main_relative_import (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 288, in test_main_relative_import self._check_relative_imports(depth, __main__) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_run_module (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 273, in test_run_module self._check_module(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 177, in _check_module make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_run_package (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 278, in test_run_package self._check_package(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 201, in _check_package make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory Here is the test output: test_run_code (test.test_runpy.RunModuleCodeTest) ... ok test_run_module_code (test.test_runpy.RunModuleCodeTest) ... ok test_explicit_relative_import (test.test_runpy.RunModuleTest) ... Testing relative imports at depth: 2 Package tree in: /tmp/tmpmruwyg Updated sys.path: /tmp/tmpmruwyg Next level in: /tmp/tmpmruwyg/__runpy_pkg__ Created: /tmp/tmpmruwyg/__runpy_pkg__/__init__.py Next level in: /tmp/tmpmruwyg/__runpy_pkg__/__runpy_pkg__ Created: /tmp/tmpmruwyg/__runpy_pkg__/__runpy_pkg__/__init__.py Created: /tmp/tmpmruwyg/__runpy_pkg__/__runpy_pkg__/runpy_test.py Added sibling module: /tmp/tmpmruwyg/__runpy_pkg__/__runpy_pkg__/sibling.py Added uncle package: /tmp/tmpmruwyg/__runpy_pkg__/uncle Added cousin package: /tmp/tmpmruwyg/__runpy_pkg__/uncle/cousin Added nephew module: /tmp/tmpmruwyg/__runpy_pkg__/uncle/cousin/nephew.py Running from source: __runpy_pkg__.__runpy_pkg__.runpy_test Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_invalid_names (test.test_runpy.RunModuleTest) ... ok test_library_module (test.test_runpy.RunModuleTest) ... ok test_main_relative_import (test.test_runpy.RunModuleTest) ... Testing main relative imports at depth: 2 Package tree in: /tmp/tmp39sx5n Updated sys.path: /tmp/tmp39sx5n Next level in: /tmp/tmp39sx5n/__runpy_pkg__ Created: /tmp/tmp39sx5n/__runpy_pkg__/__init__.py Next level in: /tmp/tmp39sx5n/__runpy_pkg__/__runpy_pkg__ Created: /tmp/tmp39sx5n/__runpy_pkg__/__runpy_pkg__/__init__.py Created: /tmp/tmp39sx5n/__runpy_pkg__/__runpy_pkg__/runpy_test.py Added sibling module: /tmp/tmp39sx5n/__runpy_pkg__/__runpy_pkg__/sibling.py Added uncle package: /tmp/tmp39sx5n/__runpy_pkg__/uncle Added cousin package: /tmp/tmp39sx5n/__runpy_pkg__/uncle/cousin Added nephew module: /tmp/tmp39sx5n/__runpy_pkg__/uncle/cousin/nephew.py Running from source: __runpy_pkg__.__runpy_pkg__.runpy_test Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_run_module (test.test_runpy.RunModuleTest) ... Testing package depth: 0 Package tree in: /tmp/tmpy4y7in Updated sys.path: /tmp/tmpy4y7in Created: /tmp/tmpy4y7in/runpy_test.py Running from source: runpy_test Removed sys.modules entries
[issue12123] test_import failures
New submission from Antoine Pitrou pit...@free.fr: I get the following failures under a fresh checkout: == ERROR: test_file_to_source (test.test_import.ImportTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 253, in test_file_to_source make_legacy_pyc(source) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test___cached___legacy_pyc (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 584, in test___cached___legacy_pyc pyc_file = make_legacy_pyc(self.source) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_missing_source_legacy (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 564, in test_missing_source_legacy pyc_file = make_legacy_pyc(self.source) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == FAIL: test_execute_bit_not_copied (test.test_import.ImportTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 112, in test_execute_bit_not_copied self.fail(__import__ did not result in creation of AssertionError: __import__ did not result in creation of either a .pyc or .pyo file == FAIL: test_import_pyc_path (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 531, in test_import_pyc_path self.assertTrue(os.path.exists('__pycache__')) AssertionError: False is not true == FAIL: test_missing_source (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 552, in test_missing_source self.assertTrue(os.path.exists(pyc_file)) AssertionError: False is not true == FAIL: test_unwritable_directory (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 543, in test_unwritable_directory self.assertTrue(os.path.exists('__pycache__')) AssertionError: False is not true -- components: Tests messages: 136305 nosy: barry, brett.cannon, ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: test_import failures type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12116] io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer
STINNER Victor victor.stin...@haypocalc.com added the comment: And how can I seek the raw file to zero? Using buffer.raw.seek(0), buffer.tell() becomes inconsistent: $ ./python Python 3.2.1b1 (3.2:bd5e4d8c8080, May 15 2011, 10:22:54) buffer=open('setup.py', 'rb') buffer.read(1) buffer.tell() 1 buffer.raw.tell() 4096 buffer.raw.seek(0) 0 buffer.raw.tell() 0 buffer.tell() -4095 Same problem with os.lseek(): $ ./python Python 3.2.1b1 (3.2:bd5e4d8c8080, May 15 2011, 10:22:54) import os buffer=open(setup.py, rb) buffer.read(1) os.lseek(buffer.fileno(), 0, 0) 0 buffer.raw.tell() 0 buffer.tell() -4095 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1006238] cross compile patch
wrobell wrob...@pld-linux.org added the comment: What is the current status of this patch? What is missing to apply it upstream? -- nosy: +wrobell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1006238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Tarek Ziadé ziade.ta...@gmail.com added the comment: on it -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12116] io.Buffer*.seek() doesn't seek if seeking leaves us inside the current buffer
Antoine Pitrou pit...@free.fr added the comment: Simple: you are not supposed to use the raw file if you wrapped it inside a buffered file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Tarek Ziadé ziade.ta...@gmail.com added the comment: I cannot reproduce this. there's exactly the same test in distutils, so I am wondering why it passes there and not in packaging for you. Any special way to run the tests ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Antoine Pitrou pit...@free.fr added the comment: I cannot reproduce this. there's exactly the same test in distutils, so I am wondering why it passes there and not in packaging for you. It doesn't. Have you seen http://bugs.python.org/issue12119 ? Any special way to run the tests ? No. This is a fresh checkout on a fresh Linux install. Only zlib is available (not bz2 etc.). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Roundup Robot devnull@devnull added the comment: New changeset fe740c1cee02 by Victor Stinner in branch 'default': Issue #12112: packaging reads and writes setup.cfg using UTF-8 http://hg.python.org/cpython/rev/fe740c1cee02 New changeset 01d61096140a by Victor Stinner in branch 'default': Issue #12112: packaging reads/writes metadata using UTF-8 http://hg.python.org/cpython/rev/01d61096140a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
STINNER Victor victor.stin...@haypocalc.com added the comment: What is the MainProgram.inspect_file() function in packaging.create? Which kind of file should it process? = What is the encoding of the input files? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1298835] vendor-packages directory.
Danek Duvall duv...@comfychair.org added the comment: So this has come up again within the Solaris group. Since Rich's original request, we've been using a vendor-packages.pth file in the site-packages directory, which enables the vendor-packages directory. However, I have a concern that this would completely disappear when Py_NoSiteFlag is enabled. I would like to run the interpreter with -SE on all system-provided scripts, so that modules installed by the user in a private PYTHONPATH or in site-packages via easy_install (or similar) don't inadvertently interpose on system-provided modules which are the ones we've tested against. I'm attaching a patch (against 2.6.4; sorry, haven't looked at anything newer yet) that modifies pythonrun.c to add initvendor() as a parallel with initmain() and initsite(), and is always run, regardless of Py_NoSiteFlag, but inserts vendor-packages after site-packages for when the user or a script is okay with the potential interposition. If support for vendor-packages is being considered in general, I'd like to address the request for a rationale that has been brought up a handful of times before. Specifically, distro vendors (such as ourselves) want to be able to deliver non-core python modules -- some written ourselves, some available from the community at large. If we do that in the canonical site-packages directory, then those modules are at risk of being overwritten by local administrators installing python packages as they normally would. This means that system programs -- including critical ones on Solaris, such as the packaging system -- might suddenly stop working. If we separate the vendor space from the end-user space, then local admins can do anything they want without fear of breaking the system. And if they really want to replace the vendor-supplied modules, then they can either go to the lengths of making the modules install in vendor-packages, or build using the same mechanisms we do (whi ch for almost all the python we ship are still open-source) and install the resulting (system, not python) package. I'd love feedback on my patch, regardless. -- nosy: +dhduvall Added file: http://bugs.python.org/file22030/vps.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Tarek Ziadé ziade.ta...@gmail.com added the comment: That's not used anymore, I am going to strip it -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12122] test_runpy failure
Nick Coghlan ncogh...@gmail.com added the comment: It still works fine for me (as do test_imp, test_import and test_importlib). Did you provide any arguments to ./configure, or provide any interesting options to regrtest to get it to fail? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12122] test_runpy failure
Nick Coghlan ncogh...@gmail.com added the comment: Oh, that's the other question - is there any chance you are passing -B or have PYTHONDONTWRITEBYTECODE set? (I'm not sure that would affect make_legacy_pyc, but all the errors you posted relate to unexpectedly absent pyc files and directories) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12122] test_runpy failure
Antoine Pitrou pit...@free.fr added the comment: Indeed, PYTHONDONTWRITEBYTECODE seems set by default on this Linux install... Ouch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Antoine Pitrou pit...@free.fr added the comment: This is due to PYTHONDONTWRITEBYTECODE being set. Not sure this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12123] test_import failures
Antoine Pitrou pit...@free.fr added the comment: This is due to PYTHONDONTWRITEBYTECODE being set. Not sure this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12119] test_distutils failure
Antoine Pitrou pit...@free.fr added the comment: This is due to PYTHONDONTWRITEBYTECODE being set. Not sure this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12118] test_imp failure
Antoine Pitrou pit...@free.fr added the comment: This is due to PYTHONDONTWRITEBYTECODE being set. Not sure this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12117] test_importlib failure
Antoine Pitrou pit...@free.fr added the comment: This is due to PYTHONDONTWRITEBYTECODE being set. Not sure this is worth fixing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Tarek Ziadé ziade.ta...@gmail.com added the comment: a well, we can skip that pyc test in case PYTHONDONTWRITEBYTECODE is set, thanks ! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Antoine Pitrou pit...@free.fr added the comment: a well, we can skip that pyc test in case PYTHONDONTWRITEBYTECODE is set, thanks ! It's better to test sys.flags.dont_write_bytecode, actually. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
Roundup Robot devnull@devnull added the comment: New changeset 9d1fb6a9104b by Tarek Ziade in branch 'default': Issue #12120, Issue #12119: tests were missing a sys.dont_write_bytecode check http://hg.python.org/cpython/rev/9d1fb6a9104b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Charles-François Natali neolo...@free.fr added the comment: Here's a patch adding O_CLOEXEC to the os module, with test. This patch makes it possible to open and set a FD CLOEXEC atomically. O_CLOEXEC is part of POSIX.1-2008, supported by the Linux kernel since 2.6.23 and has been committed recently to FreeBSD. Note that I'm not sure that adding this flag to built-in open() is necessarily a good idea, because it's not portable and low-level. The same functionality can be more or less achieved with: f = os.fdopen(os.open('/etc/fstab', os.O_RDONLY|os.O_CLOEXEC)) -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file22031/os_cloexec.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
STINNER Victor victor.stin...@haypocalc.com added the comment: Using spawn_python() to check that os.O_CLOEXEC flag is correctly set seems overkill. Why not just testing fcntl.fcntl(f.fileno(), fcntl.F_GETFL) FD_CLOEXEC)? I don't think that there are OSes with O_CLOEXEC but without fcntl(F_GETFL). Note that I'm not sure that adding this flag to built-in open() is necessarily a good idea I agree. open() documentation may explain the os.fdopen(os.open()) trick to use low-level options like O_SYNC or O_CLOEXEC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: +1 for the patch! Note that fdopen is now a simple call to open(), so theses lines are equivalent: python2.7: open(filename, 're') python3.3: open(os.open(filename, os.O_RDONLY|os.O_CLOEXEC)) -- resolution: - accepted stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12112] The new packaging module should not use the locale encoding
Roundup Robot devnull@devnull added the comment: New changeset a636cb1b7f84 by Victor Stinner in branch 'default': Issue #12112: fix the encoding of setup.py in the packaging module http://hg.python.org/cpython/rev/a636cb1b7f84 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12112 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12104] os.path.join('/some/path', '') adds extra slash at end of result
Brian Curtin br...@python.org added the comment: This is intentional. See the implementation of join in Lib/posixpath.py and the Windows implementation in Lib/ntpath.py which also includes a comment explaining why. # path is not empty and does not end with a backslash, # but b is empty; since, e.g., split('a/') produces # ('a', ''), it's best if join() adds a backslash in # this case. -- nosy: +brian.curtin resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6727] ImportError when package is symlinked on Windows
Jason R. Coombs jar...@jaraco.com added the comment: MS Connect is apparently only for projects under active development, not mature, released products. I've posted to the MSDN forums, where with my MSDN account, I can expect priority support from MS personnel. http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/93ebb061-d952-4650-b15c-30548a6649a8 I hope this helps resolve the issue at its source. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6727 ___ ___ 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 Antoine Pitrou pit...@free.fr: -- nosy: +charles-francois.natali, gregory.p.smith ___ 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
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Charles-François Natali neolo...@free.fr added the comment: Using spawn_python() to check that os.O_CLOEXEC flag is correctly set seems overkill. Why not just testing fcntl.fcntl(f.fileno(), fcntl.F_GETFL) FD_CLOEXEC)? Because I couldn't find a place where the CLOEXEC flag was fully tested (I mean, checking in the child process that the FD was correctly closed), so I took the opportunity to test it thoroughly here. But you're right it's maybe a little bit overkill, so here's a patch using just F_GETFL. Pick up whichever you like. Note that I'm not sure that adding this flag to built-in open() is necessarily a good idea I agree. OK. open() documentation may explain the os.fdopen(os.open()) trick to use low-level options like O_SYNC or O_CLOEXEC. Why not, but I leave it to someone more comfortable with documentation than me :-) -- Added file: http://bugs.python.org/file22032/os_cloexec_1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___diff -r 9d1fb6a9104b Doc/library/os.rst --- a/Doc/library/os.rstThu May 19 19:56:12 2011 +0200 +++ b/Doc/library/os.rstThu May 19 22:21:09 2011 +0200 @@ -1298,6 +1298,7 @@ O_NOCTTY O_SHLOCK O_EXLOCK + O_CLOEXEC These constants are only available on Unix. diff -r 9d1fb6a9104b Lib/test/test_posix.py --- a/Lib/test/test_posix.pyThu May 19 19:56:12 2011 +0200 +++ b/Lib/test/test_posix.pyThu May 19 22:21:09 2011 +0200 @@ -9,6 +9,7 @@ import sys import time import os +import fcntl import pwd import shutil import stat @@ -307,6 +308,12 @@ fp1.close() fp2.close() +@unittest.skipUnless(hasattr(os, 'O_CLOEXEC'), needs os.O_CLOEXEC) +def test_oscloexec(self): +fd = os.open(support.TESTFN, os.O_RDONLY|os.O_CLOEXEC) +self.addCleanup(os.close, fd) +self.assertTrue(fcntl.fcntl(fd, fcntl.F_GETFD) fcntl.FD_CLOEXEC) + def test_osexlock(self): if hasattr(posix, O_EXLOCK): fd = os.open(support.TESTFN, diff -r 9d1fb6a9104b Modules/posixmodule.c --- a/Modules/posixmodule.c Thu May 19 19:56:12 2011 +0200 +++ b/Modules/posixmodule.c Thu May 19 22:21:09 2011 +0200 @@ -9783,6 +9783,9 @@ #ifdef PRIO_USER if (ins(d, PRIO_USER, (long)PRIO_USER)) return -1; #endif +#ifdef O_CLOEXEC +if (ins(d, O_CLOEXEC, (long)O_CLOEXEC)) return -1; +#endif /* posix - constants for *at functions */ #ifdef AT_SYMLINK_NOFOLLOW if (ins(d, AT_SYMLINK_NOFOLLOW, (long)AT_SYMLINK_NOFOLLOW)) return -1; ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12124] python -m test test_packaging test_zipimport failure
New submission from STINNER Victor victor.stin...@haypocalc.com: python -m test test_packaging test_zipimport fails with: == FAIL: testAFakeZlib (test.test_zipimport.CompressedZipImportTestCase) -- Traceback (most recent call last): File /home/haypo/prog/HG/cpython/Lib/test/test_zipimport.py, line 130, in testAFakeZlib self.fail(expected test to raise ImportError) AssertionError: expected test to raise ImportError The problem is that the zipimport module keeps a reference to zlib.decompress() which makes zlib.decompress immortal: see get_decompress_func() in zipimport.c. Attached patch replaces the borrowed reference by a classic reference to allow to unload zlib. I don't think that it makes zipimport slower: it calls PyImport_ImportModuleNoBlock(io) and PyObject_GetAttrString(zlib, decompress) each time instead of just once, but PyImport_ImportModuleNoBlock() is just a lookup in a dict (if the zlib module is not unloaded between two calls to get_data()). -- components: Extension Modules, Tests files: zipimport_get_data.patch keywords: patch messages: 136334 nosy: haypo, tarek priority: normal severity: normal status: open title: python -m test test_packaging test_zipimport failure versions: Python 3.3 Added file: http://bugs.python.org/file22033/zipimport_get_data.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12124] python -m test test_packaging test_zipimport failure
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12124] python -m test test_packaging test_zipimport failure
STINNER Victor victor.stin...@haypocalc.com added the comment: OMG! I understood why the bug was not seen before: python -m test test_zipimport test_zipimport succeed because test_zipimport REMOVES testAFakeZlib tests after the first run! New patch to remove this ugly hack (it is no more needed with my patch anyway). -- Added file: http://bugs.python.org/file22034/zipimport_get_data-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12124] python -m test test_packaging test_zipimport failure
STINNER Victor victor.stin...@haypocalc.com added the comment: test_zipimport REMOVES testAFakeZlib tests after the first run hack was introduced by a commit supposed to test zipimport a bit more :-) changeset: 36383:7b3d915b6e9d branch: legacy-trunk user:Neal Norwitz nnorw...@gmail.com date:Mon Jan 23 07:52:13 2006 + files: Lib/test/test_zipimport.py description: Test zipimporter a bit more. Also get working with -R :: option for finding ref leaks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12124 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1449496] Python should use 3GB Address Space on Windows
Chad Austin c...@imvu.com added the comment: IMVU's downloadable client is built atop CPython. 80% of our users use 32-bit Windows and 20% use 64-bit Windows. We do not intend to provide 64-bit builds of our application for many of the same reasons sketched out in http://blogs.msdn.com/b/ricom/archive/2009/06/10/visual-studio-why-is-there-no-64-bit-version.aspx Process address space is one of our key bottlenecks: limiting the amount of cache we can mmap in, various runtime heap reserves, etc. For those 20% of users running 64-bit Windows, /LARGEADDRESSAWARE would give 32-bit Python access to 4 GB of address space, which would certainly help them. The other reason not to use 64-bit binaries is that they consume significantly more memory and cache, especially because Python is so pointer-heavy. In the meantime, we can use editbin /LARGEADDRESSAWARE to modify the shipped .exes. -- nosy: +Chad.Austin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1449496 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4558] with_stdc89
Roumen Petrov bugtr...@roumenpetrov.info added the comment: Issue with inline was resolved by configure macro. -- Added file: http://bugs.python.org/file22035/python3-20110520-c89.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4558 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3754] cross-compilation support for python build
Changes by Roumen Petrov bugtr...@roumenpetrov.info: Added file: http://bugs.python.org/file22036/python-py3k-20110520-CROSS.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3871] cross and native build of python for mingw32 with distutils
Roumen Petrov bugtr...@roumenpetrov.info added the comment: ...py3k-20110520...: with updates of integrated recently distutil2 (require patch from #3754 with same time-stamp). -- Added file: http://bugs.python.org/file22037/python-py3k-20110520-MINGW.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12124] python -m test test_packaging test_zipimport failure
Roundup Robot devnull@devnull added the comment: New changeset 52d9183b34f8 by Victor Stinner in branch '3.1': Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore http://hg.python.org/cpython/rev/52d9183b34f8 New changeset a043d8e168b3 by Victor Stinner in branch '3.2': (Merge 3.1) Issue #12124: zipimport doesn't keep a reference to http://hg.python.org/cpython/rev/a043d8e168b3 New changeset 9e13869b7639 by Victor Stinner in branch 'default': (Merge 3.2) Issue #12124: zipimport doesn't keep a reference to http://hg.python.org/cpython/rev/9e13869b7639 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12124 ___ ___ 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
Charles-François Natali neolo...@free.fr added the comment: Hello Christophe, First and foremost, I think that the FD_CLOEXEC approach is terminally broken, as it should have been the default in Unix. Now, we're stuck with this bad design. 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 in the class TCPServer add the following 2 lines in __init__ after self.socket = socket( ...: flags = fcntl.fcntl(self.socket, fcntl.F_GETFD) fcntl.fcntl(self.socket, fcntl.F_SETFD, flags | fcntl.FD_CLOEXEC) There are at least two problems with this approach: 1) there's a race between the socket creation and the call to fcntl 2) accept doesn't necessarily inherit the FD_CLOEXEC flag 1) can be fixed on systems that support it through SOCK_CLOEXEC 2) can be fixed on systems that support it through accept4(), but it seems to break badly on some systems, see issue #10115 But I think this is a perfectly legitimate request, so one approach to tackle this problem could be: - since accept4() seems to fail so badly in some configurations, the only portable and reliable choice left is probably to call accept() then fcntl(FD_CLOEXEC) (there's a race, but it's better than nothing). We might reconsider this syscall in a couple years when we're sure it's implemented correctly - in the socketserver module, add a new set_socket_cloexec attribute to BaseServer, which would do the right thing (i.e. create the socket with SOCK_CLOEXEC if available, otherwise call fcntl(FD_CLOEXEC)), and in TCPServer, call fcntl(FD_CLOEXEC) after accept. That way, this would at least fix the problem for people using the socketserver module. People using sockets directly of course have the option of using SOCK_CLOEXEC and fcntl(FD_CLOEXEC) explicitely in their code. Gregory, any thoughts on this? -- ___ 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
[issue12125] test_sysconfig fails on OpenIndiana because of test_packaging
New submission from STINNER Victor victor.stin...@haypocalc.com: It looks like a test of test_packaging removes some data from sysconfig._SCHEMES: http://www.python.org/dev/buildbot/all/builders/AMD64%20OpenIndiana%203.x/builds/1239/steps/test/logs/stdio == ERROR: test_build_ext (packaging.tests.test_command_build_ext.BuildExtTestCase) -- Traceback (most recent call last): File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/packaging/tests/test_command_build_ext.py, line 58, in test_build_ext cmd.ensure_finalized() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/packaging/command/cmd.py, line 104, in ensure_finalized self.finalize_options() File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/packaging/command/build_ext.py, line 159, in finalize_options py_include = sysconfig.get_path('include') File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/sysconfig.py, line 436, in get_path return get_paths(scheme, vars, expand)[name] KeyError: 'include' ... == ERROR: test_get_path (test.test_sysconfig.TestSysConfig) -- Traceback (most recent call last): File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_sysconfig.py, line 110, in test_get_path res = get_path(name, scheme) File /export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/sysconfig.py, line 436, in get_path return get_paths(scheme, vars, expand)[name] KeyError: 'confdir' *** I fixed a cleanup function in Lib/packaging/tests/test_command_install_data.py: commit [6267a4645f5f]. Let see if it does fix the bug or not. -- components: Tests messages: 136342 nosy: haypo, tarek priority: normal severity: normal status: open title: test_sysconfig fails on OpenIndiana because of test_packaging versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12125 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12118] test_imp failure
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #12117. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12118 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12119] test_distutils failure
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #12117. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12123] test_import failures
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #12117. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12122] test_runpy failure
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #12117. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12122 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12120] test_packaging failure
STINNER Victor victor.stin...@haypocalc.com added the comment: Duplicate of #12117. -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12120 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12117] test_importlib failure
STINNER Victor victor.stin...@haypocalc.com added the comment: The following issues has been marked as a duplicate of this issue: - issue #12118 (test_imp) - issue #12119 (test_distutils) - issue #12120 (test_packaging) - issue #12122 (test_runpy) - issue #12123 (test_import) Tarek did the following commit to try to fix test_packaging: New changeset 9d1fb6a9104b by Tarek Ziade in branch 'default': Issue #12120, Issue #12119: tests were missing a sys.dont_write_bytecode check http://hg.python.org/cpython/rev/9d1fb6a9104b -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12117] test_importlib failure
STINNER Victor victor.stin...@haypocalc.com added the comment: Traceback of the duplicate issues: == ERROR: test_issue5604 (test.test_imp.ImportTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_imp.py, line 163, in test_issue5604 temp_mod_name, imp.cache_from_source(temp_mod_name + '.py')) IOError: [Errno 2] No such file or directory == FAIL: test_package_data (distutils.tests.test_build_py.BuildPyTestCase) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/distutils/tests/test_build_py.py, line 61, in test_package_data self.assertTrue(__init__.pyc in files) AssertionError: False is not true == FAIL: test_package_data (packaging.tests.test_command_build_py.BuildPyTestCase) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/packaging/tests/test_command_build_py.py, line 64, in test_package_data self.assertIn(__init__.pyc, files) AssertionError: '__init__.pyc' not found in ['README.txt', '__init__.py'] == ERROR: test_explicit_relative_import (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 283, in test_explicit_relative_import self._check_relative_imports(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_main_relative_import (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 288, in test_main_relative_import self._check_relative_imports(depth, __main__) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_run_module (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 273, in test_run_module self._check_module(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 177, in _check_module make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_run_package (test.test_runpy.RunModuleTest) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 278, in test_run_package self._check_package(depth) File /home/antoine/t/cpython/Lib/test/test_runpy.py, line 201, in _check_package make_legacy_pyc(mod_fname) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test_file_to_source (test.test_import.ImportTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 253, in test_file_to_source make_legacy_pyc(source) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory == ERROR: test___cached___legacy_pyc (test.test_import.PycacheTests) -- Traceback (most recent call last): File /home/antoine/t/cpython/Lib/test/test_import.py, line 584, in test___cached___legacy_pyc pyc_file = make_legacy_pyc(self.source) File /home/antoine/t/cpython/Lib/test/support.py, line 217, in
[issue12117] test_importlib failure
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +alexis, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12117] Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: test_importlib failure - Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12126] incorrect select documentation
New submission from Jean-Paul Calderone invalid@example.invalid: http://docs.python.org/py3k/howto/sockets.html#non-blocking-sockets And if you put a socket in more than one input list, it will only be (at most) in one output list. import socket s = socket.socket() s.connect(('localhost', 22)) import select select.select([s], [s], []) ([socket._socketobject object at 0xb764333c], [socket._socketobject object at 0xb764333c], []) -- assignee: docs@python components: Documentation messages: 136350 nosy: docs@python, exarkun priority: normal severity: normal status: open title: incorrect select documentation type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12126 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12104] os.path.join('/some/path', '') adds extra slash at end of result
R. David Murray rdmur...@bitdance.com added the comment: See also #9921. -- nosy: +r.david.murray resolution: rejected - duplicate superseder: - os.path.join('x','') behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12104 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12127] Inconsistent leading zero treatment
New submission from Peter Wentworth p.wentwo...@ict.ru.ac.za: In Python 3 we no longer have octal literals. The assignment x = 0050 gives an invalid token error. But the assignment y = int(0050) assigns the value 50 to y. I would advocate consistency in the two situations, and prefer that leading zeros should be permitted on numbers. -- components: Interpreter Core messages: 136352 nosy: Peter.Wentworth priority: normal severity: normal status: open title: Inconsistent leading zero treatment type: compile error versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com