[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor for noticing and fixing this crash! -- ___ Python tracker ___

[issue29094] Regression in zipfile writing in 2.7.13

2017-05-03 Thread Thomas Wouters
Thomas Wouters added the comment: ... and yes, the changes to issue 26293 should be reverted; the changes attached to this issue merely revert part of issue 26293's changes. -- ___ Python tracker

[issue28149] Incorrect indentation under “else” in _bsddb.c

2017-05-03 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> _bsddb: else misleadingly indented ___ Python tracker

[issue29094] Regression in zipfile writing in 2.7.13

2017-05-03 Thread Thomas Wouters
Thomas Wouters added the comment: The spec isn't very explicit about it, yes, but it does say this: 4.4.16 relative offset of local header: (4 bytes) This is the offset from the start of the first disk on which this file appears, to where the local header should be found.

[issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests?

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Maybe be related to issue #30255 (test_xml_etree crash related to slices). -- ___ Python tracker ___

[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1534 ___ Python tracker ___ ___

[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Attached PR fixes test_xml_etree. -- nosy: +xiang.zhang ___ Python tracker ___

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5e9c1101924bacf3ead03124b5c1e48551638360 by Victor Stinner in branch '3.5': bpo-24725: Skip the test_socket.testFDPassEmpty on OS X (#1427) https://github.com/python/cpython/commit/5e9c1101924bacf3ead03124b5c1e48551638360 -- nosy:

[issue30257] _bsddb: else misleadingly indented

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +gregory.p.smith ___ Python tracker ___ ___

[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg292891 ___ Python tracker ___

[issue30257] _bsddb: else misleadingly indented

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: The second line in the else block was added... 14 years ago (!) by this commit: commit 455d46f0d921337405ebd3a098c210f3614ae77c Author: Gregory P. Smith Date: Wed Jul 9 04:45:59 2003 + bsddb 4.1.6: * Extended DB &

[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: The second line in the else block was added... 14 years ago (!) by this commit: commit 455d46f0d921337405ebd3a098c210f3614ae77c Author: Gregory P. Smith Date: Wed Jul 9 04:45:59 2003 + bsddb 4.1.6: * Extended DB &

[issue30257] _bsddb: else misleadingly indented

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1533 ___ Python tracker ___ ___

[issue30257] _bsddb: else misleadingly indented

2017-05-03 Thread STINNER Victor
New submission from STINNER Victor: building '_bsddb' extension gcc -pthread -fPIC -fno-strict-aliasing -O0 -g -O0 -Wall -Wstrict-prototypes -I/usr/include -I. -IInclude -I./Include -I/usr/local/include -I/home/haypo/prog/python/2.7/Include -I/home/haypo/prog/python/2.7 -c

[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2017-05-03 Thread Jeff DuMonthier
New submission from Jeff DuMonthier: In multiprocessing, attempting to add a Queue proxy to a dict or Namespace proxy (all returned by the same SyncManager) raises an exception indicating a keyword argument 'manager_owned=True' has been passed to the function AutoProxy() but is not an

[issue30255] test_xml_etree: python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed.

2017-05-03 Thread STINNER Victor
New submission from STINNER Victor: ./python -m test -v test_xml_etree ... test_getslice_negative_steps (test.test_xml_etree.ElementSlicingTest) ... python: Objects/sliceobject.c:176: _PySlice_AdjustIndices: Assertion `step >= -PY_SSIZE_T_MAX' failed. ... Traceback (most recent call first):

[issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests?

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Another example, worse: --- ... [123/401] test_source_encoding [124/401] test_locale [125/401] test_unary 116 tests OK. 9 tests skipped: test_applesingle test_bsddb185 test_ioctl test_kqueue test_linuxaudiodev test_msilib test_startfile test_sunaudiodev

[issue30254] [2.7] regrtest announces 401 tests, but there are 304 tests?

2017-05-03 Thread STINNER Victor
New submission from STINNER Victor: First case: --- ... [301/401] test_with [302/401] test_import [303/401] test_xmlrpc 277 tests OK. 2 tests altered the execution environment: test_distutils test_sax 24 tests skipped: test_al test_bsddb185 test_cl test_commands test_curses test_dbm

[issue29915] Drop Mac OS X Tiger support in Python 3.7?

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: All tests pass again on 2.7, 3.5, 3.6 and master branches, so I have no more reason to drop Tiger support :-) I close the issue. I may reopen it later if I find a better reason to drop Tiger support ;-) -- resolution: -> postponed stage: ->

[issue29925] test_uuid fails on OS X Tiger

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: test_uuid pass on x86 Tiger 3.6 and x86 Tiger 3.x, I close the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue30199] Warning -- asyncore.socket_map was modified by test_ssl

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Fix applied to 2.7, 3.5, 3.6 and master (3.7). -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue30228] Open a file in text mode requires too many syscalls

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > Or provide a function similar to the RAW_TELL macro but just checking if the > current position is 0. I will try to implement such function and use it in textio.c. -- ___ Python tracker

[issue30228] Open a file in text mode requires too many syscalls

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > You could call buffer.seek(0, SEEK_CUR) rather than buffer.tell() for > avoiding a system call for readable stream. But this looks as a shamanism too. Note: Buffered.seek(0, SEEK_CUR) only has a fast-path for readable file: it cannot be used to optimize

[issue30201] [3.5] RecvmsgIntoSCMRightsStreamTest fails with "OSError: [Errno 12] Cannot allocate memory" on macOS El Capitan

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of issue #24725, I proposed a backport to 3.5: https://github.com/python/cpython/pull/1427 -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot

[issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1532 ___ Python tracker ___ ___

[issue30253] Python does not build without WITH_THREADS defined on Windows/Visual Studio

2017-05-03 Thread Stephen Kelly
New submission from Stephen Kelly: As there is no configuration system for python on Windows (issue30252) I tried to change pyconfig.h to comment out some lines: // #define NT_THREADS // #define WITH_THREAD After building, I had to additionally patch * threadmodule.c and thread.c to

[issue30225] EBADF error on x86 Tiger 3.x buildbot

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: @David Bolen: Would you mind to take a look? I don't have access to your x86 Tiger 3.x buildbot. -- nosy: +db3l ___ Python tracker

[issue30232] configure: support Git worktree

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30232] configure: support Git worktree

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: I applied the enhanced (called bugfix by Brett ;-)) to 2.7, 3.5, 3.6 and master (3.7). I close the issue. Example: haypo@selma$ cat .git gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7 haypo@selma$ ./python Python 2.7.13+

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset 23b312b087582cec5cc8c528d267eb42061601ac by Victor Stinner in branch '3.5': [3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463) (#1424)

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: https://github.com/python/cpython/pull/1426 implements the blacklist option. I chose the conservative approach: hope that poll() will be fixed in 16.6.x. The problem of this approach is that test_asyncore and test_eintr will fail again if Apple doesn't fix

[issue30252] Configuration system does not work for Windows/Visual Studio

2017-05-03 Thread Stephen Kelly
New submission from Stephen Kelly: As far as I know, there is a configuration system for python based on the configure script. Python can be configured with --without-threads to disable threading support. There is no equivalent system for Windows/Visual Studio. This makes it harder to build

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1531 ___ Python tracker ___ ___

[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks, I feel better now. This might end up being the only IDLE patch for 3.5. A test issue for git CI with respect to tkinter and IDLE has been that Travis on Linux does not run 'gui' tests, so it is semi-useless for tk and IDLE. I notice on PR 1397 that

[issue30251] Windows Visual Studio solution does not have an install target

2017-05-03 Thread Stephen Kelly
New submission from Stephen Kelly: The Windows Visual Studio solution does not have an install target. As far as I understand, the configure system used on Unix does have an install target. That means that on Windows, binaries resulting from the build to not end up in the same layout as

[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-03 Thread Robert
Robert added the comment: regarding the proposal for mini format languages for bytes (msg292663): Wouldn't it be more consistent if the format specifiers are identical to the one of int's (see https://docs.python.org/3/library/string.html#format-specification-mini-language). I.e. "X" / "x"

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > Would it be possible to design a test which doesn't block? If there is no obvious way to detect poll() functionnaly, a workaround is to get the Darwin version from uname() and blacklist macOS versions known to have the bug (disable select.poll() on these

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Instead of skipping the test, it would be safer to not provide select.poll() if it's known to be broken. Curl added a check in configure: https://github.com/curl/curl/commit/9297ca49f5f3caca938a679b9c1feeb719e61ddb The problem is that I understood that Python

[issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > This issue seems similar to issue #28087. Aaaah, it's not just similar, it's exactly the same bug: it's just that the 3.5 branch wasn't fixed yet. I proposed a backport: https://github.com/python/cpython/pull/1424 -- resolution: -> duplicate stage:

[issue28087] macOS 12 poll syscall returns prematurely

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1530 ___ Python tracker ___ ___

[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > If you can load any existing file into the editor, edit a bit, or maybe cut > it down to a print statement, save under a new name, and run it, that should > be enough. I created a latin1 file with a "# coding: latin1" cookie header. I was able to open it

[issue30250] StreamIO truncate behavior of current position

2017-05-03 Thread Albert Zeyer
New submission from Albert Zeyer: The doc says that StringIO.truncate should not change the current position. Consider this code: try: import StringIO except ImportError: import io as StringIO buf = StringIO.StringIO() assert_equal(buf.getvalue(), "") print("buf: %r" %

[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you can load any existing file into the editor, edit a bit, or maybe cut it down to a print statement, save under a new name, and run it, that should be enough. -- ___ Python tracker

[issue19903] Idle: Use inspect.signature for calltips

2017-05-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Later today I should be able to pull the PR to my machine to review and test, and recheck coverage change. -- ___ Python tracker

[issue30249] improve struct.unpack_from's error message like struct.pack_into

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: In #29649, the error message of struct.pack_into was improved. Since pack_into was changed, I think it's also worth improving unpack_from. -- components: Library (Lib) messages: 292862 nosy: xiang.zhang priority: normal severity: normal stage: needs

[issue30239] test_asyncore: test_handle_expt() fails on macOS Sierra

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: This issue seems similar to issue #28087. -- ___ Python tracker ___ ___

[issue30248] Using boolean arguments in the _json module

2017-05-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Core dump when use uninitialized _json objects ___ Python tracker ___

[issue30248] Using boolean arguments in the _json module

2017-05-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1529 ___ Python tracker ___ ___

[issue30248] Using boolean arguments in the _json module

2017-05-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently PyObject_IsTrue() is called every time when bool attributes (_json.Scanner.strict, _json.Encoder.sort_keys, _json.Encoder.skipkeys) are used in C acceleration of the json module. PyObject_IsTrue() is fast when the argument is a bool, but in any

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-05-03 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue30246] fix several error messages in struct

2017-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: "unpack requires a bytes-like object of length %zd" is not correct too. array.array('i', [1, 2, 3]) has length 3, but Struct('3b').unpack doesn't accept it. The more correct error message is "unpack requires an object containing %zd bytes" (or "a buffer").

[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > If we go in this direction, maybe we can go further and also run autoconf && > autoheader? Oh, I just noticed that there is already a "make autoconf" target, I didn't know. -- ___ Python tracker

[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: Nick Coghlan: "Could we use "regen-*" as the pattern for the file regeneration targets?" Sure, done. I checked the CPython documentation, build scripts, etc. I confirm that "rebuild" usually means "recompile Python from scratch", it's even an explicit

[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-03 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1528 ___ Python tracker ___ ___ Python-bugs-list

[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-03 Thread Louie Lu
Changes by Louie Lu : -- components: +Library (Lib) nosy: +brett.cannon ___ Python tracker ___

[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-03 Thread Louie Lu
Louie Lu added the comment: Relate to #29448 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23404] 'make touch' does not work with git clones of the source repository

2017-05-03 Thread Nick Coghlan
Nick Coghlan added the comment: Could we use "regen-*" as the pattern for the file regeneration targets? I'd expect "make rebuild-all" to be akin to "make clean && make", since in the context of a C project, "build" maps to "generate the output binaries" for me. --

[issue30247] Make importlib.machinery class handle os.PathLike path

2017-05-03 Thread Louie Lu
New submission from Louie Lu: Several importlib.machinery class has 'path' attribute, make it possible to handle os.PathLike. -- messages: 292856 nosy: louielu priority: normal severity: normal status: open title: Make importlib.machinery class handle os.PathLike path versions: Python

[issue30246] fix several error messages in struct

2017-05-03 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1527 ___ Python tracker ___ ___

[issue30246] fix several error messages in struct

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: There are several error messages only mention bytes. But they may also accept string or other bytes-like objects. -- components: Library (Lib) messages: 292854 nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title:

[issue30243] Core dump when use uninitialized _json objects

2017-05-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1526 ___ Python tracker ___ ___

[issue30233] [3.5] Warning -- locale was modified by test_idle

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > Victor, I forgot to ask. Did you properly test IDLE before committing the > patch? This means building python 3.5, starting IDLE, and exercising the > modules affected. test_idle is nowhere nearly a substitute for such > hand-testing. This is a big part

[issue30245] possible overflow when organize struct.pack_into error message

2017-05-03 Thread Xiang Zhang
New submission from Xiang Zhang: In #29649, struct.pack_into's error message was improved. But the message could be confusing encountering a large offset due to overflow: >>> struct.pack_into('I', bytearray(10), sys.maxsize, 1) Traceback (most recent call last): File "", line 1, in

[issue30110] test_asyncio reports reference leak

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: IMHO not calling shutdown() is a bug and Python should help developers to detect it. I proposed the issue #30244 to emit a ResourceWarning in concurrent.futures executor destructors. -- nosy: +haypo ___ Python

[issue30171] Emit ResourceWarning in multiprocessing Queue destructor

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: See also issue #30244: Emit a ResourceWarning in concurrent.futures executor destructors. -- ___ Python tracker ___

[issue30244] Emit a ResourceWarning in concurrent.futures executor destructors

2017-05-03 Thread STINNER Victor
New submission from STINNER Victor: Follow-up of issues: * issue #30110: test_asyncio reports reference leak, forgot to shutdown concurrent.futures.ProcessPoolExecutor() * issue #30171: Emit ResourceWarning in multiprocessing Queue destructor I propose to emit a ResourceWarning warning in

[issue30231] test_imaplib needs a TLS server accepting self-signed certificates

2017-05-03 Thread STINNER Victor
STINNER Victor added the comment: > It would be best if these tests could be replaced by something local. Is there someone interested to write such local IMAP server to test test_imaplib using a client x509 certificate? > Failing that, I suppose we'll have to remove them. That's not my

[issue30231] test_imaplib needs a TLS server accepting self-signed certificates

2017-05-03 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1525 ___ Python tracker ___ ___

[issue30242] resolve undefined behaviour in struct

2017-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Your patch LGTM as a minimal patch for backporting to maintained releases (maybe Mark have other comments). But I think it would be better to make all pointers to raw memory of type unsigned char*. Not just packing, but unpacking too. Using even memcpy

[issue30243] Core dump when use uninitialized _json objects

2017-05-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: It is possible to get a core dump by using uninitialized _json objects. $ ./python -c "import _json; _json.make_scanner.__new__(_json.make_scanner)('', 0)" Segmentation fault (core dumped) $ ./python -c "import _json;

[issue30242] resolve undefined behaviour in struct

2017-05-03 Thread Xiang Zhang
Xiang Zhang added the comment: Hmm, do we need to? Currently all pack routines accept a char *p. Converting it to unsigned char * inside could also solve the problem. -- ___ Python tracker

[issue30242] resolve undefined behaviour in struct

2017-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I meant changing the type of the first argument of np_ubyte() etc. np_ubyte(unsigned char *p, PyObject *v, const formatdef *f) -- ___ Python tracker

<    1   2