[issue30277] Speeds up compiling cases-insensitive regular expressions

2017-05-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently _sre.getlower() takes two arguments. Depending on the bits set in the second argument it uses one of three algorithms for determining the lower case of the character -- Unicode, ASCII-only, and locale-depended. After resolving issue30215 _sre.get

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 76a3e51a403bc84ed536921866c86dd7d07aaa7e by Serhiy Storchaka in branch 'master': bpo-30243: Fixed the possibility of a crash in _json. (#1420) https://github.com/python/cpython/commit/76a3e51a403bc84ed536921866c86dd7d07aaa7e -- __

[issue30277] Speeds up compiling cases-insensitive regular expressions

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1567 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1568 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "As you said, calling close() can have side effects (for example invoking self._cont_handler.endDocument()). This was the argument against PR 1444. It seems to me that if _entity_stack is not empty (this happens in case of error in entity parsing) the

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1569 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue19903] Idle: Use inspect.signature for calltips

2017-05-05 Thread Louie Lu
Louie Lu added the comment: But somehow in this case, List have no __text_signature__: >>> str(i.signature(list)) '(iterable=(), /)' >>> list.__text_signature__ '(iterable=(), /)' >>> str(i.signature(List)) '(iterable=(), /)' >>> List.__text_signature__ >>> -- _

[issue29094] Regression in zipfile writing in 2.7.13

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: commit review -> backport needed versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs

[issue30270] Remove sqlite3.Cache display method

2017-05-05 Thread Aviv Palivoda
Aviv Palivoda added the comment: >From looking at the git blame this is there since 2006. Maybe this should be >dependent on issue #30262. Maybe at first there should be a deprecation >warning and then removing this later. I understand that this might break someone's code but this is an undocum

[issue30190] unittest's assertAlmostEqual improved error message

2017-05-05 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > I made one design choice: the close() method of byte and character streams > are called twice, I didn't call setByteStream(None) / > setCharacterStream(None) to avoid creating an inconsistent source. If you > really care, maybe we can reset the source to a n

[issue19903] Idle: Use inspect.signature for calltips

2017-05-05 Thread Louie Lu
Louie Lu added the comment: And, another case, the __text_signature__ and i.signature() is similar, but not the same: >>> range.__init__.__text_signature__ '($self, /, *args, **kwargs)' ^ >>> str(i.signature(range.__init__)) '(self, /, *args, **kwargs)' So we can't simply compare-and-elimina

[issue30278] The element div#sidebar on documentation requires the attribute role="button".

2017-05-05 Thread Kyle Thomas
New submission from Kyle Thomas: Elements other than buttons which act as buttons require metadata to be accessible. Refer to https://www.w3.org/TR/wai-aria-practices/examples/button/button.html -- assignee: docs@python components: Documentation messages: 293056 nosy: Kyle Thomas, docs@

[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2017-05-05 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1570 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30279] Remove unused Python/thread_foobar.h

2017-05-05 Thread Masayuki Yamamoto
New submission from Masayuki Yamamoto: Python/thread_foobar.h is the template code that is threading adaptation for new platforms, and it hasn't been used on actual platforms. As a matter of fact, Python/thread_pthread.h and Python/thread_nt.h give concrete examples of adaptation, therefore,

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1571 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 39b73dd5131ce205dcee3b9e24ba0fc28934d79c by Serhiy Storchaka in branch '3.6': [3.6] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1469) https://github.com/python/cpython/commit/39b73dd5131ce205dcee3b9e24ba0fc28934d79c -

