[issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: My PR 780 doesn't support multiple Python interpreters in the same process. To support that, we need a more advanced solution. For example, add an hash table in the interpreter structure using the variable memory address as the key. Maybe we can move step by s

[issue13487] inspect.getmodule fails when module imports change sys.modules

2017-09-05 Thread Thomas Dudziak
Thomas Dudziak added the comment: This bug seems to be still there. I had an application fail with this same error in inspect.getouterframes with Python 3.6.2. As far as I could trace it, during iteration over sys.modules _tracemalloc and tracemalloc were added, not quite sure from where (mayb

[issue31320] test_ssl logs a traceback

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: The error occurs in the test case that uses a PROTOCOL_TLS_SERVER context for both client and server context. In that case, OpenSSL wrap_socket() fails internally and OpenSSL raises an OSError with errno 0. Simple fix: catch OSError in the client thread and

[issue31344] f_trace_opcodes frame attribute to switch to per-opcode tracing

2017-09-05 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue31344] f_trace_opcodes frame attribute to switch to per-opcode tracing

2017-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: Steve's also requested the ability to *turn off* line debugging, and I'm thinking it may make sense to allow all four configurations: * both line and opcode events disabled * only getting one or the other * getting both kinds of event Opcode events would definit

[issue30445] test_traceback fails in coverage run

2017-09-05 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +3372 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31352] Tracis CI coverage job fails on Python 3.6

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of bpo-30445. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_traceback fails in coverage run ___ Python tracker

[issue30445] test_traceback fails in coverage run

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

[issue31353] Implement PEP 553 - built-in debug()

2017-09-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +3370 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31353] Implement PEP 553 - built-in debug()

2017-09-05 Thread Barry A. Warsaw
New submission from Barry A. Warsaw: Placeholder issue for discussion of the design of the implementation of PEP 553. -- assignee: barry components: Interpreter Core messages: 301372 nosy: barry priority: normal severity: normal status: open title: Implement PEP 553 - built-in debug() ve

[issue31349] Embedded initialization ignores Py_SetProgramName()

2017-09-05 Thread Steve Dower
Steve Dower added the comment: People are working on PEP 432 this week at the sprints, so yeah, it's likely. -- ___ Python tracker ___ ___

[issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 63b3f2b19cc96801c3b8619e4cf8aa9028e7a33c by Christian Heimes in branch '3.6': [3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769) (#1778) https://github.com/python/cpython/commit/63b3f2b19cc96801c3b8619e4cf8aa9028e7a33c -

[issue31352] Tracis CI coverage job fails on Python 3.6

2017-09-05 Thread STINNER Victor
New submission from STINNER Victor: haypo@selma$ ./python -m venv env haypo@selma$ env/bin/python -m pip install coverage haypo@selma$ ./env/bin/python -m coverage run --pylib -m test -uall,-cpu test_traceback (...) == FAIL: tes

[issue30465] FormattedValue expressions have wrong lineno and col_offset information

2017-09-05 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 31140: I'm not sure if that case is covered by this issue. -- ___ Python tracker ___ _

[issue31351] ensurepip discards pip's return code which leads to broken venvs

2017-09-05 Thread Igor Filatov
New submission from Igor Filatov: ensurepip runs pip with a function that discards the result code that pip produces: def _run_pip(args, additional_paths=None): # ... pip.main(args) pip.main() is designed not to raise command exceptions. Instead it returns exit codes which

[issue31344] f_trace_opcodes frame attribute to switch to per-opcode tracing

2017-09-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: Adding Ned to CC in case he wants to comment on the utility of per-opcode tracing from the perspective of coverage.py. -- nosy: +nedbat, njs ___ Python tracker __

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-05 Thread Zachary Ware
Zachary Ware added the comment: New changeset 8905fb831cf7c400c479b79bb2f90bfbe9c71337 by Zachary Ware in branch '2.7': bpo-30450: Don't use where, XP doesn't have it (GH-3348) https://github.com/python/cpython/commit/8905fb831cf7c400c479b79bb2f90bfbe9c71337 -- __

[issue17852] Built-in module _io can loose data from buffered files at exit

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: To elaborate a bit on the patch: - it is pointless to call flush() if the buffered is in a bad state (self->ok == 0) or it has started finalizing already - you need to own the reference, since flush() can release the GIL and, if the reference is borrowed, the r

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-05 Thread Stefan Behnel
Stefan Behnel added the comment: Since I'm getting highly reproducible results on re-runs, I tend to trust these numbers. -- ___ Python tracker ___ _

[issue31344] f_trace_opcodes frame attribute to switch to per-opcode tracing

2017-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The f_trace attribute is writable from a tracing function. There are different restrictions, for example you can't jump inside a 'for' loop from outside. The code of the setter is complex and hard for modifications (see the discussion on PR 2827). Allowing t

[issue17852] Built-in module _io can loose data from buffered files at exit

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just apply the following patch to the original PR and it should work fine: diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index 50c87c1..2ba98f2 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -409,12 +409,12 @@ static v

[issue29988] (async) with blocks and try/finally are not as KeyboardInterrupt-safe as one might like

2017-09-05 Thread Nick Coghlan
Nick Coghlan added the comment: https://github.com/ncoghlan/cpython/pull/2/files now adds a DEFER_PENDING_UNTIL opcode that relies on the jump offset calculation machinery to decide how long pending call processing should be deferred. Right now, the test case is also emulating the "skip pendin

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: According to Jimmy, asyncio.get_event_loop() behaves differently if it's called while an event loop is running. So my first benchmark was wrong. Attached bench_get_event_loop.py measures asyncio.get_event_loop() performance when an event loop is running. I get

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file47122/bench_get_event_loop.py ___ Python tracker ___ ___ Python-bugs-list m

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

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

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

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

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

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

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

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

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

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

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

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

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

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

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

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

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Yury Selivanov
Yury Selivanov added the comment: > Or is there an issue in my benchmark? Yes. The correct benchmark would be to measure `get_event_loop` performance from *within* a running event loop. -- ___ Python tracker ___

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: If the motivation is correctness and not performance, please adjust the issue and PR description :-) -- ___ Python tracker ___

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm not convinced that the PR is worth it. 3% is not interesting on a micro > benchmark. I found a small issue in the PR (left a comment in the PR). I think using a tuple is still a good idea (even if the speedup is tiny) because logically, both attributes

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > Which compiler needs more than "abort();" in a default statement? gcc and > clang don't. Again, I'm not sure that bpo-28152 is directly related to this issue, but here an example: $ git diff diff --git a/Parser/grammar.c b/Parser/grammar.c index 75fd5b9cde

[issue17852] Built-in module _io can loose data from buffered files at exit

2017-09-05 Thread Neil Schemenauer
Neil Schemenauer added the comment: I reverted because of the crash in test_threading. I'm pretty sure there is a bug with the locking of bufferedio.c, related to threads and flush. Here is the stacktrace I get (my patch applied, I'm trying to write a Python test that triggers the SEGV witho

[issue29708] support reproducible Python builds

2017-09-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: I have proposed PEP 552 to address this issue. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2017-09-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: the recommendation to use subprocess32 still stands, but this bug has been "fixed" in as much as it can be without a complete rewrite within 2.7. -- resolution: -> fixed stage: -> resolved status: open -> closed

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2017-09-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 5e8e371364ee58dadb9a4e4e51c7e9cf6bedbfae by Gregory P. Smith in branch '2.7': bpo-27448: Work around a gc.disable race condition in subprocess. (#1932) https://github.com/python/cpython/commit/5e8e371364ee58dadb9a4e4e51c7e9cf6bedbfae -

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: Please use perf.timeit not timeit for microbenchmarks: https://perf.readthedocs.io/en/latest/ -- ___ Python tracker ___ ___

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Stefan Krah
Stefan Krah added the comment: On Tue, Sep 05, 2017 at 05:10:24PM +, STINNER Victor wrote: > That's a good example of better implementation for Py_UNREACHABLE(). > > The tricky part is to make compiler warnings quiet. For example, you cannot > replace "abort(); return NULL;" with "abort()",

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: I suggest to use my perf module to run benchmark, especially if the tested function takes less than 1 ms, which is the case here. Attached benchmark script calls asyncio.get_event_loop(). Result on the master branch with PR 3347: haypo@selma$ ./python ~/bench

[issue31336] Speed up _PyType_Lookup() for class creation

2017-09-05 Thread Stefan Behnel
Stefan Behnel added the comment: I updated the pull request with a split version of _PyType_Lookup() that bypasses the method cache during slot updates. I also ran the benchmarks with PGO enabled now to get realistic results. The overall gain is around 15%. Original: $ ./python -m timeit 'clas

[issue31349] Embedded initialization ignores Py_SetProgramName()

2017-09-05 Thread Christian Ullrich
Christian Ullrich added the comment: Not quite. Looking a bit further down get_progname()'s weird logic, we see that it works like this: 1. prog = Py_GetProgramName() 2. progpath = GetModuleFileNameW() 3. if (prog is empty): prog = "python" 4. if (slash in prog): # Or backslash, of

[issue31349] Embedded initialization ignores Py_SetProgramName()

2017-09-05 Thread Steve Dower
Steve Dower added the comment: You're right, though I disagree with the fix as that would cause the process filename to be ignored. A correct fix would check whether the name has been set explicitly and if so, either use it as-is (if absolute) or get the actual name and use its directory (sin

[issue29627] configparser.ConfigParser.read() has undocumented/unexpected behaviour when given a bytestring path.

2017-09-05 Thread Łukasz Langa
Changes by Łukasz Langa : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ConfigParser.read silently fails if filenames argument is a byte string ___ Python tracker

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Jimmy Lai
Jimmy Lai added the comment: Benchmark script: Run 10 times to get mean and stdev import asyncio import time async def async_get_loop(): start_time = time.time() for _ in range(500): asyncio.get_event_loop() return time.time() - start_time loop = asyncio.get_event_loop

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-05 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +3361 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue31350] Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: Can you please provide the code of your benchmark? -- nosy: +haypo ___ Python tracker ___ ___ Python

[issue31350] asyncio: Optimize get_event_loop and _get_running_loop

2017-09-05 Thread STINNER Victor
Changes by STINNER Victor : -- title: Optimize get_event_loop and _get_running_loop -> asyncio: Optimize get_event_loop and _get_running_loop ___ Python tracker ___

[issue31350] Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Jimmy Lai
Changes by Jimmy Lai : -- type: -> performance ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue31350] Optimize get_event_loop and _get_running_loop

