[issue33412] Tkinter hangs if using multiple threads and event handlers

2018-05-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue33424] 4.4. break and continue Statements, and else Clauses on Loops

2018-05-03 Thread Tim Peters
Tim Peters added the comment: Closing because this appears to be senseless. -- nosy: +tim.peters resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue33424] 4.4. break and continue Statements, and else Clauses on Loops

2018-05-03 Thread CH
New submission from CH : range function second parameter is excluded. Hence for x in range(2, n): will not execute when n = 2, and "2 is a prime number" will never appear. Moreover, might need a break in the else block too. -- messages: 316158 nosy: joesatriani

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Daehee Kim
Daehee Kim added the comment: Oh! Thank you for your kindness. :) -- ___ Python tracker ___

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Emanuel Barry
Emanuel Barry added the comment: You don't have access to this feature, so I've deleted the message for you :) -- nosy: +ebarry ___ Python tracker

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Emanuel Barry
Change by Emanuel Barry : -- Removed message: https://bugs.python.org/msg316153 ___ Python tracker ___

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Daehee Kim
Daehee Kim added the comment: Please, ignore first one, `msg316153` It has duplicated message so I rewrote `msg316154`. I could not find delete or edit messages menu. -- ___ Python tracker

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Daehee Kim
Daehee Kim added the comment: There's a proposal for a fix inconsistency of logger mechanism. See below. Example 1. --- import logging app_logger = logging.getLogger('app') app_logger.error('foo') logging.error('goo')

[issue33423] [logging] Improve consistency of logger mechanism.

2018-05-03 Thread Daehee Kim
New submission from Daehee Kim : There's a proposal for a fix inconsistency of logger mechanism. See below. Example 1. --- import logging app_logger = logging.getLogger('app') app_logger.error('foo') logging.error('goo')

[issue33412] Tkinter hangs if using multiple threads and event handlers

2018-05-03 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: Attached a fixed script. `Tk.after()` works from a worker thread, while `Tk.destroy()` doesn't. That's because Tkinter implements Tcl calls (_tkinter.c:Tkapp_Call) from another thread by posting an event to the interpreter's queue

[issue33412] Tkinter hangs if using multiple threads and event handlers

2018-05-03 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: > Another possibility is for stop() to change conditions so that > 'self.target.event_generate(c)' fails with an exception Could you elaborate? Since there're no docs on event_generate(), I can't look up how to make it "fail with an

[issue20104] expose posix_spawn(p)

2018-05-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: Since this is a new API, the most important thing is to have decided how we want it to look in 3.7, it is okay for it to be missing features so long as the API doesn't prevent them from being added in the future. ie: It is fine to ship it

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
Andrés Delfino added the comment: *While the list is still incomplete -- ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +6393 stage: -> patch review ___ Python tracker ___

[issue33422] Fix and update string/byte literals in help()

2018-05-03 Thread Andrés Delfino
New submission from Andrés Delfino : Right now, for string/byte literals help() shows, for example: No Python documentation found for 'r'. Use help() to get the interactive help utility. Use help(str) for help on the str class. PR fixes the quotation mark removal and

[issue32769] Add 'annotations' to the glossary

2018-05-03 Thread Guido van Rossum
Guido van Rossum added the comment: I'm okay with multiple PRs, but do beware that each PR requires a core dev to open a browser window etc., so try to group them a bit. But no need to wait for the perfect list! -- ___ Python

[issue33421] Missing documentation for typing.AsyncContextManager

2018-05-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6392 stage: -> patch review ___ Python tracker ___

[issue32769] Add 'annotations' to the glossary

2018-05-03 Thread Andrés Delfino
Andrés Delfino added the comment: Great, I'll look into them. It will take me some time to make a list of the new terms and write proper descriptions. Perhaps we could deliver the updates to the glossary by waves so people can make benefit of it? As in multiple PR being

[issue33421] Missing documentation for typing.AsyncContextManager

2018-05-03 Thread Travis DePrato
New submission from Travis DePrato : The documentation for the typing module makes no mention of AsyncContextManager, which is defined in Lib/typing.py as AsyncContextManager = _alias(contextlib.AbstractAsyncContextManager, T_co) as of >= Python 3.8; before 3.8, no such

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: Done: https://github.com/python/cpython/pull/6699 -- ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6391 stage: -> patch review ___ Python tracker ___

[issue32769] Add 'annotations' to the glossary

2018-05-03 Thread Guido van Rossum
Guido van Rossum added the comment: Perhaps you can start with the more important terms from PEP 484 (and perhaps also PEP 483, and then PEP 526 and PEP 544). E.g. start with terms from the ToC of those PEPs. -- ___ Python tracker