[issue30269] [2.7] test_release_task_refs() of test_multiprocessing.py is unstable

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Oh, it's just a missed backport of the last bpo-29861 fix, only 2.7 miss a backport. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing Pool keeps objects (tasks, args, results) alive too long _

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ee2294860e224c2b08cc6847d3c9a0ec3875c3d8 by Serhiy Storchaka in branch '3.5': [3.5] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1470) https://github.com/python/cpython/commit/ee2294860e224c2b08cc6847d3c9a0ec3875c3d8 -

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 685cdb9acc3fca04a9897d88b89771ddfd50e772 by Antoine Pitrou in > branch 'master': > Relax test timing (bpo-29861) to avoid sporadic failures (#1120) Oh, this change wasn't backported to 2.7 and caused the bpo-30269. I proposed a backport: https:

[issue30277] Speeds up compiling cases-insensitive regular expressions

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7186cc29be352bed6f1110873283d073fd0643e4 by Serhiy Storchaka in branch 'master': bpo-30277: Replace _sre.getlower() with _sre.ascii_tolower() and _sre.unicode_tolower(). (#1468) https://github.com/python/cpython/commit/7186cc29be352bed6f1110873

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset ef9c0e732fc50aefbdd7c5a80e04e14b31684e66 by Victor Stinner in branch 'master': bpo-30264: ExpatParser closes the source on error (#1451) https://github.com/python/cpython/commit/ef9c0e732fc50aefbdd7c5a80e04e14b31684e66 -- __

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset fd6094cdebb5736745d164e0207de2d4cb0b50dc by Victor Stinner in branch '2.7': Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1472) https://github.com/python/cpython/commit/fd6094cdebb5736745d164e0207de2d4cb0b50dc -- __

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1573 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30279] Remove unused Python/thread_foobar.h

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Copy of my answer on the python-dev thread: You can remove thread_foobar.h. I don't think that anyone still wants to use this template. The other thread_*.h files can be used as template as well. Victor -- nosy: +haypo

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1574 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1575 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Oh, the fix for Python 2.7 is different. In fact, the file object was never explicitly closed by the parser. It is now always closed by the parser, on success or error. -- ___ Python tracker

[issue30279] Remove unused Python/thread_foobar.h

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset fdaeea620f8c78da89cddba4ab010c64535800e0 by Victor Stinner (Masayuki Yamamoto) in branch 'master': bpo-30279: Remove unused Python/thread_foobar.h (#1473) https://github.com/python/cpython/commit/fdaeea620f8c78da89cddba4ab010c64535800e0

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0fe870f3f95ba883b2b06bc0d814bdab8d53df98 by Victor Stinner in branch '3.6': bpo-30264: ExpatParser closes the source on error (#1451) (#1474) https://github.com/python/cpython/commit/0fe870f3f95ba883b2b06bc0d814bdab8d53df98 -- _

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0c9aa6ffd318c04ce23997b4704477d4a4d82829 by Victor Stinner in branch '3.5': bpo-30264: ExpatParser closes the source on error (#1451) (#1475) https://github.com/python/cpython/commit/0c9aa6ffd318c04ce23997b4704477d4a4d82829 -- _

[issue30279] Remove unused Python/thread_foobar.h

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: I hope that your merged change will now make your work simpler ;-) I don't want to backport this change, so I close the issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset d81f9e24ea89c0aaded1e0d3f8d8076bbd58c19a by Victor Stinner in branch '2.7': bpo-30264: ExpatParser now closes the source (#1476) https://github.com/python/cpython/commit/d81f9e24ea89c0aaded1e0d3f8d8076bbd58c19a -- __

[issue29920] Document cgitb.text and cgitb.html

2017-05-05 Thread Berker Peksag
Berker Peksag added the comment: New changeset c07b3a15be5e0a68a73b4c532861ed8de6932bd2 by Berker Peksag (masklinn) in branch 'master': bpo-29920: Document cgitb.text() and cgitb.html() functions (GH-849) https://github.com/python/cpython/commit/c07b3a15be5e0a68a73b4c532861ed8de6932bd2 --

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: traced it down a bit further. nearly all that time is spent in import _hashlib which probably means, it is spent in functions like PyInit__hashlib in Modules/_hashopenssl.c I can see in strace that after loading libssl, libcrypto and libz, it calls getpi

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1576 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue30243] Core dump when use uninitialized _json objects

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5d7a18f3b65bd958d876391cca3c381396021639 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1471) https://github.com/python/cpython/commit/5d7a18f3b65bd958d876391cca3c381396021639 -

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

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > The change announces "... clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] > ...", but there is no explicit to clip the maximum to PY_SSIZE_T_MAX. Maybe > there is a bug on this side too! The code should be reviewed one more time. Ok, I checked: _PySlice_U

[issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ...

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 03b278895fa0db355af4e450eac71dd0532db394 by Victor Stinner in branch '2.7': bpo-30265: support.unlink() don't catch any OSError (#1456) https://github.com/python/cpython/commit/03b278895fa0db355af4e450eac71dd0532db394 -- ___

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset 228da42961ac9bf2990e6c191ecc9b762ead617c by Victor Stinner in branch '2.7': bpo-30258: Fix handling of child error in regrtest (#1477) https://github.com/python/cpython/commit/228da42961ac9bf2990e6c191ecc9b762ead617c --

[issue30265] [2.7] test.support.unlink() should fail or emit a warning on WindowsError: [Error 32] The process cannot access the file ...

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Ok, fixed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ __

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: @Serhiy: I fixed the bug you found. Don't hesitate to propose directly a PR if I missed something (or open an issue, it's up to you). At least, regrtest of Python 2.7 should now handle correctly crashes when using -jN. -- resolution: -> fixed stage:

[issue30257] _bsddb: else misleadingly indented

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

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: I applied my fix to 2.7, 3.5, 3.6 and master (3.7). Thanks for the helpful reviews Serhiy ;-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30095] HTMLCalendar allow custom classes

2017-05-05 Thread Walter Dörwald
Walter Dörwald added the comment: See comments on Github -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue30280] Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9

