[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7478 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-23 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +7479 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33939] Raise OverflowError in __length_hint__ for consistently infinite iterators

2018-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also a meta-issue issue29833. If use OverflowError as a sign of infinite iterator in __length_hint__, this should be documented as a legitimate use case for OverflowError. itertools.repeat.__length_hint__() and reversed.__length_hint__() currently

[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9b7cf757213cf4d7ae1d436d86ad53f5ba362d55 by Victor Stinner in branch 'master': bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) https://github.com/python/cpython/commit/9b7cf757213cf4d7ae1d436d86ad53f5ba362d55 --

[issue33919] Expose _PyCoreConfig structure to Python

2018-06-23 Thread STINNER Victor
STINNER Victor added the comment: > We could make the hash_seed 64 bits. On my 64-bit Linux, _Py_HashSecret_t takes 24 bytes (192 bits). -- ___ Python tracker ___

[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset efc6bf66a58e96c12116d65984ac69b0f36f85de by Miss Islington (bot) in branch '3.7': bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) https://github.com/python/cpython/commit/efc6bf66a58e96c12116d65984ac69b0f36f85de -- nosy:

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +7480 stage: -> patch review ___ Python tracker ___ ___

[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-23 Thread Nicolas Hainaux
Nicolas Hainaux added the comment: Sorry, I did not realize that using the word "unset" was completely misleading: I only meant "before any use of locale.setlocale() in python". So I'll rephrase this all, and add details about the python versions and platforms in this message. So, first, I

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, I proposed a path in https://github.com/python/cpython/pull/7865, I'm not sure if I can apply the label `skip news` or if only a reviewer can. -- ___ Python tracker

[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread STINNER Victor
STINNER Victor added the comment: It seems like Python 2.7 is inaffected by the bug: static int BZ2File_init(BZ2FileObject *self, PyObject *args, PyObject *kwargs) { ... #ifdef WITH_THREAD if (!self->lock) { self->lock = PyThread_allocate_lock(); } if (!self->lock) {

[issue33946] os.symlink on Windows should use the new non-admin flag

2018-06-23 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7483 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33569] dataclasses InitVar does not maintain any type info

2018-06-23 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-23 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +7482 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33942] IDLE: Problems using IDLE and 2.7, 3.6 macOS 64-/32-bit installer

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Now I see what Ned meant by making 64-bit-only instead of 64-/32-bit the default in 3.6.7. What we directly suggested is https://www.python.org/downloads/release/python-365/, pick 'macOS 64-bit installer', 'for OS X 10.9 and later'. You could also go to

[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2018-06-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar case: text.read(1); text.write(b'x'); text.tell() And there may be crashes after setting self->snapshot to NULL due to the failure of Py_BuildValue(). -- ___ Python tracker

[issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s

2018-06-23 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- pull_requests: +7481 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s

2018-06-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > I re-ran benchmarks since shutil code changed after #33695. Sorry, I meant #33671. -- ___ Python tracker ___

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
New submission from Eric V. Smith : >>> @dataclass ... class C: ... f: "C" ... >>> c = C(None) >>> c.f = c >>> c Traceback (most recent call last): File "", line 1, in File "", line 2, in __repr__ File "", line 2, in __repr__ File "", line 2, in __repr__ [Previous line repeated 328

[issue33942] IDLE: Improve Apple MacOS Tcl/Tk warning and web page

2018-06-23 Thread Jasper Trooster
Jasper Trooster added the comment: Hey, thanks for the quick response. I have to add that, when going to the download page to download site (https://www.python.org/downloads/) the big yellow button that says "Download Python 3.6.5" downloads the 64-/32-bit installer (at least, I think so as

[issue33695] Have shutil.copytree(), copy() and copystat() use cached scandir() stat()s

2018-06-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: PR at: https://github.com/python/cpython/pull/7874. I re-ran benchmarks since shutil code changed after #33695. Linux went from +13.5% to 8.8% and Windows went from +17% to 20.7%. In the PR I explicitly avoided using a context manager around os.scandir()

[issue33916] test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows

2018-06-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1094891b2e3eafef464819acd4cd04cfd2b59661 by Victor Stinner in branch '3.6': bpo-33916: Fix bz2 and lzma init when called twice (GH-7843) (GH-7872) https://github.com/python/cpython/commit/1094891b2e3eafef464819acd4cd04cfd2b59661 --

[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-23 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +7484 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset bbef7abe922edadc7a1679c19d6053240bf600d5 by Miss Islington (bot) in branch '3.7': bpo-33805: Improve error message of dataclasses.replace() (GH-7580) https://github.com/python/cpython/commit/bbef7abe922edadc7a1679c19d6053240bf600d5 --

[issue33805] dataclasses: replace() give poor error message if using InitVar

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 3d70f7aef614c396f516b5fccedeebe98598714d by Eric V. Smith (Dong-hee Na) in branch 'master': bpo-33805: Improve error message of dataclasses.replace() (GH-7580) https://github.com/python/cpython/commit/3d70f7aef614c396f516b5fccedeebe98598714d

[issue33946] os.symlink on Windows should use the new non-admin flag

2018-06-23 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add non-elevated symlink support for dev mode Windows 10 type: -> enhancement ___ Python tracker

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7488 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-23 Thread Ned Deily
Ned Deily added the comment: Thanks for the more detailed explanation. I think you are right that the behavior does not match the documentation but which is to be preferred does not necessarily have an easy answer. Also, this whole area has been undergoing revision, for example, with new

[issue33887] doc Add TOC in Design and History FAQ

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

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 070c91e46579429f7af7599af6d9e67a8dc5be50 by Miss Islington (bot) in branch '3.7': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/070c91e46579429f7af7599af6d9e67a8dc5be50 --

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Raymond, what do you think about "force" from a pedagogical > point of view? "force" is also good. Perhaps "clear_handlers" or "replace_handlers" would be more self-descriptive. -- ___ Python tracker

[issue32942] test_script_helper fails on Windows when run from the source code directory

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ditto with fresh update and build, except that I used installed 3.7.0rc1 (and it passed). This is not regularly failing on the (Windows) buildbots, so there is something 'different' about the repository on some non-buildbot user machines. I am pretty sure

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should have been done when the replacement was made. No news needed. -- stage: patch review -> commit review title: IDLE htest: don't try to test deleted tabbedpages.py -> IDLE htest: remove spec for deleted tabbedpages.py

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 7729d6d27d5d31b9764dec4a96a458015be3ecb8 by Miss Islington (bot) in branch '3.6': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/7729d6d27d5d31b9764dec4a96a458015be3ecb8 --

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Vinay Sajip
Vinay Sajip added the comment: > Perhaps "clear_handlers" or "replace_handlers" would be more self-descriptive. Except that it doesn't *just* clear the handlers - the act of clearing also lets e.g. the level to be set and the formatting to be set by the call. --

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 38cf49bf695903ac7a8516bca6bbb6b32d935bb5 by Mariatta (Andrés Delfino) in branch 'master': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/38cf49bf695903ac7a8516bca6bbb6b32d935bb5 -- nosy:

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This seems like a difficult problem to tackle in all cases, if two dataclasses reference each other the cycle could be complex to identify and introduce complexity. The way repr is defined is part of PEP 557 and actually force this behavior. Should the `repr`

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Maybe we should include a test that checks that if you provide an invalid file the file descriptors are not leaked (it can be in a different PR, maybe). -- ___ Python tracker

[issue33950] IDLE htest: don't try to test deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
New submission from Terry J. Reedy : About last September, idlelib.tabbedpages was replaced in configdialog by ttk.notebook and deleted. Delete the testing spec, which causes htest to fail when attempting to run all htests. -- messages: 320332 nosy: terry.reedy priority: normal

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7492 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7491 stage: commit review -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7486 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7487 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33949] tests: allow to select tests using loadTestsFromName

2018-06-23 Thread daniel hahler
New submission from daniel hahler : I was not aware of `python -m test -m …`, but think that supporting `python -m test test.module.class.name` should be supported for selecting a single test. -- components: Tests messages: 320325 nosy: blueyed priority: normal pull_requests: 7489

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The current status of json.tool also leaks a file descriptor if you use the same filename or an invalid one (needs debug build to receive this error message): $ ./python -m json.tool invalid_file.dat nofile.dat Expecting value: line 1 column 1 (char

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: We have a tool designed for this problem. See: https://docs.python.org/3/library/reprlib.html#reprlib.recursive_repr If you want to avoid a dependency, it is easy to inline the logic. For an example, see the Python 2.7 version of

[issue33927] Allow json.tool to have identical infile and outfile

2018-06-23 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: @Rémi can you include a NEWS entry? Also, indicate that your patch prevents a file descriptor to be leaked in the cases indicated in my last message. -- ___ Python tracker

[issue33933] Error message says dict has no len

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: This probably doesn't warrant another tracker entry. Serhiy already had a PR for this and attached it to the original bug report for https://bugs.python.org/issue32500 . See https://github.com/python/cpython/pull/7846 My suggestion would be to just

[issue33947] Dataclasses can raise RecursionError in __repr__

2018-06-23 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Raymond. I'm working on a patch. -- versions: +Python 3.8 ___ Python tracker ___ ___

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 5ae70f66ff1949eec35ff207c97cfe572c4e74c8 by Terry Jan Reedy in branch 'master': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/5ae70f66ff1949eec35ff207c97cfe572c4e74c8 --

[issue30618] readlink for pathlib paths

2018-06-23 Thread girts
girts added the comment: Just ran into the same thing. I would be interested in adding support for a "readlink" call if a pull request on this would be welcome. -- nosy: +girts ___ Python tracker

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Mikhail
New submission from Mikhail : Hello, Python Team, In reference.pdf I came across truncated lines in Python syntax that are not wrapped and carried forward to the next line, but instead run across the right margin. Examples "2.3 Identifiers and keywords" line contains "id_start ::= "

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Ned Deily
Ned Deily added the comment: Can you say from which URL you downloaded the PDF (assuming you didn't build it yourself)? -- nosy: +ned.deily ___ Python tracker ___

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 3e3157bd55f197ab36b280b26aea8dcd04e37fcf by Miss Islington (bot) in branch '2.7': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/3e3157bd55f197ab36b280b26aea8dcd04e37fcf -- nosy:

[issue33887] doc Add TOC in Design and History FAQ

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset a845b7ab3e8ba1c20ef4c3ee23ebf50df7e7c4c6 by Miss Islington (bot) in branch '3.6': bpo-33887: Add TOC to Design and History FAQ(GH-7766) https://github.com/python/cpython/commit/a845b7ab3e8ba1c20ef4c3ee23ebf50df7e7c4c6 --

[issue33939] Raise OverflowError in __length_hint__ for consistently infinite iterators

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps an object can set an attribute, __infinite_iterator__ = True. That would provide an unequivocal way to communicate to consumer code that the producer is known to generate a non-terminating stream. --

[issue33950] IDLE htest: don't try to test deleted tabbedpages.py

2018-06-23 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +7490 stage: commit review -> patch review ___ Python tracker ___ ___

[issue33451] Start pyc file lock the file

2018-06-23 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +7493 stage: -> patch review ___ Python tracker ___ ___

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 6b7ed31cf9d89a5ffcb3ab438dfd4760b781c488 by Miss Islington (bot) in branch '3.7': bpo-33950: Remove IDLE htest spec for a deleted file. (GH-7881) https://github.com/python/cpython/commit/6b7ed31cf9d89a5ffcb3ab438dfd4760b781c488 --

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Ned Deily
Change by Ned Deily : -- nosy: +mdk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33944] Deprecate and remove pth files

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Brett pointed out that may initial reaction above came across as quite blunt and demanding, so attempting to phrase that more clearly as a user experience consideration: It may be tempting to view this as purely a clean-up of the import system

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +7494 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33919] Expose _PyCoreConfig structure to Python

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: I'm thoroughly open to co-author requests for PEP 432 - the "Let's implement it as a private API for Python 3.7 and see what we learn from the experience" plan worked beautifully, but it *also* means the PEP text is now woefully out of date with reality :)

[issue33919] Expose _PyCoreConfig structure to Python

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Back on the original hash seed topic: 1. The exact size of the seed ranges from 128 bits (SIPHash) to 32-bits depending on exactly which hash algorithm you're talking about (https://www.python.org/dev/peps/pep-0456/#hash-secret) 2. While PEP 456 doesn't

[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about the generator-iterator case a bit more, "False" would be a bad default for that. Allowing "NotImplemented" to indicate the ambiguous "Might be finite, might be infinite" state, and using that as the default for generator-iterators, would

[issue33851] 3.7 regression: ast.get_docstring() for a node that lacks a docstring

2018-06-23 Thread Ned Deily
Ned Deily added the comment: @mgedmin, Just to be certain, are you able to verify that the change in PR 7701 fixes the problem you see with 3.7.0rc1? -- ___ Python tracker

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not sure what the best word would be (freshen, update, reconfigure, reset, and restart all communicate the intent). I can't think of a simple word that accurately describes the implementation which removes and closes all root handlers. --

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +7495 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: The bots occasionally miss. PR 7885 was indeed merged even though the message has not appeared. https://github.com/python/cpython/commit/2c11e23a5a686edc69bcbb4c65f500d50d992bb3 PR 7886 was merged as the message says, even though the status was not changed.

[issue33451] Start pyc file lock the file

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset ea737751b10fff752aafed0231e8a02b82ba365d by Nick Coghlan (Zackery Spytz) in branch 'master': bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884) https://github.com/python/cpython/commit/ea737751b10fff752aafed0231e8a02b82ba365d

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7497 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +7496 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: (I've updated the issue title to state the design requirement, rather than one potential solution to the design requirement) I like the declarative `__infinite_iterator__` suggestion, as that's: 1. really easy to implement when defining a custom iterator type

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think a new public API should be introduced. This is at best an implementation detail. Also, I really don't want to garbage-up the inner-loop code for the itertools. I've spent a good deal of time micro-optimizing this code and don't want to

[issue33948] doc truncated lines in PDF

2018-06-23 Thread Mikhail
Mikhail added the comment: This file was taken from https://docs.python.org/3.7/archives/python-3.7.0rc1-docs-pdf-a4.zip Hashes CRC32: 327CF408 MD5: 7EBEB565C1EA7E52F366B5C734500FAC SHA-1: 09727C07C45965E4E43664B727E7CAECC4F3CD89 SHA-256:

[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 0ba9a0b7d19da8b4bd3c13b358d3fd2a5ad16f09 by Senthil Kumaran (Andrés Delfino) in branch 'master': [master] bpo-33885: Replace "hook function" with "callable" (GH-7765) (#7886)

[issue33451] Start pyc file lock the file

2018-06-23 Thread miss-islington
miss-islington added the comment: New changeset 56aaef0ddba6275b8043b58433739a64497f33b4 by Miss Islington (bot) in branch '3.7': bpo-33451: Close pyc files before calling PyEval_EvalCode() (GH-7884) https://github.com/python/cpython/commit/56aaef0ddba6275b8043b58433739a64497f33b4

[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: This statement is no longer correct: "when python starts, it runs using the C locale, on any platform (Windows, Linux, BSD), any python version (2, 3...), until locale.setlocale() is used to set another locale." The Python 3 text model doesn't work properly

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: As a potential stepping stone towards possible future changes in the default behaviour here, what if itertools were to offer an opt-in "check_signals(itr, *, iterations=100_000)" helper function that was essentially a more efficient version of:: def

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What if itertools were to offer an opt-in ... This doesn't make sense to me. As far as I can tell, the only time this issue has ever arisen in the past 15 or 16 years is when someone was trying to create an unbreakable infinite loop on-purpose. In a

[issue31815] Make itertools iterators interruptible

2018-06-23 Thread Nick Coghlan
Nick Coghlan added the comment: The purpose would be two-fold: 1. The presence of the `check_signals()` wrapper provides a way to more explicitly document that the other itertools iterators *don't* implicitly check for signals, so if you want to combine them with consumers that also don't

[issue33897] Add a restart option to logging.basicConfig()

2018-06-23 Thread Vinay Sajip
Vinay Sajip added the comment: OK, let's go with "force", then. There are plenty of other places in Python where it's used, so there's that: https://github.com/python/cpython/search?l=Python=force -- ___ Python tracker