[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-03 Thread Guido van Rossum
Guido van Rossum added the comment: There's a proposal for a fix currently in PEP 572. I'm linking to the commit here because we're likely to remove it from PEP 572, but it may be proposed as a separate PEP:

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: You'll need to use blurb: https://pypi.org/project/blurb/ https://devguide.python.org/committing/#what-s-new-and-news-entries Well, technically it's possible to not use blurb and do it manually, but you'll want to use it. --

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: I figured it would have to be 3.8, but it looks like Doc/whatsnew/3.8.rst has not been created? Do I create that? -- ___ Python tracker

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : Added file: https://bugs.python.org/file47569/partialclass3.diff ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Eric V. Smith
Eric V. Smith added the comment: This has to be a 3.8 feature. It would be best if you could convert this to a github pull request, and use blurb to generate the news entry. But those aren't strictly necessary, someone else can do the mechanics of that. I'm willing to do

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: Added functools experts. Links to relevant stackoverflow questions: https://stackoverflow.com/questions/38911146/python-equivalent-of-functools-partial-for-a-class-constructor

[issue22848] Subparser help does not respect SUPPRESS argument

2018-05-03 Thread paul j3
paul j3 added the comment: I've reviewed the comments and proposed patch, and still think that the custom metavar is still the best fix. subparses.metavar can be changed after subparsers has been created. The programmer could, for example, write a simple helper function

[issue32625] Update the dis module documentation to reflect switch to wordcode

2018-05-03 Thread Dmitry Alimov
Dmitry Alimov added the comment: The documentation for EXTENDED_ARG opcode should also be updated for Python versions 3.6, 3.7, 3.8. -- nosy: +delimitry versions: +Python 3.6, Python 3.8 ___ Python tracker

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-05-03 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks! No rush, I just thought I'd take the opportunity when you added yourself to the nosy list. -- ___ Python tracker

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-05-03 Thread Brett Cannon
Brett Cannon added the comment: I just added myself to review the PR. At worst I will get to it during the sprints at PyCon US. On Thu, 3 May 2018 at 12:52 Thomas Kluyver wrote: > > Thomas Kluyver added the comment: > > Hi

[issue33375] warnings: get filename from frame.f_code.co_filename

2018-05-03 Thread Thomas Kluyver
Thomas Kluyver added the comment: Hi Brett! If you get a moment, any review of the linked PR would be welcome. :-) https://github.com/python/cpython/pull/6622 -- ___ Python tracker

[issue33412] Tkinter hangs if using multiple threads and event handlers

2018-05-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From 1994 to 2017, _tkinter.c has received a steady flow of multiple revisions >each year, for 333 total, by maybe 20 people including Guido. This makes it >one of the more actively maintained files and indicates the opposite of

[issue33420] __origin__ invariant broken

2018-05-03 Thread Adam Paszke
Adam Paszke added the comment: Of course, I'm not expecting this to be 100% reliable, and so I'm ok with the answer that the comment is now outdated. I'd like to avoid adding extra dependencies for so simple things, so I guess I'll just special case that in my code for

[issue33420] __origin__ invariant broken