2017-05-05 Thread STINNER Victor
New submission from STINNER Victor: On the FreeBSD 9 buildbot, I saw this warning: Warning -- threading._dangling was modified by test_asyncio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/124/steps/test/logs/warnings%20%281%29 http://buildbot.python.org/all/builde

[issue19903] Idle: Use inspect.signature for calltips

2017-05-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: What is List? Not a builtin. I am guessing that $self means to remove for bound methods. In any case, __text_signature__ is effectively private to inspect.signature. We only care what the latter produces. -- ___

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This changes the behavior if pass a file object to the parser. When the parser failed it was possible to use the passed file object (for example call tell()). Now it is closed. -- ___ Python tracker

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You just pressed the merge button 2 minutes before I finished a review. -- ___ Python tracker ___

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you mind to port changes to 3.x? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Christian Heimes
Christian Heimes added the comment: I cannot reproduce the open /dev/urandom calls locally. You seem to be running an old Python version and/or old Kernel. Python prefers getrandom() over /dev/urandom. The urandom code caches the fd for /dev/urandom. $ strace ./python -c 'import hashlib' 2>&1

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-05 Thread Tomas Orsava
Changes by Tomas Orsava : -- pull_requests: +1577 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > This changes the behavior if pass a file object to the parser. When the > parser failed it was possible to use the passed file object (for example call > tell()). Now it is closed. If the high-level *function* parse() is called with a filename, the caller d

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1578 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue30258] [2.7] regrtest: handle child process crash

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > You just pressed the merge button 2 minutes before I finished a review. Oh sorry, I didn't expect a review on this small change. > Do you mind to port changes to 3.x? I created https://github.com/python/cpython/pull/1479 for the run_tests_multiprocess() bug

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: What is your Python version? It looks like an old version. -- ___ Python tracker ___ ___ Python-bugs

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: What is your OS? Which kind of computer is it? I'm surprised that you noticed open calls on /dev/urandom, it should be very quick, no? -- ___ Python tracker __

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Christian Heimes
Christian Heimes added the comment: I rather suspect it's OpenSSL. It takes a bit to load and initialize libcrypto.so. On my system it takes about 17ms to import _hashlib. There is nothing we can do about it in CPython. -- ___ Python tracker

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

2017-05-05 Thread Nick Coghlan
Nick Coghlan added the comment: As noted on python-dev, it would be helpful if this change was mentioned in the 2.7, 3.5, and 3.6 What's New documents under a "Notable changes in maintenance releases" section. For 2.7, that would be a retitling of the existing section "New features added to P

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2017-05-05 Thread Matteo Bertini
Matteo Bertini added the comment: Bumped in this bug yesterday, sadly a script working (by chance) in Python2 doesn't work in Python3 because of this bug. -- nosy: +naufraghi ___ Python tracker ___

