[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-13 Thread Nick Coghlan
Nick Coghlan added the comment: The inspect functions throwing an exception when handed a method wrapping a non-function callable instead of returning False is a definite bug. The behaviour of MethodType when handed a non-function callable is cryptic, but not actually a

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2018-04-13 Thread iunknwn
iunknwn added the comment: The existing behavior seems strange (and isn't well documented). The code had a TODO comment from bquinlan to implement idle thread recycling, so that was why I made the change. That said, if threads are cheap, why not just create all the work

[issue33251] ConfigParser.items returns items present in vars

2018-04-13 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Change by Michael McCoy : -- pull_requests: +6160 ___ Python tracker ___ ___

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let to keep the discussion in a single place -- in issue12029. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Allow catching virtual subclasses in except clauses

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2018-04-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Creating a new PR would be cleaner IMHO. -- ___ Python tracker ___

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Michael McCoy added the comment: Sorry, my last message referred to Github PR6460 / pull_request6160. -- versions: +Python 3.4, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems reasonable. I would like like it to be part of the regular text rather rather than appearing as a big ..note entry which can be visually distracting from the core functionality. -- assignee: -> docs@python

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +csabella ___ Python tracker ___ ___

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2018-04-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That said, if threads are cheap, why not just create all the work threads on > initialization, and then remove all the logic entirely? That would sound reasonable to me. bquinlan has been absent for a long time, so I wouldn't expect an

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___

[issue33274] minidom removeAttributeNode returns None

2018-04-13 Thread Ari Krupnik
New submission from Ari Krupnik : W3C DOM Level 1[1] requires removeAttributeNode() to return the removed node: removeAttributeNode: Removes the specified attribute. Return Value: The Attr node that was removed. Minidom implementation returns None.

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +6158 ___ Python tracker ___ ___

[issue33274] minidom removeAttributeNode returns None

2018-04-13 Thread Ari Krupnik
Change by Ari Krupnik : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Isn't this a duplicate of issue12029? -- ___ Python tracker ___

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2018-04-13 Thread iunknwn
iunknwn added the comment: Alright - I'll put together another patch that removes the logic, and spins up all threads during initialization. Do you want me to create a completely new PR, or just update my existing one? -- ___

[issue27129] Wordcode, part 2

2018-04-13 Thread Kirill Balunov
Kirill Balunov added the comment: Hello, what is the future of this patch? Such a feeling that the transition to wordcode is still in some half-way state. -- nosy: +godaygo ___ Python tracker

[issue33176] Allow memoryview.cast(readonly=...)

2018-04-13 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +6161 ___ Python tracker ___ ___

[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2018-04-13 Thread Brett Cannon
New submission from Brett Cannon : If you look at https://docs.python.org/3/reference/import.html#import-related-module-attributes you will notice there are a lot of attributes on modules. But since the introduction of module specs

[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2018-04-13 Thread Brett Cannon
Change by Brett Cannon : -- priority: normal -> low ___ Python tracker ___ ___

[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2018-04-13 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: shutil.rmtree fails when the inner floder is opened in Explorer on Windows -> shutil.rmtree fails if inner folder is open in Windows Explorer ___ Python tracker

[issue33270] tags for anonymous code objects should be interned

2018-04-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- nosy: +rhettinger ___ Python tracker ___

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Michael McCoy
Michael McCoy added the comment: Amalgamating the patch history here, I've updated the tests on Github (PR6160) to include tests for both the recursive case and ensure the correct error is propagated up if an exception occurs during the subclass check. I've also

[issue12735] request full Unicode collation support in std python library

2018-04-13 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue10685] trace does not ignore --ignore-module

2018-04-13 Thread Tom Hines
Tom Hines added the comment: bump -- ___ Python tracker ___ ___ Python-bugs-list

[issue14573] json iterencode can not handle general iterators

2018-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Things are more complicated. bytes object is an iterable. I think serialize an bytes object (which can be unexpectedly leaked in a code ported from 2.7) as a list of integers is not expected behavior in most cases. It is safer

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +6159 ___ Python tracker ___ ___

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Change by Michael McCoy : -- title: Exception handling matches subclasses, not subtypes -> Exception handling should match subclasses, not subtypes ___ Python tracker

[issue14573] json iterencode can not handle general iterators

2018-04-13 Thread Alfred Morgan
Alfred Morgan added the comment: I would love to but it is a bit late for me now. The json encoding has been optimized in c which falls outside my expertise. https://github.com/python/cpython/blob/master/Modules/_json.c -- ___ Python

[issue33271] Exception handling matches subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Change by Michael McCoy : -- title: Exception handling matches subtypes, not subclasses -> Exception handling matches subclasses, not subtypes ___ Python tracker

[issue33270] tags for anonymous code objects should be interned

2018-04-13 Thread Brett Cannon
Change by Brett Cannon : -- stage: -> needs patch type: -> enhancement versions: +Python 3.8 ___ Python tracker ___

[issue33276] Clarify that __path__ can't be set to just anything

2018-04-13 Thread Brett Cannon
New submission from Brett Cannon : https://docs.python.org/3/reference/import.html#module-path says that "regardless of its value", __path__'s mere existence is key. But then later the docs say "__path__ must be an iterable of strings, but it may be empty". Technically the

[issue12029] Allow catching virtual subclasses in except clauses

2018-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Silencing exceptions like MemoryError, RecursionError or KeyboardInterrupt and returning a lying result doesn't look like a good idea to me. These exceptions can be raised in virtually any code for causes not related to executed

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
New submission from Ben FrantzDale : The sortedness of glob.glob's output is platform-dependent. While the docs do not mention sorting, and so are strictly correct, if you are on a platform where its output is sorted, it's easy to believe that the output is always sorted.

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Michael McCoy added the comment: Serhiy, it sure is. I'll note that the issue is open. Moreover, reading through the history, Guido says it's a bug (msg160418), and there was agreement that it should be fixed. It's unclear why it was dropped. Can you help me get

[issue32771] merge the underlying data stores of unicodedata and the str type

2018-04-13 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue33271] Exception handling should match subclasses, not subtypes

2018-04-13 Thread Michael McCoy
Michael McCoy added the comment: Adding Serhiy because this relates to issue31091, and specifically claims that there _was_ a bug in the old code (msg299585). -- nosy: +serhiy.storchaka ___ Python tracker

[issue33254] importlib.resources.contents() incorrectly yields an empty list

2018-04-13 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +6162 stage: test needed -> patch review ___ Python tracker ___

[issue33255] json.dumps has different behaviour if encoding='utf-8' or encoding='utf8'

2018-04-13 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: Treating 'utf-8' and its aliases differently (when they specifically mean the Python's, rather than something else's, encoding) is definitely as issue. You shouldn't hardcode a list of aliases though; rather use existing facilities to

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Eryk Sun
Eryk Sun added the comment: > The sortedness of glob.glob's output is platform-dependent. It's typically file-system dependent (e.g. NTFS, FAT, ISO9660, UDF) -- at least on Windows. NTFS and ISO9660 store directories in sorted order based on the filename (Unicode or ASCII

[issue13041] argparse: terminal width is not detected properly

2018-04-13 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue33275] glob.glob should explicitly note that results aren't sorted

2018-04-13 Thread Ben FrantzDale
Ben FrantzDale added the comment: Fascinating. That seems like an even wilder gotcha: It sounds like a script assuming sorted results would work in one directory (on one filesystem) but not on another. Or even weirder, if I had a mounted scratch partition, the script could

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Ned Deily
Ned Deily added the comment: Steve, what about 2.7 for 2.7.15rc1? (I'm working on that for the Mac installer now.) -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2018-04-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe I have seen this exact error message within the last few months, and I found one example on SO. https://stackoverflow.com/questions/21209124/weird-error-that-comes-up-during-python-program-run -- nosy: +terry.reedy

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread miss-islington
miss-islington added the comment: New changeset df958ff28af9c5c4563fd1b050f04f0e9745ab80 by Miss Islington (bot) in branch '3.7': bpo-33184: Update Windows installer to OpenSSL 1.1.0h (GH-6463)

[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2018-04-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: Nick and Raymond, I added both of you as nosy because, among other reasons, you commented on the latest version of PEP575. I agree that there is a bug in current CPython, in that the is* functions should return, not raise, but I am not sure

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

2018-04-13 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: My best idea for a test as of now is to run the example ~20 times in a loop (or continuously for a comparable amount of time & threads) and catch and register any exceptions in all threads as per

[issue13041] argparse: terminal width is not detected properly

2018-04-13 Thread Julian Mehnle
Julian Mehnle added the comment: What's holding up the merging of this patch? -- nosy: +jmehnle ___ Python tracker ___

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Steve Dower
Steve Dower added the comment: New changeset 1672c2fbae6128ee4717e08c4e65a0ab99a02a02 by Steve Dower in branch '3.6': bpo-33184: Update Windows installer to OpenSSL 1.0.2o (GH-6464) https://github.com/python/cpython/commit/1672c2fbae6128ee4717e08c4e65a0ab99a02a02

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +6163 ___ Python tracker ___

[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: The label has been changed. Senthil, go ahead and merge this. -- nosy: +terry.reedy ___ Python tracker

[issue33277] Deprecate __loader__, __package__, __file__, and __cached__ on modules

2018-04-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I agree. It should also be pointed out that we've had inconsistencies between the module attributes and the spec attributes, and even fixing those has lead to problems. There should be a single source of truth, and the module spec should

[issue33269] InteractiveConsole behaves differently on terminal, within script

2018-04-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: [For future reference, if I were not closing this, I would ask the following: Does 'on terminal mean that you started Python in interactive mode and then entered lines in response to the '>>> prompt'? If so, did you start Python from an

[issue33184] Update OpenSSL to 1.1.0h / 1.0.2o

2018-04-13 Thread Steve Dower
Steve Dower added the comment: New changeset b1dc07509f78b354e83f5f4a902f1ff80c7bb05d by Steve Dower in branch 'master': bpo-33184: Update Windows installer to OpenSSL 1.1.0h (GH-6463) https://github.com/python/cpython/commit/b1dc07509f78b354e83f5f4a902f1ff80c7bb05d

[issue33271] Exception handling matches subtypes, not subclasses

2018-04-13 Thread Michael McCoy
New submission from Michael McCoy : Exception handling matches subtypes, not subclasses # Example from abc import ABC class MyException(Exception, ABC): pass class OtherException(Exception): pass

[issue33271] Exception handling matches subtypes, not subclasses

2018-04-13 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6155 stage: -> patch review ___ Python tracker ___

[issue33272] Which are reasonable reason for recursion limit in function _vformat of class Formatter lib string?

2018-04-13 Thread Mikhail
New submission from Mikhail : The presence of the restriction of recursion prevent making nested conditions for the superformatter: https://github.com/ebrehault/superformatter for example: import string class SuperFormatter(string.Formatter): """World's

[issue33272] Which are reasonable reason for recursion limit in function _vformat of class Formatter lib string?

2018-04-13 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue33265] contextlib.ExitStack abuses __self__

2018-04-13 Thread Nick Coghlan
Nick Coghlan added the comment: Classifying this as a minor performance enhancement, since methods are much simpler objects than full Python level closures. Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: ->

[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2018-04-13 Thread Vidar Fauske
Vidar Fauske added the comment: A PR that fixes the issue according to the feedback from Eryk Sun is available. It does seem to have stranded a bit on the review side. That being said, would a bugfix for shutil.rmtree be appropriate? It is very annoying when junction

[issue33265] contextlib.ExitStack abuses __self__

2018-04-13 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 23ab5ee667a9b29014f6f7f01797c611f63ff743 by Nick Coghlan (jdemeyer) in branch 'master': bpo-33265: use an actual method instead of a method-like function in ExitStack (GH-6456)

[issue33273] Allow multiple imports from one module while preserving its namespace

2018-04-13 Thread Julian DeMille
New submission from Julian DeMille : An example of this would be to have something like `import .{ , , ... }` -- components: Interpreter Core messages: 315247 nosy: jdemilledt priority: normal severity: normal status: open title: Allow multiple imports

[issue33273] Allow multiple imports from one module while preserving its namespace

2018-04-13 Thread Zachary Ware
Zachary Ware added the comment: Do you mean like `from lib import mod1, mod2, mod3`? If that doesn't cover what you're looking for, try sending your idea (fleshed out a bit more :)) to the python-id...@python.org mailing list, where you can get feedback on your idea.

[issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class

2018-04-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: A similar issue for concurrent.futures is bpo-29595. -- versions: +Python 3.8 -Python 3.4 ___ Python tracker