[issue19887] Path.resolve() ENAMETOOLONG on pathologic symlinks
Serhiy Storchaka added the comment: How the test can be simpler? It is already simple. You ca use pathlib_resolve_test.py but replace `os.symlink('.', 'testdir/0')` by `os.symlink(os.path.abspath('testdir'), 'testdir/0')`. Or use following shell commands: mkdir testdir for i in $(seq 100); do ln -s $((i-1))/$((i-1)) testdir/$i; done ln -s $(pwd)/testdir testdir/0 ./python -c import pathlib; print(pathlib.Path('testdir/100').resolve()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Changes by Serhiy Storchaka storch...@gmail.com: -- title: Path.resolve() ENAMETOOLONG on pathologic symlinks - Path.resolve() fails on complex symlinks ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6784] byte/unicode pickle incompatibilities between python2 and python3
Roundup Robot added the comment: New changeset bd71352e950f by Alexandre Vassalotti in branch 'default': Issue #6784: Strings from Python 2 can now be unpickled as bytes objects. http://hg.python.org/cpython/rev/bd71352e950f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6784] byte/unicode pickle incompatibilities between python2 and python3
Alexandre Vassalotti added the comment: I fixed up the last few review comments and submitted the patch. Thank you for the help! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6784 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6673] Uncaught comprehension SyntaxError eats up all memory
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: -alexandre.vassalotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6673 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12290] __setstate__ is called for false values
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python stage: - patch review versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12290 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12290] __setstate__ is called for false values
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12290 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13566] Array objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x
Alexandre Vassalotti added the comment: Adding a special type is not a bad idea. We have to keep the code for loading BINSTRING opcodes anyway, so we might as well use it. It could be helpful for unit-testing our Python 2 compatibility support for pickle. We should still fix array in 2.7 to accept unicode object for the typecode though. -- stage: - needs patch versions: +Python 2.7, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13566 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19917] [httplib] logging information for request is not pretty printed
New submission from Matej Cepl: looking at http://hg.python.org/cpython/file/543c76769c14/Lib/http/client.py#l847 (logging in HTTPConnection.send method; but this code has been same since like forever) I see that the HTTP request is NOT pretty printed: if self.debuglevel 0: print(send:, repr(data)) whereas response in effect (because every header is printed separately) is. Wouldn't it be better to pretty print the request as well? Otherwise I get quite unreadable debugging logs like the following (notice how much response is more readable than request). It seems to me that proper solution could be just to replace repr() here with something more readable. Wouldn't just str() help? Barring that we can go all the way to pprint.pformat(). -- components: Library (Lib) files: urllib2-kerberos-log.txt messages: 205446 nosy: mcepl priority: normal severity: normal status: open title: [httplib] logging information for request is not pretty printed Added file: http://bugs.python.org/file33021/urllib2-kerberos-log.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19904] Add 128-bit integer support to struct
Stefan Krah added the comment: If performance is the reason for the feature: My impression is that the goal of the struct module is not necessarily top performance. E.g. in memoryview the custom unpackers for comparisons are 30-60 times faster than using the struct module. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19904 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19918] PureWindowsPath.relative_to() is not case insensitive
New submission from Serhiy Storchaka: import pathlib pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('C:/Foo') PureWindowsPath('Bar') pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('C:/foo') Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/pathlib.py, line 797, in relative_to .format(str(self), str(formatted))) ValueError: 'C:\\Foo\\Bar' does not start with 'C:\\foo' pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('c:/Foo') Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/pathlib.py, line 797, in relative_to .format(str(self), str(formatted))) ValueError: 'C:\\Foo\\Bar' does not start with 'c:\\Foo' It also returns strange result when an argument is naked drive: pathlib.PureWindowsPath('C:/Foo/Bar').relative_to('C:') PureWindowsPath('//Foo/Bar') -- components: Library (Lib) messages: 205448 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: PureWindowsPath.relative_to() is not case insensitive type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: I like the i.bits_at(pos, width=1) suggestion. Unless slicing is chosen instead this seems the most future-proof idea. I think slicing semantically seems wrong but it might be more elegant. It might also make catching errors harder (in the case where an int is sent to a function that does slicing and now won't fail with a TypeError). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19918] PureWindowsPath.relative_to() is not case insensitive
Serhiy Storchaka added the comment: Here is a patch which fixes first bug. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file33022/pathlib_relative_to.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18925] select.poll.modify is not documented
Jon Clements added the comment: Was looking up epoll.modify and noticed in the docs it's listed as Modify a register file descriptor. - I believe that should be Modify a registered file descriptor... -- nosy: +joncle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19918] PureWindowsPath.relative_to() is not case insensitive
Serhiy Storchaka added the comment: Actually relative_to() returns invalid path object. import pathlib p = pathlib.PureWindowsPath('C:/Foo/Bar/Baz').relative_to('C:') p PureWindowsPath('//Foo/Bar/Baz') str(p) 'Foo\\Bar\\Baz' p.drive '' p.root '' p.parts ('\\', 'Foo', 'Bar', 'Baz') p.is_absolute() False p2 = pathlib.PureWindowsPath(str(p)) p2.drive 'Foo\\Bar' p2.root '\\' p2.parts ('Foo\\Bar\\', 'Baz') p2.is_absolute() True Here is a patch which fixes both bugs. import pathlib p = pathlib.PureWindowsPath('C:/Foo/Bar/Baz').relative_to('C:') p PureWindowsPath('/Foo/Bar/Baz') str(p) '\\Foo\\Bar\\Baz' p.drive '' p.root '\\' p.parts ('\\', 'Foo', 'Bar', 'Baz') -- Added file: http://bugs.python.org/file33023/pathlib_relative_to_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Mark Dickinson added the comment: I'd rather see `i.bits_at(pos, width=1)` Me too. Extracting sign, exponent and significand fields from the binary representation of a float is at least one thing I'd use this for. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
STINNER Victor added the comment: If you want to avoid the encoding errors, you can also use PYTHONIOENCODING=:replace or PYTHONIOENCODING=:backslashreplace in Python 3.4 to use the locale encoding, but use an error handler different than strict. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Antoine Pitrou added the comment: How the test can be simpler? It is already simple. I mean, don't use loops but a simple test setup as in test_resolve_dot. I am not interested in the pathologic 100 symlinks case, just the case where the symlink is absolute. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Vajrasky Kok added the comment: And don't forget to use self.dirlink instead of os.symlink(src, dst, target_is_directory=True). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19916] urllib2 fails on https,SSL broken.
R. David Murray added the comment: This isn't a bug in Python, it is a bug in your particular *installation* of Python (or OpenSSL). Your best resource for getting help resolving this would be to post to the python-list mailing list, or to a support forum for your particular Linux distribution. -- nosy: +r.david.murray resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19916 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Serhiy Storchaka added the comment: Here is a patch with unrolled loops. -- Added file: http://bugs.python.org/file33024/pathlib_resolve_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5996] abstract class instantiable when subclassing dict
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5996] abstract class instantiable when subclassing dict
Changes by Mark Dickinson dicki...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Sworddragon added the comment: Using an environment variable is not the holy grail for this. On writing a non-single-user application you can't expect the user to set extra environment variables. If compatibility is the only reason in my opinion it would be much better to include something like sys.use_strict_encoding() which decides if print()/write() will use sys.getfilesystemencoding() or sys.getdefaultencoding(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
anon added the comment: I didn't really consider floats. bit_length() is only provided to ints for example. I think a better solution to pick apart floats would be a function similar to math.frexp, if it isn't already sufficient. float.bits_at(pos, width) seems a worse solution because the position of each bit would be arbitrary. But I have no major objection against it being extended to floats. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19913] TR/Crypt.XPACK.Gen-4 in easy_install.exe
Christian Heimes added the comment: I found the offenders. distlib's wrapper scripts are detected as malicious programs by some anti virus programs. pip/_vendor/distlib/t32.exe https://www.virustotal.com/de/file/d06ad386d9dab9d08bdc01a3a14c713bd90b218ec4893c22da819826bd452e31/analysis/1386429889/ pip/_vendor/distlib/t64.exe https://www.virustotal.com/de/file/b043b38b8c24c31cffed5e29e995d879a14228901bee5b15e4158b8428e2699e/analysis/1386429784/ -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Antoine Pitrou added the comment: Using an environment variable is not the holy grail for this. On writing a non-single-user application you can't expect the user to set extra environment variables. I am not understanding why the user would have to set anything at all. What is the use case for per-user encoding settings? I understand that passing LANG=C (e.g. to disable a program's translations) forces ASCII instead of UTF-8, which is a flaw. Perhaps the filesystem encoding should be set to UTF-8 when the system locale says ASCII. (OTOH, it's IMHO a system bug that LANG=C forces the ASCII charset; we're not in the 80s anymore) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19913] TR/Crypt.XPACK.Gen-4 in easy_install.exe
Vinay Sajip added the comment: Hmmm. I use mpress (http://www.matcode.com/mpress.htm) to compress the executables. These AV results seem to be false positives, given that the files are green-lit by Symantec, Sophos, McAfee, Kaspersky, F-Prot, AVG, Avast and a bunch of other reputable AV products (based on Christian's links). I suppose the executables could be shipped uncompressed (apparently the UPX compressor also sometimes causes false positives with AV software - and UPX can't compress 64-bit executables). There have been complaints in the past that Avira's heuristics are not careful enough: https://forum.avira.com/wbb/index.php?page=ThreadthreadID=127271 That link points to a 2011 thread. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19913] TR/Crypt.XPACK.Gen-4 in easy_install.exe
Christian Heimes added the comment: How are you creating these files anyway? I can't find any documentation or source files in distlib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Nick Coghlan added the comment: Antoine's suggestion of being a little more aggressive in choosing utf-8 over ascii as the OS API encoding sounds reasonable to me. I think we're getting to a point where a system claiming ASCII as the encoding to use is almost certainly a misconfiguration rather than a desired setting. If someone *really* means ASCII, they can force it for at least the std streams with PYTHONIOENCODING. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19913] TR/Crypt.XPACK.Gen-4 in easy_install.exe
Vinay Sajip added the comment: It's in the docs at e.g. http://distlib.readthedocs.org/en/latest/reference.html?highlight=launcher#distlib.scripts.ScriptMaker.__init__ and in the code at e.g. https://bitbucket.org/vinay.sajip/distlib/src/a50562ee0b535b2966948f1a657c1cac4c1536eb/distlib/scripts.py?at=default#cl-272 The project to generate the launchers is at https://bitbucket.org/vinay.sajip/simple_launcher/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
New submission from Christian Heimes: On Windows the test_connect_ex_error sometimes fails with EWOULDBLOCK instead of ECONNREFUSED. Valhallasw sometimes gets the same error with an Ubuntu VM on Windows. This might be a Windows socket issue. == FAIL: test_connect_ex_error (test.test_ssl.NetworkedTests) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_ssl.py, line 1205, in test_connect_ex_error s.connect_ex((svn.python.org, 444))) AssertionError: 10061 != 10035 for k, v in errno.__dict__.items(): ... if v == 10035: print(k) ... EWOULDBLOCK WSAEWOULDBLOCK for k, v in errno.__dict__.items(): ... if v == 10061: print(k) ... WSAECONNREFUSED ECONNREFUSED -- components: Tests messages: 205467 nosy: christian.heimes priority: normal severity: normal status: open title: SSL: test_connect_ex_error fails with EWOULDBLOCK type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum added the comment: Sorry, here's another version. It keeps the original _fileobj_to_fd function and wraps it with a method that does the exhaustive search. -- Added file: http://bugs.python.org/file33025/unregister6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
Merlijn van Deen added the comment: My error is slightly different: $ ./python -i -c from test.test_ssl import *; support.run_unittest(NetworkedTests) (...) == FAIL: test_connect_ex_error (test.test_ssl.NetworkedTests) -- Traceback (most recent call last): File /home/valhallasw/src/cpython/Lib/test/test_ssl.py, line 1205, in test_connect_ex_error s.connect_ex((svn.python.org, 444))) AssertionError: 111 != 11 -- Ran 15 tests in 33.590s FAILED (failures=1, skipped=1) Traceback (most recent call last): File string, line 1, in module File /home/valhallasw/src/cpython/Lib/test/support/__init__.py, line 1719, in run_unittest _run_suite(suite) File /home/valhallasw/src/cpython/Lib/test/support/__init__.py, line 1694, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File /home/valhallasw/src/cpython/Lib/test/test_ssl.py, line 1205, in test_connect_ex_error s.connect_ex((svn.python.org, 444))) AssertionError: 111 != 11 errno.errorcode[11] 'EAGAIN' errno.errorcode[111] 'ECONNREFUSED' This is on Ubuntu x64 12.04 LTS, under VirtualBox 4.3.4 (r91027), running on Windows 7 Professional (6.1.7601). OpenSSL versions as returned by test_ssl: $ ./python -m Lib.test.test_ssl test_ssl: testing with 'OpenSSL 1.0.1 14 Mar 2012' (1, 0, 1, 0, 15) under Linux ('debian', 'wheezy/sid', '') HAS_SNI = True OP_ALL = 0x83ff OP_NO_TLSv1_1 = 0x1000 -- nosy: +valhallasw ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
Christian Heimes added the comment: EAGAIN Resource temporarily unavailable (may be the same value as EWOULDBLOCK) (POSIX.1) Can you please check of EAGAIN and EWOULDBLOCK are the same value on your Linux box? They are the same on my box: import errno errno.EAGAIN, errno.EWOULDBLOCK (11, 11) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
Merlijn van Deen added the comment: Yes, they are. errno.EWOULDBLOCK 11 EAGAIN and EWOULDBLOCK are the only two with that errno: [(k,v) for (k,v) in errno.__dict__.items() if v==11] [('EWOULDBLOCK', 11), ('EAGAIN', 11)] 111 is just ECONNREFUSED: [(k,v) for (k,v) in errno.__dict__.items() if v==111] [('ECONNREFUSED', 111)] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Antoine Pitrou added the comment: Here is a patch. $ LANG=C ./python -c import os, sys, locale; print(sys.getfilesystemencoding(), sys.stdin.encoding, os.device_encoding(0), locale.getpreferredencoding()) - Without the patch: ascii ANSI_X3.4-1968 ANSI_X3.4-1968 ANSI_X3.4-1968 - With the patch: utf-8 utf-8 utf-8 ANSI_X3.4-1968 -- keywords: +patch nosy: +larry stage: - patch review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file33026/asciilocale.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lemburg, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19915] int.bit_at(n) - Accessing a single bit in O(1)
Mark Dickinson added the comment: Sorry, I wasn't clear. I'm not interested in applying this to floats themselves; I'm interested in applying it to the bit pattern of a float when that bit pattern is treated as an integer. But I have no major objection against it being extended to floats. I do! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
Antoine Pitrou added the comment: The explanation for EAGAIN is in the test just above (test_timeout_connect_ex). Read it. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19920] TarFile.list() fails on some files
New submission from Serhiy Storchaka: TarFile.list() fails on some files. In particular on Lib/test/testtar.tar. import tarfile tarfile.open('Lib/test/testtar.tar').list() ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 ustar/conttype ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 ustar/regtype ?rwxr-xr-x tarfile/tarfile 0 2003-01-06 01:19:43 ustar/dirtype/ ?rwxr-xr-x tarfile/tarfile255 2003-01-06 01:19:43 ustar/dirtype-with-size/ ?rw-r--r-- tarfile/tarfile 0 2003-01-06 01:19:43 ustar/lnktype link to ustar/regtype ?rwxrwxrwx tarfile/tarfile 0 2003-01-06 01:19:43 ustar/symtype - regtype ?rw-rw tarfile/tarfile3,0 2003-01-06 01:19:43 ustar/blktype ?rw-rw-rw- tarfile/tarfile1,3 2003-01-06 01:19:43 ustar/chrtype ?rw-r--r-- tarfile/tarfile 0 2003-01-06 01:19:43 ustar/fifotype ?rw-r--r-- tarfile/tarfile 86016 2003-01-06 01:19:43 ustar/sparse ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 Traceback (most recent call last): File stdin, line 1, in module File /home/serhiy/py/cpython/Lib/tarfile.py, line 1846, in list print(tarinfo.name + (/ if tarinfo.isdir() else ), end=' ') UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc4' in position 14: surrogates not allowed Command-line interface of the tarfile module also fails: $ ./python -m tarfile -v -l Lib/test/testtar.tar ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 ustar/conttype ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 ustar/regtype ?rwxr-xr-x tarfile/tarfile 0 2003-01-06 01:19:43 ustar/dirtype/ ?rwxr-xr-x tarfile/tarfile255 2003-01-06 01:19:43 ustar/dirtype-with-size/ ?rw-r--r-- tarfile/tarfile 0 2003-01-06 01:19:43 ustar/lnktype link to ustar/regtype ?rwxrwxrwx tarfile/tarfile 0 2003-01-06 01:19:43 ustar/symtype - regtype ?rw-rw tarfile/tarfile3,0 2003-01-06 01:19:43 ustar/blktype ?rw-rw-rw- tarfile/tarfile1,3 2003-01-06 01:19:43 ustar/chrtype ?rw-r--r-- tarfile/tarfile 0 2003-01-06 01:19:43 ustar/fifotype ?rw-r--r-- tarfile/tarfile 86016 2003-01-06 01:19:43 ustar/sparse Traceback (most recent call last): File /home/serhiy/py/cpython/Lib/runpy.py, line 160, in _run_module_as_main __main__, fname, loader, pkg_name) File /home/serhiy/py/cpython/Lib/runpy.py, line 73, in _run_code exec(code, run_globals) File /home/serhiy/py/cpython/Lib/tarfile.py, line 2500, in module main() File /home/serhiy/py/cpython/Lib/tarfile.py, line 2444, in main tf.list(verbose=args.verbose) File /home/serhiy/py/cpython/Lib/tarfile.py, line 1846, in list print(tarinfo.name + (/ if tarinfo.isdir() else ), end=' ') UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc4' in position 14: surrogates not allowed ?rw-r--r-- tarfile/tarfile 7011 2003-01-06 01:19:43 serhiy@raxxla:~/py/cpython$ -- components: IO, Library (Lib), Unicode messages: 205475 nosy: benjamin.peterson, ezio.melotti, haypo, lars.gustaebel, lemburg, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: TarFile.list() fails on some files type: behavior versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK
Merlijn van Deen added the comment: OK. I did some network sniffing; inside the VM, this is what I see: $ sudo tshark host 82.94.164.164 tshark: Lua: Error during loading: [string /usr/share/wireshark/init.lua]:45: dofile has been disabled Running as user root and group root. This could be dangerous. Capturing on eth0 0.0010.0.2.15 - 82.94.164.164 TCP 74 52719 snpp [SYN] Seq=0 Win=14600 Len=0 MSS=1460 SACK_PERM=1 TSval=10175140 TSecr=0 WS=16 while on the host, this is what I see: 1 0.0 192.168.1.122 82.94.164.164 TCP 66 49909 snpp [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=4 SACK_PERM=1 2 0.029908000 82.94.164.164 192.168.1.122 TCP 54 snpp 49909 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0 Basically, the RST sent by the server never reaches the VM. This might actually happen in other NAT-ed situations, too, I guess. But even if this is a VM issue, it *does* make the tests misbehave. Maybe receiving EAGAIN should result in a test skip instead of an error? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
New submission from Serhiy Storchaka: Path.mkdir() can't create a directory with cleared write or list permission bits for owner when parent directories aren't created. This is because for parent directories same mode is used as for final directory. To support this use case we should implicitly set write and list permission bits for owner when creating parent directories. I don't know if this work on Windows. -- components: Library (Lib) files: pathlib_mkdir_mode.patch keywords: patch messages: 205477 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Path.mkdir(0, True) always fails type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33027/pathlib_mkdir_mode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum added the comment: I think I got the closing sorted out now, and through reordering the dup2() calls are actually needed. -- Added file: http://bugs.python.org/file33028/unregister7.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19901] tests fail due to unsupported SO_REUSEPORT when building Python 3.3.2-r2
Gregory P. Smith added the comment: I fixed this in 3.3 and 3.4 several weeks ago. http://hg.python.org/cpython/rev/9791c5d55f52 http://hg.python.org/cpython/rev/00766fa3366b -- assignee: - gregory.p.smith nosy: +gregory.p.smith resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19901 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
R. David Murray added the comment: Wouldn't it be better to throw an error rather than create a (parent) directory with possibly wrong permission bits? It seems like this would require an unusual use case in any event. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19857] test_imaplib doesn't always reap SocketServer thread
Roundup Robot added the comment: New changeset fbbb591dea09 by Charles-François Natali in branch 'default': Issue #19857: Make sure that test_imaplib reaps server threads even in face of http://hg.python.org/cpython/rev/fbbb591dea09 New changeset 6c81df506739 by Charles-François Natali in branch 'default': Issue #19857: Make sure that test_imaplib reaps server threads even in face of http://hg.python.org/cpython/rev/6c81df506739 New changeset 78efa2c06447 by Charles-François Natali in branch '3.3': Issue #19857: Make sure that test_imaplib reaps server threads even in face of http://hg.python.org/cpython/rev/78efa2c06447 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19843] Wait for multiple sub-processes to terminate
Gregory P. Smith added the comment: I do not think this is ready to live in the standard library. I've left some comments on your patch review. Consider those for incorporation into the psutils project. wait_procs() implementation should live in the psutils module on PyPI with more iteration on its implementation happening there as it isn't ready yet. In general: We have too many APIs in the subprocess module. I want to avoid adding more unless they are a very clear improvement to ease of use of the module. More things with deadlock caveats similar to the existing Popen.wait() call are undesirable. -- nosy: +gregory.p.smith resolution: - rejected stage: - patch review status: open - closed type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19843 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum added the comment: OK, here's another try. I ran what you suggested for all three tests I added and they are all clean. I realized that every single call to socketpair() is followed by two addCleanup calls, so I added a make_socketpair() helper method that does this. -- Added file: http://bugs.python.org/file33029/unregister8.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Serhiy Storchaka added the comment: The mkdir utility creates parent directories with mode 0o777 ~umask. $ mkdir -p -m 0 t1/t2/t3 $ ls -l -d t1 t1/t2 t1/t2/t3 drwxrwxr-x 3 serhiy serhiy 4096 Dec 7 22:30 t1/ drwxrwxr-x 3 serhiy serhiy 4096 Dec 7 22:30 t1/t2/ d- 2 serhiy serhiy 4096 Dec 7 22:30 t1/t2/t3/ So perhaps we should just use 0o777 mode for parent directories. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
R. David Murray added the comment: OK, emulating mkdir -p seems like the sensible thing to do. That's the least likely to be surprising. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19922] mbstate_t requires _INCLUDE__STDC_A1_SOURCE
New submission from Christian Heimes: On HP-UX mbstate_t for mbrtowc() is only available when _INCLUDE__STDC_A1_SOURCE is defined: http://buildbot.python.org/all/builders/PA-RISC%20HP-UX%2011iv2%20%5BSB%5D%203.x/builds/2543/steps/compile/logs/stdio cc -Ae -c -O -O -I. -IInclude -I./Include-DPy_BUILD_CORE -o Objects/unicodeobject.o Objects/unicodeobject.c cc: Objects/unicodeobject.c, line 3493: error 1000: Unexpected symbol: mbs. cc: Objects/unicodeobject.c, line 3493: error 1588: mbstate_t undefined. cc: Objects/unicodeobject.c, line 3497: error 1588: mbs undefined. cc: Objects/unicodeobject.c, line 3497: warning 563: Argument #1 is not the correct type. cc: Objects/unicodeobject.c, line 3497: error 1594: The sizeof operator cannot be applied to types with unknown size. -- messages: 205486 nosy: christian.heimes, trent priority: low severity: normal stage: needs patch status: open title: mbstate_t requires _INCLUDE__STDC_A1_SOURCE type: compile error versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Serhiy Storchaka added the comment: Updated patch emulates the mkdir utility. -- Added file: http://bugs.python.org/file33030/pathlib_mkdir_mode_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19923] OSError: [Errno 512] Unknown error 512 in test_multiprocessing
New submission from Antoine Pitrou: This rather weird error occurred on a buildbot: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/9297 [346/387] test_multiprocessing_forkserver Process Process-497: Traceback (most recent call last): File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 616, in wait self._wait(timeout) File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py, line 651, in _wait if not self._cond.wait_for(lambda : self._state != 0, timeout): File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/synchronize.py, line 326, in wait_for self.wait(waittime) File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/synchronize.py, line 270, in wait self._lock.acquire() OSError: [Errno 512] Unknown error 512 -- components: Library (Lib) keywords: buildbot messages: 205488 nosy: neologix, pitrou, sbt priority: normal severity: normal status: open title: OSError: [Errno 512] Unknown error 512 in test_multiprocessing type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19923 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. -- Added file: http://bugs.python.org/file33031/pathlib_mkdir_mode_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19917] [httplib] logging information for request is not pretty printed
Terry J. Reedy added the comment: I am not an expert in web stuff, but off the top of my head, it seems that requests should be handled the same way as responses. -- nosy: +orsenthil, r.david.murray, terry.reedy stage: - test needed type: - enhancement versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19922] mbstate_t requires _INCLUDE__STDC_A1_SOURCE
Changes by Christian Heimes li...@cheimes.de: -- keywords: +patch Added file: http://bugs.python.org/file33032/issue19922.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Antoine Pitrou added the comment: Patch looks good to me. Do you think the documentation should be clarified a bit? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Serhiy Storchaka added the comment: Yes, please clarify the documentation. Perhaps we should add new argument parents_mode? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19921] Path.mkdir(0, True) always fails
Antoine Pitrou added the comment: A new argument sounds overkill to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13736 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19922] mbstate_t requires _INCLUDE__STDC_A1_SOURCE
Christian Heimes added the comment: http://www.mail-archive.com/autoconf-patches@gnu.org/msg04244.html http://modman.unixdev.net/?sektion=3page=wcsftimemanpath=HP-UX-11.11 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19922] mbstate_t requires _INCLUDE__STDC_A1_SOURCE
Roundup Robot added the comment: New changeset d8cfc7106f41 by Christian Heimes in branch 'default': Issue #19922: define _INCLUDE__STDC_A1_SOURCE in HP-UX to include mbstate_t http://hg.python.org/cpython/rev/d8cfc7106f41 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Charles-François Natali added the comment: LGTM! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19857] test_imaplib doesn't always reap SocketServer thread
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
STINNER Victor added the comment: There was a previous try to use a file encoding different than the locale encoding and it introduces too many issues: https://mail.python.org/pipermail/python-dev/2010-October/104509.html Inconsistencies if locale and filesystem encodings are different Python uses the fact that the filesystem encoding is the locale encoding in various places. For example, Python uses the C codec (mbstowcs) to decode byte string from the filesystem encoding before Python codecs can be used. For example, the ISO 8859-15 codec is implemented in Python and so you need something during Python startup until the import machinery is ready and the codec is loaded (using ascii encoding is not correct). The C locale may use a different encoding. For example on AIX, the ISO 8859-1 encoding is used. On FreeBSD and Solaris, the ISO 8859-1 encoding is announced but the ASCII encoding is used in practice. Python forces the ascii encoding on FreeBSD to avoid other issues. I worked hard to have Python 3 working out of the box on all platform. In my opinion, going against the locale encoding in some cases (the C locale) would introduce more issues than it solves. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Antoine Pitrou added the comment: Python uses the fact that the filesystem encoding is the locale encoding in various places. The patch doesn't change that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Roundup Robot added the comment: New changeset 39e7995f9ad1 by Guido van Rossum in branch 'default': Silently ignore unregistering closed files. Fixes issue 19876. With docs and slight test refactor. http://hg.python.org/cpython/rev/39e7995f9ad1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum added the comment: Is this worthy of a Misc/NEWS entry? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Roundup Robot added the comment: New changeset f334dd2471e7 by Guido van Rossum in branch 'default': News item for issue 19876. http://hg.python.org/cpython/rev/f334dd2471e7 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets
Guido van Rossum added the comment: Done. -- assignee: neologix - gvanrossum resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19924] test_venv fails with --without-threads
New submission from Christian Heimes: The test fails when Python is compiled --without-threads. Two 3rd party modules import threading unconditionally: pip/_vendor/distlib/util.py import threading pip/_vendor/requests/packages/urllib3/_collections.py from threading import RLock -- messages: 205503 nosy: christian.heimes, dstufft, ncoghlan, vinay.sajip priority: high severity: normal stage: needs patch status: open title: test_venv fails with --without-threads type: crash versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19922] mbstate_t requires _INCLUDE__STDC_A1_SOURCE
Changes by Christian Heimes li...@cheimes.de: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19883] Integer overflow in zipimport.c
Gregory P. Smith added the comment: zipimport.c makes no attempt to support zip files larger than 2GiB or zip64 files. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19883 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19846] print() and write() are relying on sys.getfilesystemencoding() instead of sys.getdefaultencoding()
Nick Coghlan added the comment: Note that the *only* change Antoine's patch makes is that: - *if* the locale encoding is ASCII (or an alias for ASCII) - *then* Python sets the filesystem encoding to UTF-8 instead If the locale encoding is anything *other* than ASCII, then that will still be used as the filesystem encoding, so environments that use something other than ASCII for the C locale will retain their current behaviour. The rationale for this approach is based on the assumption that the *most likely* way to get a locale encoding of ASCII at this point in time is to use LANG=C on a system where the locale encoding is normally something more suited to a Unicode world (likely UTF-8). Will assuming utf-8 sometimes cause problems? Quite possibly. But assuming that the platform's claim to only support ASCII is correct causes serious usability problems, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19846 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19924] test_venv fails with --without-threads
Changes by Nick Coghlan ncogh...@gmail.com: -- resolution: - duplicate status: open - closed superseder: - test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module
Nick Coghlan added the comment: Issue 19924 suggests we may need a new distlib as well -- nosy: +christian.heimes, vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19758] Warnings in tests
Roundup Robot added the comment: New changeset 94593dcb195a by Eric Snow in branch 'default': Issue #19758: silence PendingDeprecationWarnings in test_importlib. http://hg.python.org/cpython/rev/94593dcb195a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19758 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19506] subprocess.communicate() should use a memoryview
Roundup Robot added the comment: New changeset 44948f5bdc12 by Gregory P. Smith in branch '3.3': Fixes issue #19506: Use a memoryview to avoid a data copy when piping data http://hg.python.org/cpython/rev/44948f5bdc12 New changeset 5379bba2fb21 by Gregory P. Smith in branch 'default': Fixes issue #19506: Use a memoryview to avoid a data copy when piping data http://hg.python.org/cpython/rev/5379bba2fb21 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19506 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19506] subprocess.communicate() should use a memoryview
Changes by Gregory P. Smith g...@krypto.org: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19506 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19506] subprocess.communicate() should use a memoryview
Gregory P. Smith added the comment: fwiw, this patch made sense. using test_sub.py on my dual-core amd64 box with an opt build is saw the times drop from ~0.90-0.97 to ~0.75-0.8. more speedup than i was really anticipating for this use case. it probably depends upon what the value of _PIPE_BUF is on your system. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19506 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19851] reload problem with submodule
Eric Snow added the comment: This is actually a problem with importlib.reload() (which imp.reload() simply wraps). The attached patch provides a test that reproduces the error. I'll work on a fix ASAP. Interestingly, the kind of failure depends on frozen vs. source importlib: == ERROR: test_reload_submodule (test.test_importlib.test_api.Frozen_ReloadTests) -- Traceback (most recent call last): File Lib/test/test_importlib/test_api.py, line 430, in test_reload_submodule self.init.reload(ham) File Lib/importlib/__init__.py, line 161, in reload methods.exec(module) File frozen importlib._bootstrap, line 1134, in exec AttributeError: 'NoneType' object has no attribute 'name' == ERROR: test_reload_submodule (test.test_importlib.test_api.Source_ReloadTests) -- Traceback (most recent call last): File Lib/test/test_importlib/test_api.py, line 430, in test_reload_submodule self.init.reload(ham) File Lib/importlib/__init__.py, line 158, in reload raise ImportError(msg.format(parent_name), name=parent_name) ImportError: parent 'spam' not in sys.modules -- -- keywords: +patch priority: normal - critical stage: test needed - needs patch title: imp.reload problem with submodule - reload problem with submodule Added file: http://bugs.python.org/file33033/issue19851-test.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19851] reload problem with submodule
Eric Snow added the comment: Actually, they're both getting the same error: AttributeError: 'NoneType' object has no attribute 'name' I forgot to clear the submodule from sys.modules first. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module
Donald Stufft added the comment: Requests was released and pip updated it, I can release a new pip but it appears that perhaps distlib needs fixed before the without threads case is taken care of? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19925] Add unit test for spwd module
New submission from Vajrasky Kok: So we may have buildbot with root account after all. https://mail.python.org/pipermail/python-dev/2013-December/130708.html So here is the unit test for spwd module that requires root account. -- components: Tests files: unittest_for_spwd.patch keywords: patch messages: 205513 nosy: vajrasky priority: normal severity: normal status: open title: Add unit test for spwd module versions: Python 3.4 Added file: http://bugs.python.org/file33034/unittest_for_spwd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19925] Add unit test for spwd module
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file33034/unittest_for_spwd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19925] Add unit test for spwd module
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file33035/unittest_for_spwd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19926] Refactor unit test in abstract numbers test
New submission from Vajrasky Kok: There are superfluous lines and unused import in Lib/test/test_abstract_numbers.py. Attached the patch to remove superfluous lines and unused import. -- components: Tests files: refactor_test_abstract_number.patch keywords: patch messages: 205514 nosy: vajrasky priority: normal severity: normal status: open title: Refactor unit test in abstract numbers test versions: Python 3.4 Added file: http://bugs.python.org/file33036/refactor_test_abstract_number.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19927] Path-based loaders lack a meaningful __eq__() implementation.ModuleSpec.__eq__() is highly sensitive to loader.__eq__()
New submission from Eric Snow: ModuleSpec.__eq__() does a comparision of its various attributes, one of them being the loader. However, the __eq__() of the path-based loaders is just the stock one that compares object identity. So most -- messages: 205515 nosy: brett.cannon, eric.snow, ncoghlan priority: high severity: normal stage: test needed status: open title: Path-based loaders lack a meaningful __eq__() implementation.ModuleSpec.__eq__() is highly sensitive to loader.__eq__() type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19927] Path-based loaders lack a meaningful __eq__() implementation.
Eric Snow added the comment: (my browser farted the half finished report into existence :P ) The __eq__() implementation of the path-based loaders in importlib is just the stock one that compares object identity. So two that are effectively the same compare unequal. This has a material impact on ModuleSpec. ModuleSpec.__eq__() does a comparision of its various attributes, one of them being the loader. Thus most specs will compare unequal even though they are effectively equal. I recommend that we provide a better implementation for SourceFileLoader and friends. Larry: would such a feature addition be okay? -- nosy: +larry title: Path-based loaders lack a meaningful __eq__() implementation.ModuleSpec.__eq__() is highly sensitive to loader.__eq__() - Path-based loaders lack a meaningful __eq__() implementation. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19927] Path-based loaders lack a meaningful __eq__() implementation.
Changes by Eric Snow ericsnowcurren...@gmail.com: -- Removed message: http://bugs.python.org/msg205515 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19851] reload problem with submodule
Eric Snow added the comment: The problem was that importlib.reload() was not passing the parent's __path__ to importlib._bootstrap._find_spec(). This was a consequence of us restoring the pre-3.3 reload semantics. Patch attached. (Note to self: add Misc/NEWS entry) -- stage: needs patch - patch review Added file: http://bugs.python.org/file33037/issue19851-fix-reload.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19851] reload problem with submodule
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file33033/issue19851-test.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19927] Path-based loaders lack a meaningful __eq__() implementation.
Eric Snow added the comment: Here's a patch. -- keywords: +patch stage: test needed - patch review Added file: http://bugs.python.org/file33038/issue19927-loader-eq.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19851] reload problem with submodule
Nick Coghlan added the comment: Patch looks reasonable to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)
Eric Snow added the comment: Good catch. My preference would be for (c) simply add a setter for the property that sets the underlying private variable to True or False. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19927] Path-based loaders lack a meaningful __eq__() implementation.
Nick Coghlan added the comment: There can be some interesting backwards compatibility consequences when adding an __eq__ implementation to a class that was previously using the default ID based __eq__: - it becomes unhashable (unless you also add a suitable __hash__ definition) - subclasses with additional significant state may start comparing equal, even though their additional state is not taken into account by the new __eq__ function. For the latter problem, you can alleviate it by comparing the instance dictionaries rather than specific attributes: class Example: ... def __eq__(self, other): ... return self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ... a = Example() b = Example() a == b True a.foo = 1 a == b False b.foo = 1 a == b True (technically this can still change subclass behaviour if they're messing about with slots, but there *is* such a thing as being *too* paranoid about backwards compatibility) The hashability problem is easy enough to handle just by mixing together the hashes of the attributes of most interest: def __hash__(self): return hash(self.name) ^ hash(self.path) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19572] Report more silently skipped tests as skipped
Roundup Robot added the comment: New changeset 3283fb24106d by Zachary Ware in branch '3.3': Issue 19572: More silently skipped tests explicitly skipped. http://hg.python.org/cpython/rev/3283fb24106d New changeset 03afd2d7d395 by Zachary Ware in branch 'default': Issue 19572: More silently skipped tests explicitly skipped. http://hg.python.org/cpython/rev/03afd2d7d395 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19572 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com