[issue30264] [Windows] test_sax: Warning -- files was modified by test_sax

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If you use directly the parser class and pass an open file object, in that > case, yes, my change closes the file. Or if the high-level *function* parse() is called with an open file object. I don't know whether this is desirable change, but this change ca

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread Xiang Zhang
New submission from Xiang Zhang: The default value for stop in PySlice_Unpack should be -PY_SSIZE_T_MAX-1. Otherwise a sequence of length PY_SSIZE_T_MAX could get a wrong slicelength when doing L[::-1]. -- components: Interpreter Core messages: 293097 nosy: serhiy.storchaka, xiang.zhan

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1579 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that -PY_SSIZE_T_MAX-1 always is representable. I would use PY_SSIZE_T_MIN and add a static assert (Py_BUILD_ASSERT) that PY_SSIZE_T_MIN + 1 <= -PY_SSIZE_T_MAX. Actually currently PY_SSIZE_T_MIN is -PY_SSIZE_T_MAX-1 by definition, but this can b

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-05 Thread Tomas Orsava
Tomas Orsava added the comment: I've opened a PR#1478 that I believe fixes the issue. -- nosy: +torsava ___ Python tracker ___ ___ Pyt

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Hum, integer overflows are complex issues. It deserves an unit test, maybe even in C written in _testcapi? -- nosy: +haypo ___ Python tracker _

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: I'm running openSUSE Tumbleweed with python-2.7.13 and python3-3.6.1 on an Intel Pentium N3530 with linux-4.10.12 There the total time of the "import _hashlib" oneliner varies between 100 and 250 ms (python3 is a bit slower and the machine is slower when

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: > the urandom calls themselves are not slow, but probably the processing in > between. Can't that be done on demand on first use? If the time is spent on loading OpenSSL, maybe you should try to import hashlib on demand? -- ___

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-05 Thread R. David Murray
R. David Murray added the comment: If these objects have been exposed in the past, we won't simply delete them. At a minimum there would need to be a deprecation period, but is there a real motivation for deleting them? -- nosy: +r.david.murray ___

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-05 Thread R. David Murray
R. David Murray added the comment: Sorry, by "real motivation" I meant something beyond just cleaning up the API...that's a real motivation, it may just not be enough. -- ___ Python tracker ___

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-05 Thread R. David Murray
R. David Murray added the comment: Why do you think this is a bug? -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-lis

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-05 Thread R. David Murray
R. David Murray added the comment: To clarify my question, I don't think it is a bug, but the fact that you do might mean there needs to be a doc clarification. Or it might not. Or, there might be a desirable enhancement here, maybe relating to the pathlike protocol. --

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There were issues with mimetypes.guess_type() on Windows in Python 2 (issue9291 and a number of duplicate issues). I afraid that adding support of bytes paths will return the hell from which we ran in Python 3. -- nosy: +serhiy.storchaka ___

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-05 Thread Berker Peksag
Berker Peksag added the comment: Even if users somehow managed to create Cache and Statement objects themselves, they are basically implementation details of the module and there is no way to use them to mess with the internal state of the module via using the current API (e.g. Cursor.statemen

[issue24932] Use proper command line parsing in _testembed

2017-05-05 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Downstream backporting of PEP 538 to the 3.6 branch also depends on this fix. Would it be beneficial in any way to cherry-pick it for 3.6? -- nosy: +cstratak ___ Python tracker

[issue30282] object returned by tarfile.extractfile has an incorrect value of name attribute

2017-05-05 Thread Ondrej Kubecka
New submission from Ondrej Kubecka: Consider the following code snippet: import tarfile tar1 = tarfile.open('tar1.tar.gz') file_ = tar1.extractfile('FILE') print(file_.name) Up until 3.2.x, the value of name attribute would be 'FILE' as derived from tarinfo of the member. Starting with 3.3

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: New changeset a1054c3b0037d4c2a5492e79fc193f36245366c7 by Victor Stinner (torsava) in branch 'master': bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478) https://github.com/python/cpython/commit/a1054c3b0037d4c2a5492e79fc193f36245366c7 ---

[issue29243] --enable-optimizations makes common build commands always need to compile from scratch

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: I closed my issue #29641 as a duplicate of this one. -- ___ Python tracker ___ ___ Python-bugs-list

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: This might work in some places, but if you look at real-world users like urllib3/util/ssl_.py > from hashlib import md5, sha1, sha256 or twisted/words/protocols/jabber/xmlstream.py > from hashlib import sha1 It would probably not need any openssl at all,