2017-09-05 Thread Jimmy Lai
New submission from Jimmy Lai: get_event_loop() and _get_running_loop() can be faster. CaseTimeMeanImprove No Cha

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > Or simply you would write: > >Py_UNREACHABLE(); > return NULL; I recall that I had to fix warnings when using clang on: Py_FatalError("..."); return NULL; See bpo-28152. I don't know if it's related to this issue. -- __

[issue30502] Fix buffer handling of OBJ_obj2txt

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset c9d668c0d8a6f3e8e72345e53d1dd34be172f16e by Christian Heimes in branch '2.7': [2.7] bpo-30502: Fix handling of long oids in ssl. (GH-2909). (#3322) https://github.com/python/cpython/commit/c9d668c0d8a6f3e8e72345e53d1dd34be172f16e -- _

[issue30502] Fix buffer handling of OBJ_obj2txt

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset f201e886fc7aaeb50f5e945578c6aec2a59a5323 by Christian Heimes in branch '3.6': [3.6] bpo-30502: Fix handling of long oids in ssl. (GH-2909) (#3321) https://github.com/python/cpython/commit/f201e886fc7aaeb50f5e945578c6aec2a59a5323 -- __

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 05/09/2017 à 19:10, STINNER Victor a écrit : > > Maybe the default implementation of the macro should be: > > #define Py_UNREACHABLE(stmt) abort(); stmt Or simply you would write: Py_UNREACHABLE(); return NULL; --

[issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: Too bad, the bug is not dead, I reopen the issue. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/800/steps/test/logs/stdio test_rlock (test.test_multiprocessing_forkserver.WithThreadsTestLock) ... ok test_rapid_restart (te

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > As suggested in http://bugs.python.org/issue31337#msg301229 it would be > better to use > abort() /* NOT REACHED */ Please don't use abort(), but add a new Py_UNREACHABLE() macro to allow to use a different code depending on the compiler/platform and compile

[issue6396] '' % object() raises TypeError, '' % A() does not

2017-09-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: The issue History suggests that the original report was marked for 2.6, 3.0, 3.1. It is not clear which versions the OP or anyone else tested. I removed the versions above and added 3.2, 3.3 after reporting a test on 3.2.0. I did not report 2.7 behavior and

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can we use compiler-specific code like GCC's __builtin_unreachable()? This would help the optimizer. -- ___ Python tracker ___ __

[issue31339] [2.7] time.asctime() crash with year > 9999 using musl C library

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > Isn't this a duplicate of issue16137 which was closed with the resolution > "won't fix"? This issue seems to be a crash on Windows using negative year. You proposed a patch using asctime_s() instead of asctime(). So the fix is specific to Windows. This issu

[issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: Antoine Pitrou: "I don't terribly like this being backported. It does not fix any user-visible problem AFAIK." https://github.com/python/cpython/pull/3309#issuecomment-327231614 Ok, let's close this issue. -- resolution: -> fixed stage: -> resolved

[issue17852] Built-in module _io can loose data from buffered files at exit

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > FAIL: test_4_daemon_threads (test.test_threading.ThreadJoinOnShutdown) Oh, it also failed on: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/957/steps/test/logs/stdio and http://buildbot.python.org/all/builders/x86%

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Stefan Krah
Stefan Krah added the comment: And Solaris lint recognizes it: https://docs.oracle.com/cd/E60778_01/pdf/E60745.pdf Actually it could be that the convention comes right from K&R, but I can't find my copy right now. -- ___ Python tracker

[issue17852] Built-in module _io can loose data from buffered files at exit

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > New changeset e38d12ed34870c140016bef1e0ff10c8c3d3f213 by Neil Schemenauer in > branch 'master': > bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. > (#1908) This change introduced a regression: ==

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 986b7ffc650919b3022ccaa458a843bb8a95d2bd by Zachary Ware in > branch '2.7': > [2.7] bpo-30450: Pull Windows dependencies from GitHub rather than SVN > (GH-1783) (GH-3306) This change also broke compilation on AMD64 Windows10 2.7 buildbot: http:

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-05 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +3359 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-09-05 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 986b7ffc650919b3022ccaa458a843bb8a95d2bd by Zachary Ware in > branch '2.7': > [2.7] bpo-30450: Pull Windows dependencies from GitHub rather than SVN > (GH-1783) (GH-3306) This change broke Python 2.7 compilation on Windows XP. Pending fix: PR

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Stefan Krah
Stefan Krah added the comment: > Is /* NOT REACHED */ a common convention? I think it's often used in BSD, I first saw it in OpenBSD. A macro is fine of course. -- ___ Python tracker

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- pull_requests: +3358 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > > Can we have a Py_UNREACHABLE() macro for that, then? > First, it makes the intent extra clear without needing any additional > comment. Second, it can be defined however we need in order to get along > with the various tools around. +1 --

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can we have a Py_UNREACHABLE() macro for that, then? First, it makes the intent extra clear without needing any additional comment. Second, it can be defined however we need in order to get along with the various tools around. -- nosy: +pitrou __

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @skrah - quick question. Is /* NOT REACHED */ a common convention? Do any compilers or IDEs recognize it? Is it documented anywhere? I like the idea of adding that comment on the abort(), but I'm trying to find some prior art or references for that.

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +3357 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't mind someone to reimplement a full-fledged Queue in C. As for me, I am currently implementing a SimpleQueue in C that's reentrant and has only the most basic functionality. -- ___ Python tracker

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Would it make sense get() and put() to add gc.disable() and gc.enable() > whenever GC is already enabled? That doesn't sound very nice if some thread is waiting on a get() for a very long time (which is reasonable if you have a thread pool that's only used

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: No worries. I thank you also for reviewing all these changesets. I'm glad it worked in the end. -- ___ Python tracker ___ ___

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your persistence and your initial patch. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker _

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 7daa45db1d60eed4e5050bf792969893d9f2c8e0 by Christian Heimes in branch '2.7': [2.7] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3343) https://github.com/python/cpython/commit/7daa45db1d60eed4e5050bf792969893d9f2c8e0 -

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2ddea0f098b42dfd74f53bcbf08c8e68c83e1049 by Christian Heimes in branch '3.6': [3.6] bpo-30102: Call OPENSSL_add_all_algorithms_noconf (GH-3112) (#3342) https://github.com/python/cpython/commit/2ddea0f098b42dfd74f53bcbf08c8e68c83e1049 -

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ __

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 02854dab6231d726fa2c63d44ab25598988c44f4 by Christian Heimes in branch '3.6': [3.6] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3344) https://github.com/python/cpython/commit/02854dab6231d726fa2c63d44ab25598988c44f4 --

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset ffa7011cb904ee6ad9d4931b073c13d9e1514e6b by Christian Heimes in branch '2.7': [2.7] bpo-31343: Include sys/sysmacros.h (GH-3318) (#3345) https://github.com/python/cpython/commit/ffa7011cb904ee6ad9d4931b073c13d9e1514e6b --

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm thinking there are two aspects to this. One would involve updates to PEP 7 to include a section on "Unreachable code". The other would be a PR that updates the current C code to the PEP 7 standard. I'll work on a PEP update as a separate PR, then we can

[issue30622] Fix NPN guard for OpenSSL 1.1

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your patch! I have merged it into master, 3.6, and 2.7. The other branches are in security fix-only mode. -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error versions: +Python 3.7 -Python 3.3, Python

[issue30622] Fix NPN guard for OpenSSL 1.1

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 7316c6d4a57931e9786c06eae168b227d7463317 by Christian Heimes in branch '3.6': [3.6] bpo-30622: Change NPN detection: (GH-2079) (#3314) https://github.com/python/cpython/commit/7316c6d4a57931e9786c06eae168b227d7463317 -- __

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3355 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3356 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31343] Include major(), minor(), makedev() from sysmacros

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset 75b961869a1184895c9d5bf41a57f3c985622662 by Christian Heimes in branch 'master': bpo-31343: Include sys/sysmacros.h (#3318) https://github.com/python/cpython/commit/75b961869a1184895c9d5bf41a57f3c985622662 -- _

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3354 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Christian Heimes added the comment: New changeset c941e6238ab2a8caad11fe17d4723a5d5e7a2d76 by Christian Heimes in branch 'master': bpo-30102: Call OPENSSL_add_all_algorithms_noconf (#3112) https://github.com/python/cpython/commit/c941e6238ab2a8caad11fe17d4723a5d5e7a2d76 -- __

[issue30102] improve performance of libSSL usage on hashing

2017-09-05 Thread Christian Heimes
Changes by Christian Heimes : -- pull_requests: +3353 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue6396] '' % object() raises TypeError

2017-09-05 Thread Cheryl Sabella
Cheryl Sabella added the comment: Under 3.7, the examples Terry gave now have consistent results. >>> '' % A() Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during string formatting >>> '' % object() Traceback (most recent call last): File ""

[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

2017-09-05 Thread Riccardo Coccioli
Riccardo Coccioli added the comment: This can actually be reproduced with Python 2.7 too (thanks @thiell to let me know). At first I thought that it was not because it doesn't repro with the stock macOS-shipped Python 2.7.10 on macOS Sierra 10.12.6, where the select.poll() is not available at

[issue31349] Embedded initialization ignores Py_SetProgramName()

2017-09-05 Thread Christian Ullrich
Christian Ullrich added the comment: That should have been diff --git a/PC/getpathp.c b/PC/getpathp.c index e7be704a9a..abb5e54c9f 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -443,8 +443,7 @@ get_progpath(void) #else dllpath[0] = 0; #endif -if (GetModuleFileNameW(NULL, progpath

[issue31349] Embedded initialization ignores Py_SetProgramName()

2017-09-05 Thread Christian Ullrich
New submission from Christian Ullrich: I'm trying to do something that may be slightly tricky, and I think I just found a vintage 1997 bug. Please correct me if I'm wrong. This is PC/getpathp.c from current master: 430: static void 431: get_progpath(void) 432: { 433: extern wchar_t *Py_Get

[issue31345] Backport docstring improvements to the C version of OrderedDict

2017-09-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE

2017-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This wording is not correct as I noted in msg294324. -- versions: -Python 3.5 ___ Python tracker ___

[issue31338] Use abort() for code we never expect to hit

2017-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The fact that assert() is compiled out in release build looks as an advantage to me. This allows the compiler to generate smaller code. I'm in favor of using assert(!"message"), but this form is rarely used in CPython sources. I think it would be nice to ask

<    1   2   3   >