[issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7

2018-07-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +7901 stage: -> patch review ___ Python tracker ___ ___

[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Tim Peters
Tim Peters added the comment: Note that you can consume multiple gigabytes of RAM with this simpler program too, and for the same reasons: """ import concurrent.futures as cf bucket = range(30_000_000) def _dns_query(target): from time import sleep sleep(0.1) def run(): with

[issue34166] Tools/msgfmt.py emits a DeprecationWarning under Python 3.7

2018-07-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I could see some unclosed file handlers as well. The last commit (c56894d305211c98882898f237ff54f620520139) was also made in 2013 and I could see no tests for tools too. ➜ cpython git:(master) ✗ ./python ./Tools/i18n/msgfmt.py -o

[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: There is an important difference between a program saying 'I am done executing' and a user saying 'I am done with the interactive session'. This is especially true in an IDE where 'session' can include many editing and shell sessions. 'Stop executing'

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +7900 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06ca3f0c09d017b9d741553818459cca2d5da587 by Serhiy Storchaka in branch 'master': bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) https://github.com/python/cpython/commit/06ca3f0c09d017b9d741553818459cca2d5da587

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +7899 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +7898 stage: -> patch review ___ Python tracker ___ ___

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 'roughly equivalent' Python code is real code that really runs, and in that sense not pseudocode. itertools is coded in C, which allows optional args with no default. To have optional args when coding in Python, either a default is needed or the

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for my mistake, yes, I meant Nuitka. -- ___ Python tracker ___ ___ Python-bugs-list

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Guido van Rossum
Guido van Rossum added the comment: (Serhiy: I think you meant Nuitka, not numba -- Nuitka is a Python-to-C++ compiler, and Kay is its author. Somehow he managed to confuse us all. :-) I suspect that the way `python3 -m test` runs the tests whose name you pass on the command line causes

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > we should let users through documentation know that this code is just > pseudo-code We already modified the docs to specifically say that the provided code is just a rough equivalent. Thanks for the suggestion, but I'm going to decline. There

[issue34149] Behavior of the min/max with key=None

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Repeating my comment on the Github PR, "I'm persuaded by your idea that min(), max(), nsmallest(), nlargest(), sorted(), and itertools.groupby() should ideally have the same API for key functions. Syncing of those APIs would be a minor improvement. As

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I missed that this issue is about the test from the CPython testsuite. I thought it is about the Numba specific tests. It is strange that this test is passed when run as ./python -m test test_opcodes but is failed when run as ./python -m

[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The official Tk documentation is not always correct. OPTIONS attributes in tests should contain full lists of supported options, and running tests produces warnings for missed options, like: ListboxTest.OPTIONS doesn't contain "justify". --

[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Creation Elemental
Creation Elemental added the comment: Ah, yes. That is what I meant to say. The doc string printed by help(widget) -- ___ Python tracker ___

[issue21600] mock.patch.stopall doesn't work with patch.dict

2018-07-20 Thread ppperry
Change by ppperry : -- title: mock.patch.stopall doesn't work with patch.dict to sys.modules -> mock.patch.stopall doesn't work with patch.dict ___ Python tracker ___

[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: By documentation, you mean the doc string for each widget, which is the basis for the help(widget) response. I checked that there do not seem to be any other issues open for the docstrings. Go ahead. Use https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm

[issue34149] Behavior of the min/max with key=None

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW, the nsmallest/largest key param was added Dec 2, 2004, before keyword-only parameters. https://github.com/python/cpython/commit/4901a1f267e9d632f85054ce8b21ff23bff305e1 -- ___ Python tracker

[issue34149] Behavior of the min/max with key=None

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: In 2.x, map(None, 'abc', 'zyz') == [('a', 'z'), ('b', 'y'), ('c', 'z')], but with the addition of zip, so that zip('abc', 'xyz') has the same result, we deprecated that use of None to mean identity function. For python-coded functions, a default is needed

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset f2626ce6d4136f13a506e34ca8631ff2eab85fd9 by Victor Stinner in branch 'master': bpo-34170: _PyCoreConfig_Read() leaves Py_IsolatedFlag unchanged (GH-8361) https://github.com/python/cpython/commit/f2626ce6d4136f13a506e34ca8631ff2eab85fd9

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: I changed the minimum time from 20 ms to 15 ms in test_time.test_process_time(), in Python 3.7 and master branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset a7a6eac966dd52db1762c8f455c1e208df36feb4 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33723: Fix test_time.test_process_time() (GH-8358) (GH-8362)

[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Yonatan Zunger
Yonatan Zunger added the comment: Or perhaps in an alternate phrasing: The sys.stdin.close behavior makes sense if quit is being used inside IDLE, but is very surprising from the perspective of the `code` module. (Really, even the SystemExit is surprising there, and should be documented!)

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +7897 stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset e78dace8dcb23c371df19c9add65895adf436995 by Victor Stinner in branch 'master': bpo-33723: Fix test_time.test_process_time() (GH-8358) https://github.com/python/cpython/commit/e78dace8dcb23c371df19c9add65895adf436995 --

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7896 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Yonatan Zunger
Yonatan Zunger added the comment: Testing your code sample on OS X (10.13.6) with Python 3.6.2: - quit() in the console yields Exc 0: closed is True Python 3.6.2 (default, Apr 17 2018, 12:29:33) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin Type "help", "copyright",

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na
Dong-hee Na added the comment: Raymond, when I first read this issue, it seemed very clear that it should not work. However, after reading the documentation I misunderstood that it can be worked because the pseudocode specifies NoneType. IMHO, in that case, we should let users through

[issue34132] Obscure netrc parser "bug"

2018-07-20 Thread bbayles
bbayles added the comment: I realized that the Python 2 solution was adapt-able after all; I've re-submitted as GitHub PR 8360. https://github.com/python/cpython/pull/8360 -- ___ Python tracker

[issue34132] Obscure netrc parser "bug"

2018-07-20 Thread bbayles
Change by bbayles : -- pull_requests: +7895 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34127] Gramatically incorrect error message for some calls with wrong number of arguments

2018-07-20 Thread ppperry
ppperry added the comment: Another test case: >> classmethod() Traceback (most recent call last): File "", line 2, in check TypeError: classmethod expected 1 arguments, got 0 -- title: Gramatically incorrect error message for some descriptor calls with wrong number of arguments

[issue33129] Add kwarg-only option to dataclass

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 from me -- think would occasionally be nice to have. -- nosy: +rhettinger ___ Python tracker ___

[issue34136] Del on class __annotations__ regressed, failing test

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, the test should be removed, commented out, skipped, or made to work, depending on intentions. Test first is for private branches. -- nosy: +terry.reedy ___ Python tracker

[issue34134] multiprocessing memory huge usage

2018-07-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34055] IDLE: erroneous 'smart' indents in shell

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Of late, I've also encountered two recurring problems along these lines. At some point in the IDLE session, the auto-indents become large and this survives a restart-shell. Another problem is that an extra \n is emitted after every result which gives

[issue34127] Gramatically incorrect error message for some descriptor calls with wrong number of arguments

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes. 0 things, (1/2 thing), 1 thing, (3/2 things), 2... things is the bugaboo of formatting sentences with a number field. Raymond, will we accept a patch for this? -- nosy: +rhettinger, terry.reedy stage: -> needs patch versions: +Python 3.8

[issue34176] Asyncio StreamReader fails to close Transport

2018-07-20 Thread Jim DeLaHunt
New submission from Jim DeLaHunt : Asyncio's StreamReaderProtocol[1] often returns True from Protocol.eof_received(). This tells the Transport that "closing the transport is up to the protocol" [2]. However, StreamReaderProtocol does not call Transport.close(). More precisely,

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since I got a very similar failure of test_time.test_process_time() on my laptop: the busy loop took 15.9 ms whereas the test expects at least 20 ms. I wrote PR 8358 to only require 15 ms instead. -- resolution: fixed -> status:

[issue33723] test_time.test_thread_time() failed on AMD64 Debian root 3.x

2018-07-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7894 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Guido van Rossum
Guido van Rossum added the comment: > Perhaps this report should go on the mypy bug tracker rather than the Python > language tracker. Agreed. It's up to the OP to file an issue there though (hence adding @campkeith back to the nosy list). -- nosy: +campkeith resolution: -> third

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: Ok, I fixed the fontforge bug in 3.7 and master branches. Sorry for the regression, but I really didn't expect that anyone would call Py_Main() after Py_Initialize() :-) I guess we should be prepared for such hiccup when reworking the Python initialization

[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > So I suspect this is a bug in the type checker. Perhaps this report should go on the mypy bug tracker rather than the Python language tracker. -- nosy: +gvanrossum, levkivskyi, rhettinger -campkeith ___

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Clint, why do you think you need this? Dong-hee, the pure python code is listed a rough equivalent, not an exact equivalent. -- ___ Python tracker

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 03ec4df67d6b4ce93a2da21db7c84dff8259953f by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) (GH-8352)

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset b1147e43daeb3c51a63056b489e8d868404d4e22 by Victor Stinner in branch 'master': bpo-34170: Rework _PyCoreConfig_Read() to avoid side effect (GH-8353) https://github.com/python/cpython/commit/b1147e43daeb3c51a63056b489e8d868404d4e22 --

[issue34115] code.InteractiveConsole.interact() closes stdin

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: To investigate your claim about closing sys.stdin, I ran the following on Windows 10, mostly with 3.7.0, in both the console and IDLE, using various exit methods. import code import sys for i in range(2): try:

[issue34163] Python latest release 2.7 shows SSL error

2018-07-20 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34175] typing.NamedTuple: type-checking error when "index" used as member

2018-07-20 Thread Keith Campbell
New submission from Keith Campbell : Find the test case below: from typing import NamedTuple class Foo(NamedTuple): alpha: int index: int This results in the following error when run through type-checking with mypy: % mypy --version mypy 0.620 % mypy go.py go.py:5:

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler
Chris Kessler added the comment: Thanks for the quick response! I didnt see it anywhere in the documentation on that page so I assumed it was built in with argparse. Thanks! -- ___ Python tracker

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the report. To make it work, you'll have to import textwrap first. We don't always add all the necessary imports in our code snippets and examples, and we don't need to start adding imports into code examples either. So I'm closing this issue.

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 49abd307d222e6fe85b5175eed6b6f87fc656a8d by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler
New submission from Chris Kessler : In document https://docs.python.org/2/library/argparse.html#argparse.RawDescriptionHelpFormatter this will fail with NameError: global name 'textwrap' is not defiend >>> parser = argparse.ArgumentParser( ... prog='PROG', ...

[issue34060] regrtest: log "CPU usage" on Windows

2018-07-20 Thread Ammar Askar
Ammar Askar added the comment: > But then again, if it's solely for our tests, perhaps the best way to > approach this is to start a Python thread that periodically runs this command? I opened up https://github.com/python/cpython/pull/8357 with this strategy, in my opinion its a lot nicer

[issue5115] Extend subprocess.kill to be able to kill process groups

2018-07-20 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +7893 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34060] regrtest: log "CPU usage" on Windows

2018-07-20 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +7892 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34173] [3.7] possible race condition in /usr/lib/python3.7/concurrent/futures/thread.py

2018-07-20 Thread Corey Bryant
New submission from Corey Bryant : I initially reported this on launchpad at https://bugs.launchpad.net/bugs/1782647. I'm running a test for a project that hangs and requires a Control-C to cancel it. The results look like this: https://paste.ubuntu.com/p/SwXsCcghjt/ In narrowing down on

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25150] 3.5: Include/pyatomic.h is incompatible with OpenMP (compilation of the third-party module fails on Python 3.5)

2018-07-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.7, Python 3.8 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Tim Peters
Tim Peters added the comment: If your `bucket` has 30 million items, then for element in bucket: executor.submit(kwargs['function']['name'], element, **kwargs) is going to create 30 million Future objects (and all the under-the-covers objects needed to manage their concurrency)

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +7891 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34118] Fix some class entries in 'Built-in Functions'

2018-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I will write a PR only touching the collection class entries. -- ___ Python tracker ___ ___

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na
Dong-hee Na added the comment: IMHO, this issue should be fixed since times=None can be passed, ref: https://docs.python.org/3/library/itertools.html#itertools.repeat This documentation also shows the equivalent python code, >From this code, times=None should work but does not work in current

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +7890 stage: -> patch review ___ Python tracker ___ ___

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-07-20 Thread tzickel
New submission from tzickel : In multiprocessing.Pool documentation it's written "When the pool object is garbage collected terminate() will be called immediately.": https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool.terminate A. This does not happen, creating

[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread R. David Murray
Change by R. David Murray : -- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open ___ Python tracker ___

[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread R. David Murray
R. David Murray added the comment: Nick, what Jakub is saying is that 'with' hasn't even gotten involved yet: we're still executing the NamedTemporaryFile constructor, so the object hasn't been returned for 'with' to operate on yet. In other words, NamedTemporaryFile.__init__ isn't safe

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +7889 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34171] Lib/trace.cover not removed by the clean target

2018-07-20 Thread Matthias Klose
New submission from Matthias Klose : Lib/trace.cover is not removed by the clean target, and apparently this file is always created in the source tree, not in the build tree. It should be created in the build tree, if that's not possible, it should be cleaned in any case. --

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34011] Default preference not given to venv DLL's

2018-07-20 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 94487d45707772723ef19e86700a40a12743baa1 by Vinay Sajip in branch 'master': bpo-34011: Update code copying DLLs and init.tcl into venvs. (GH-8253) https://github.com/python/cpython/commit/94487d45707772723ef19e86700a40a12743baa1 --

[issue32627] Header dependent _uuid build failure on Fedora 27

2018-07-20 Thread Frank Thommen
Change by Frank Thommen : -- nosy: +fthommen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Matthias Klose
Matthias Klose added the comment: a tuple comparison should be good enough -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-20 Thread Frank Thommen
Frank Thommen added the comment: The configure script doesn't work with a proper openssl installation either. Even though there is a "lib" directory in the directory given to --with-openssl=, libssl.so.1.1 isn't found, because there is still a "-L/lib" missing in some of the compiler

[issue26544] platform.libc_ver() returns incorrect version number

2018-07-20 Thread Matthias Klose
Matthias Klose added the comment: please don't close this yet. the patch introduces a dependency on the distutils package. I don't see any reason to compare the libc version as a python egg version, so please avoid that. if we need to have a module to compare arbitrary version strings,

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: PR 8353 is the last piece of my long work on Py_Main() to separate code *reading* configuration and code *applying* a new configuration. My work on the new _PyPathConfig structure, and the PR should finish that work. Extract of the commit message: "A new

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +7888 stage: -> patch review ___ Python tracker ___ ___

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +7887 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset fb47bca9ee2d07ce96df94b4e4abafd11826eb01 by Victor Stinner in branch 'master': bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) https://github.com/python/cpython/commit/fb47bca9ee2d07ce96df94b4e4abafd11826eb01 --

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-34008: "Do we support calling Py_Main() after Py_Initialize()?". -- ___ Python tracker ___

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-34170: "Py_Initialize(): computing path configuration must not have side effect (PEP 432)" as a follow-up of this issue. -- ___ Python tracker

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
Change by STINNER Victor : -- Removed message: https://bugs.python.org/msg322014 ___ Python tracker ___ ___ Python-bugs-list

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2018-07-20 Thread Antoni Szych
Antoni Szych added the comment: Hi, Any chance of getting this resolved 1 year later? :) BR -- ___ Python tracker ___ ___

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: Attached PR reworks _PyCoreConfig_Read() to leave _Py_path_config unchanged: *reading* the core configuration must not *modify* the path configuration. The PR adds _PyCoreConfig.dll_path field. The change is related to the PEP 432. --

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34170] Py_Initialize(): computing path configuration must not have side effect (PEP 432)

2018-07-20 Thread STINNER Victor
New submission from STINNER Victor : Attached -- components: Interpreter Core messages: 322014 nosy: vstinner priority: normal severity: normal status: open title: Py_Initialize(): computing path configuration must not have side effect (PEP 432) versions: Python 3.8

[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread Nick Coghlan
Nick Coghlan added the comment: It's still the same problem - the underlying issue is that the with statement machinery doesn't currently mask signals in the main thread while __enter__ and __exit__ are running, so __enter__ and __exit__ methods written in Python are also at risk of being

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Jussi. The type "crash" is used for hard crashes of the Python interpreter – possibly with a core dump or a Windows error box. -- nosy: +serhiy.storchaka type: crash -> behavior versions: +Python 3.6, Python 3.8

[issue34164] base64.b32decode() leads into UnboundLocalError and OverflowError on some data

2018-07-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +7886 stage: -> patch review ___ Python tracker ___ ___

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Aaqa Ishtyaq
Change by Aaqa Ishtyaq : -- pull_requests: +7885 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me for the idea of fixing Python 3.7 to correctly set sys.argv in this case (and leaving everything else unmodified). As far as further enhancement in Python 3.8 goes, perhaps that can be seen as part of PEP 432, such that embedding applications have

[issue34169] itertools.repeat does not accept None as an explicit count

2018-07-20 Thread Clint Hepner
New submission from Clint Hepner : I expected to be able to pass None as an explicit count to itertools.repeat to get the default behavior of an infinite iterator: >>> list(islice(repeat(1), 10)) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] >>> list(islice(repeat(1, None), 10)) Traceback

[issue34161] (good first issue) Tutorial 7.1 str.format() code example syntax error

2018-07-20 Thread Aaqa Ishtyaq
Change by Aaqa Ishtyaq : -- keywords: +patch pull_requests: +7884 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue34157] NamedTemporaryFile can leave temporary files behind

2018-07-20 Thread Jakub Wilk
Jakub Wilk added the comment: I think issue29988 is unrelated, or at least not the whole story. These are samples of tracebacks I see when the file is left behind: Traceback (most recent call last): File "test-tmpfile.py", line 4, in with tempfile.NamedTemporaryFile(dir='.'):

[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2018-07-20 Thread Noah Haasis
Noah Haasis added the comment: I'd like to work on this, if it's ok for everybody. -- nosy: +noah.haasis ___ Python tracker ___

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: I looked one more time at Python 3.6, code before my huge Py_Main()/Py_Initialize() refactoring, before _PyCoreConfig/_PyMainInterpreterConfig have been added. In short, calling Py_Main() after Py_Initialize() "works" in Python 3.6 but only sys.argv is set:

[issue34008] Do we support calling Py_Main() after Py_Initialize()?

2018-07-20 Thread STINNER Victor
STINNER Victor added the comment: > This hits fontforge. See https://bugzilla.redhat.com/show_bug.cgi?id=1595421 Copy of my comment 20: I looked one more time to the issue: * fontforge code is fine: it calls Py_Initialize() before using the Python C API to initialize its Python namespace

[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Dem
Dem added the comment: It seems that even without the as_completed call it has the same problem. ``` # -*- coding: utf-8 -*- import dns.resolver import concurrent.futures from pprint import pprint from json import json bucket = json.load(open('30_million_strings.json','r')) def

[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-20 Thread Dem
New submission from Dem : I have a list of 30 million strings, and I want to run a dns query to all of them. I do not understand how this operation can get memory intensive. I would assume that the threads would exit after the job is done, and there is also a timeout of 1 minute as well

[issue28166] WindowsConsoleIO misbehavior when Ctrl+C is ignored

2018-07-20 Thread Eryk Sun
Eryk Sun added the comment: > all the input before the ignored Ctrl+C is lost The console host process doesn't know that Python is ignoring Ctrl+C, so it cancels the read and flushes the input buffer. For now, we have to accept this as a limitation of relying on the high-level console API

  1   2   >