[issue30268] Make mimetypes.guess_type accept path-like objects

2017-05-05 Thread ProgVal
ProgVal added the comment: @r.david.murray I don't think it's a bug either, but a possible enhancement. @serhiy.storchaka We could simply do this: if isinstance(url, bytes): url = os.fsdecode(url) -- ___ Python tracker

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread Christian Heimes
Christian Heimes added the comment: If import of hashlib is slowed down by OpenSSL, then import of ssl module will be even slower. Am 5. Mai 2017 17:57:41 MESZ schrieb "Bernhard M. Wiedemann" : > >Bernhard M. Wiedemann added the comment: > >This might work in some places, but if you look at re

[issue30281] set stop default to -PY_SSIZE_T_MAX-1 in PySlice_Unpack

2017-05-05 Thread Xiang Zhang
Xiang Zhang added the comment: I am okay to use PY_SSIZE_T_MIN. But if we are worried about future change of PY_SSIZE_T_MIN, seems we also need to change the API doc of PySlice_Unpack(). Although _PyEval_SliceIndex's comment says it clips value to -PY_SSIZE_T_MAX-1, actually it uses PyNumber_A

[issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space

2017-05-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: It should be backported in my opinion. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30223] Add Lib/test/__main__.py in 2.7

2017-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor for fixing this bug. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-05 Thread STINNER Victor
New submission from STINNER Victor: I would like to continue to backport enhancements of regrtest from master to 2.7. In master, regrtest has so many super useful features! This week, Serhiy and me backported some basic features, but we introduced regressions. I now would like to backport test

[issue30284] Build CPython out of tree with a read-only source tree

2017-05-05 Thread STINNER Victor
New submission from STINNER Victor: I tried to build CPython out of the source tree with a customized read-only source tree (chmod -R -w). I got an error when running tests: tests want to write into a build/ directory... in the source tree. Attached patch fixes this issue. -- componen

[issue30284] Build CPython out of tree with a read-only source tree

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue30274] Make importlib.abc.ExtensionFileLoader.__init__() documentation match code

2017-05-05 Thread Brett Cannon
Brett Cannon added the comment: Another option is to rename 'name' to 'fullname', make 'name' keyword-only, and then raise a DeprecationWarning if 'name' is used, eventually removing the keyword-only argument. -- ___ Python tracker

[issue30284] Build CPython out of tree with a read-only source tree

2017-05-05 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1581 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space

2017-05-05 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue30276] import hashlib makes many programs slow

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: I ran a quick benchmark on my laptop, Fedora 25: haypo@selma$ python3 -m perf command -o ref.json -- python3 -c 'pass' && python3 -m perf command -o hashlib.json -- python3 -c 'import hashlib' && python3 -m perf compare_to ref.json hashlib.json --table +

[issue30270] Remove sqlite3.Cache display method

2017-05-05 Thread Brett Cannon
Brett Cannon added the comment: With over 10 years of existence for that method, I can guarantee you someone relies on it, and so we should do a reasonable job to avoid breaking them without at least some warning first. -- ___ Python tracker

[issue30284] Build CPython out of tree with a read-only source tree

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: Ah, there is one and only one failing test: == ERROR: test_synopsis_sourceless (test.test_pydoc.PydocDocTest) -- Traceback (mo

[issue30284] Build CPython out of tree with a read-only source tree

2017-05-05 Thread STINNER Victor
STINNER Victor added the comment: test_synopsis_sourceless() should create a script, build it and test the generated .pyc file. So we control how the .pyc file is created. -- ___ Python tracker ___

[issue30285] Optimize case-insensitive regular expressions

2017-05-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Matching and searching case-insensitive regular expressions is much slower than matching and searching case-sensitive regular expressions. Case-insensitivity requires converting every character in input string to lower case and disables some optimizations.

[issue30262] Don't expose sqlite3 Cache and Statement

2017-05-05 Thread R. David Murray
R. David Murray added the comment: That's the same motivation, not a new one :) Someone somewhere may be using them for something, they've been around for a long time. I hope not, though. -- ___ Python tracker _

  1   2   >