2018-05-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, the comment needs to be updated, but as you said, no guaranties about undocumented dunder attribute. We tried to preserve as much of the API as possible in 3.7 after PEP 560, but something needs to be sacrificed (especially in the

[issue33315] Allow queue.Queue to be used in type annotations

2018-05-03 Thread Semyon Proshev
Semyon Proshev added the comment: I'm not sure that I'll be able to make a PR quickly, so feel free to do it -- ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Neil Girdhar added the comment: I edited some of the documentation as well to use the technical terms "partial function application", "partial method application", and "partial class application". This emphasizes the parallel structure and reduces confusion with

[issue33420] __origin__ invariant broken

2018-05-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-05-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : Added file: https://bugs.python.org/file47568/partialclass2.diff ___ Python tracker ___

[issue33420] __origin__ invariant broken

2018-05-03 Thread Adam Paszke
New submission from Adam Paszke : Hi everyone, I have a module that needs to inspect type annotations on a few functions. One of the types I need to special case on is typing.Tuple, and I used code like this to detect it: if getattr(annotation, '__origin__', None) ==

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
Change by Neil Girdhar : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___

[issue33419] Add functools.partialclass

2018-05-03 Thread Neil Girdhar
New submission from Neil Girdhar : functools.partial is almost good enough for specifying some of the parameters of an object's initializer, but the partial object doesn't respond properly to issubclass. Adding functools.partialclass is similar to the addition of

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- components: +Interpreter Core type: -> resource usage ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : This is a memory leak: >>> while True: ...def f(): pass ...f.__doc__ = f This also: >>> while True: ... f = [].append

[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-03 Thread Ivan Pozdeev
Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47566/0001-build-2.7-with-threaded-Tcl.patch ___ Python tracker ___

[issue33257] Race conditions in Tkinter with non-threaded Tcl

2018-05-03 Thread Ivan Pozdeev
Change by Ivan Pozdeev : Added file: https://bugs.python.org/file47565/0001-Build-non-threaded-debug-Tcl.zip ___ Python tracker ___

[issue20722] newline is (partially) independent of universal newlines; needs to be made more clear in docs

2018-05-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- stage: -> needs patch type: -> enhancement versions: +Python 3.8 -Python 3.4 ___ Python tracker ___

[issue32981] Catastrophic backtracking in poplib (CVE-2018-1060) and difflib (CVE-2018-1061)

2018-05-03 Thread STINNER Victor
STINNER Victor added the comment: FYI I tracked this vulnerability at: http://python-security.readthedocs.io/vuln/cve-2018-1060_difflib_and_poplib_catastrophic_backtracking.html -- nosy: +vstinner ___ Python tracker

[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2018-05-03 Thread Nick Coghlan
Nick Coghlan added the comment: "package.module:attribute" is also the syntax used in packaging tools to unambiguously separate the name of the module to be imported from the attribute chain to be looked up within that module:

[issue33332] Expose valid signal set (sigfillset()): add signal.valid_signals()

2018-05-03 Thread STINNER Victor
Change by STINNER Victor : -- title: Expose valid signal set (sigfillset()) -> Expose valid signal set (sigfillset()): add signal.valid_signals() ___ Python tracker

[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-03 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-03 Thread Andrés Delfino
Andrés Delfino added the comment: To be frank, I just searched the tree for uses of listdir() combined with isdir()/isfile()/issymlink(). Thought that using scandir() would make sense, and didn't think of a reason for not using it. That being said, I cannot state a case

[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-05-03 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32769] Add 'annotations' to the glossary

2018-05-03 Thread Andrés Delfino
Andrés Delfino added the comment: Guido, now that we are working on this, perhaps you can list what other terms related to type hints/annotations you were thinking for addition. -- ___ Python tracker

[issue8613] Decimal module flags undetermined when a signal is trapped.

2018-05-03 Thread Cheryl Sabella
Change by Cheryl Sabella : -- status: pending -> closed ___ Python tracker ___ ___

[issue4470] smtplib SMTP_SSL not working.

2018-05-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: This issue has been in pending status for over 18 months following Christian's question to the OP, so closing as out of date. -- nosy: +csabella resolution: -> out of date stage: patch review -> resolved status: pending -> closed

[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-05-03 Thread Charalampos Stratakis
Change by Charalampos Stratakis : -- nosy: +Dormouse759 ___ Python tracker ___ ___

[issue33315] Allow queue.Queue to be used in type annotations

2018-05-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Could you please product a draft PR showing how that would work? It might not be accepted right away but it would be useful to have. It is not 100% clear to whom this was addressed. Anyway, Semyon, if you don't have time, then I can

[issue33417] Isinstance() behavior is not consistent with the document

2018-05-03 Thread weapon
New submission from weapon : In the PEP 3119(https://www.python.org/dev/peps/pep-3119/),it introduce about Customizing instance and subclass checks. >The primary mechanism proposed here is to allow overloading the built-in >functions isinstance() and issubclass().

[issue33416] Add endline and endcolumn to every AST node

2018-05-03 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi : Some Python tools (in particular I am interested in type checkers) will benefit from knowing where a given expression ends to indicate/highlight location of an error in the source code. Other tools and IDEs may have also some other

[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2018-05-03 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: See https://bugs.python.org/issue33346 for yet another example where implicit function scope complicates life. -- ___ Python tracker

[issue33346] Syntax error with async generator inside dictionary comprehension

2018-05-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: My guess this is a consequence of the implicit function scope in comprehensions, see https://bugs.python.org/issue3692 I would say a proper solution would be to drop the implicit function scope in favour of other mechanisms, but this

[issue3692] improper scope in list comprehension, when used in class declaration

2018-05-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Mariatta, > While I understand why it behaves the way it is now, but it seems wrong > behavior. Perhaps we should look into finding a solution. I am all in favour of dropping implicit function scope in comprehensions (mostly because

[issue33415] When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range"

2018-05-03 Thread Ariel Otilibili Anieli
New submission from Ariel Otilibili Anieli : Hello, When add_mutually_exclusive_group is built without argument, the help breaks with "IndexError: list index out of range". Indeed this snippet: actions_ = parser.add_argument_group('Actions') actions =

[issue33038] GzipFile doesn't always ignore None as filename

2018-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The workaround in the current 2.7 is specifying an explicit filename argument: with tempfile.SpooledTemporaryFile() as fd: with gzip.GzipFile(filename='', mode='wb', fileobj=fd) as gz: gz.write(b'asdf') --

[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you show an example that exposes a significant overhead of the current implementation? There were reasons of using os.scandir() in os.walk() and glob.glob(). You may scan thousands of files and performs a heavy I/O only