[issue39943] Meta: Clean up various issues in C internals

2020-04-16 Thread Andy Lester
Andy Lester added the comment: I'm assuming that you're getting this sre_lib.h error when compiling Modules/_sre.c. -- ___ Python tracker ___

[issue40281] Add pathlib.PurePath.as_uri()

2020-04-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: Ok, the issue is now fixed: thanks Jeffrey Quesnelle! > Nope, this was introduced in 3.8 I tested: attached main.c doesn't crash in 3.7. I guess that _asyncio leaks a few references, but it's not a big deal. -- resolution: -> fixed stage: patch

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread Jeffrey Quesnelle
Jeffrey Quesnelle added the comment: > Is Python 3.7 affected as well? Nope, this was introduced in 3.8 -- ___ Python tracker ___

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: Is Python 3.7 affected as well? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread miss-islington
miss-islington added the comment: New changeset 6b0ca0aeab04d7b7b54086248ca9d5e70f770f2f by Miss Islington (bot) in branch '3.8': bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) https://github.com/python/cpython/commit/6b0ca0aeab04d7b7b54086248ca9d5e70f770f2f

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: > Would the simple fix (clearing the flag in `module_free`) be a candidate for > a backport to 3.8? Sure. -- ___ Python tracker ___

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18907 pull_request: https://github.com/python/cpython/pull/19565 ___ Python tracker

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset a75e730075cd25be1143e6183006f3b1d61bb80f by Jeffrey Quesnelle in branch 'master': bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) https://github.com/python/cpython/commit/a75e730075cd25be1143e6183006f3b1d61bb80f

[issue40288] atexit module should not be loaded more than once per interpreter

2020-04-16 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +18906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19562 ___ Python tracker ___

[issue40236] datetime.datetime.strptime get day error

2020-04-16 Thread Paul Ganssle
Change by Paul Ganssle : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: This issue has been discussed during the Language Summit. A quick poll showed that the majority is in favor of changing the default in Python 3.9. Lukasz proposed a PEP update to propose to switch the default in Python 3.9:

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0

2020-04-16 Thread Brett Cannon
Brett Cannon added the comment: I personally like 3.10 as the target as that means users had at least 3 years to move to move over. Plus we can put a warning in the What's New for 3.9 about our plans for 3.10. -- nosy: +brett.cannon ___ Python

[issue40223] Add -fwrapv for new icc versions

2020-04-16 Thread Furkan Onder
Change by Furkan Onder : -- keywords: +patch nosy: +furkanonder nosy_count: 1.0 -> 2.0 pull_requests: +18905 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19561 ___ Python tracker

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38580] select()'s documentation claims only sequences are accepted, but it allows all iterables

2020-04-16 Thread Tal Einat
Tal Einat added the comment: It seems that select() does indeed support arbitrary iterables through the use of PySequence_Fast(). The commit where this was introduced, by Brett Cannon from 2003 (62dba4c2775adfb5a5a97ca012a3ab00c4e28597), doesn't seems to have intended this though:

[issue40307] multiprocessing.BaseManager does not retain Client type.

2020-04-16 Thread Alessandro Molina
Alessandro Molina added the comment: The issue seems fairly easy to fix, it's just a matter in consistency in usage of self._Client attribute in the manager. I'm working on a PR that I'm willing to propose for review once I have finished it and wrote tests. --

[issue40308] Intermittent failure of test_os.TestScandir.test_attributes on Windows

2020-04-16 Thread Dennis Sweeney
New submission from Dennis Sweeney : I get the following intermittent failure when running the tests on Master on Windows 10. = = = PS C:\...\cpython> .\python.bat -m unittest -v

[issue40307] multiprocessing.BaseManager does not retain Client type.

2020-04-16 Thread Alessandro Molina
New submission from Alessandro Molina : When a new `multiprocessing.managers.BaseManager` instance is made, the client used to connect is not stable across the life of the object. A very quick example to show that is ``` from unittest.mock import Mock from multiprocessing.managers import

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: > immutability vs immutable object headers Sorry, I meant to write "immortal vs immutable". -- ___ Python tracker ___

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: A few thoughts First, the PR is well done. The changes are pretty minimal and are well localized. Thanks Eddie for writing clean code and responding to review requests. My feeling is that, in current state, this still should not get merged or at least

[issue15904] file,close() can fail assert on Windows in 2.7

2020-04-16 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue40303] argparse parse_args args parameter bug or intended

2020-04-16 Thread paul j3
paul j3 added the comment: 'type=bool' doesn't get any special treatment. 'bool' is a builtin Python function. test with def mybool(astr): print("mybool:", astr, len(astr), bool(astr)) return bool(astr) The trick to getting a False value is to pass a genuinely empty

[issue40303] argparse parse_args args parameter bug or intended

2020-04-16 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Gharg, this is expected, both because your program would not actually receive `--boolean=''` but `--boolean=`: ➜ ~ cat test.py import sys print(sys.argv) ➜ ~ python test.py --boolean='' ['test.py', '--boolean='] and the way the type argument works. You

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Eddie Elizondo
Eddie Elizondo added the comment: > which would potentially save the two word per object overhead Btw, I misread. I thought `gc_bits` referred to the bits used by the GC in the reference count. In any case, you can still use a bit in the reference count :) --

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Eddie Elizondo
Eddie Elizondo added the comment: > I'm somewhat puzzled how a version that does no more work and has no jumps is > slower. Oh I think I know why there's some confusion. I've updated the PR from the initial version (which is probably the one that you saw). The branching does less work in

[issue40303] argparse parse_args args parameter bug or intended

2020-04-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Mark Shannon
Mark Shannon added the comment: Do you have more details on your comparison? I'm somewhat puzzled how a version that does no more work and has no jumps is slower. The memory hit is not immediate, but making the object header immutable prevents changes like

[issue40306] Enhancement request for SSLContext - flag to handle trailing dot in hostname

2020-04-16 Thread Christian Heimes
Christian Heimes added the comment: I prefer not to interfere with hostname matching. Could you please open a feature request with OpenSSL and request a verification flag to ignore trailing dot? I'm happy to expose the feature if OpenSSL implements it. --

[issue40306] Enhancement request for SSLContext - flag to handle trailing dot in hostname

2020-04-16 Thread bli2020
bli2020 added the comment: sure, that sounds reasonable. I will open up a feature request with OpenSSL -- ___ Python tracker ___

[issue40306] Enhancement request for SSLContext - flag to handle trailing dot in hostname

2020-04-16 Thread bli2020
New submission from bli2020 : Issue31997 I know this issue was previously closed https://bugs.python.org/issue31997 because "it works as expected and should be handled in the application layer". But, could the team add a flag in SSLContext which will handle the trailing dot hostname

[issue40305] Fix server_close() method for ThreadingHTTPServer and TCPServer class

2020-04-16 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +18903 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19556 ___ Python tracker

[issue40305] Fix server_close() method for ThreadingHTTPServer and TCPServer class

2020-04-16 Thread ROUX antoine
New submission from ROUX antoine : Maybe : Main problem is currently ThreadingHTTPServer which extends socketserver.ThreadingMixIn and HTTPServer don't overload his server_close() method. This method server_close is defined into both parent class and should be both call in implementation

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread A.M. Kuchling
A.M. Kuchling added the comment: New changeset cd09d7e55d160edc454763d3fb6a48180988741a by Miss Islington (bot) in branch '3.7': bpo-39793: use the same domain on make_msgid tests (GH-18698) (GH-19555) https://github.com/python/cpython/commit/cd09d7e55d160edc454763d3fb6a48180988741a

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread A.M. Kuchling
A.M. Kuchling added the comment: New changeset ccf30e96d4bdcf04396e00899a0319041144509f by Miss Islington (bot) in branch '3.8': bpo-39793: use the same domain on make_msgid tests (GH-18698) (GH-19554) https://github.com/python/cpython/commit/ccf30e96d4bdcf04396e00899a0319041144509f

[issue15904] file,close() can fail assert on Windows in 2.7

2020-04-16 Thread Zackery Spytz
Zackery Spytz added the comment: Python 2 is EOL. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40299] os.dup seems broken with execvp (LINUX)

2020-04-16 Thread krsna
krsna added the comment: Closing has behavior is documented "The file descriptor created by "os.dup" is not inherited by child processes by default since Python 3.4. https://docs.python.org/3/library/os.html#os.dup; -- resolution: -> not a bug stage: -> resolved status: open ->

[issue40299] os.dup seems broken with execvp (LINUX)

2020-04-16 Thread krsna
krsna added the comment: I should read the updated documentation changes to modules more often. Adding the inheritable works and yes I tested with `os.dup2` which seemed consistent with C's dups2. I still think it is quite odd that the low level `dup` function has a different behavior than

[issue40304] Classes created using type() don't need to explicitly inherit from object

2020-04-16 Thread Борис Верховский
New submission from Борис Верховский : As far as I can tell, passing `(object,)` and `()` as the `bases` parameter to the 3-argument version of type() produces the same result, because classes inherit from `object` in Python 3: >>> type('X', (object,), dict(a=1)).__bases__ (,) >>> type('X',

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread A.M. Kuchling
A.M. Kuchling added the comment: New changeset 5565c30f0b25996a0e73477fc0e1e1aced52b926 by Batuhan Taşkaya in branch 'master': bpo-39793: use the same domain on make_msgid tests (#18698) https://github.com/python/cpython/commit/5565c30f0b25996a0e73477fc0e1e1aced52b926 -- nosy:

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +18900 pull_request: https://github.com/python/cpython/pull/19554 ___ Python tracker

[issue39793] make_msgid fail on FreeBSD 12.1-RELEASE-p1 with different domains

2020-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +18901 pull_request: https://github.com/python/cpython/pull/19555 ___ Python tracker ___

[issue40290] Add zscore to statistics.NormalDist

2020-04-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40290] Add zscore to statistics.NormalDist

2020-04-16 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 70f027dd22d6522b777d10c250f951e5e416b93a by Raymond Hettinger in branch 'master': bpo-40290: Add zscore() to statistics.NormalDist. (GH-19547) https://github.com/python/cpython/commit/70f027dd22d6522b777d10c250f951e5e416b93a --

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: We have another function which may be grouped somehow in the same category: _Py_bit_length(). -- ___ Python tracker ___

[issue40296] help(list[int]) fails

2020-04-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I think help() or pydoc needs to special-case this. (Didn't your other PR attempt to fix this?) Note that issubclass(list[int].__class__, type) returns True -- the __class__ attribute in this case is taken from __origin__, while type() returns the

[issue40303] argparse parse_args args parameter bug or intended

2020-04-16 Thread Gharg
New submission from Gharg : I have a problem regarding args parameter of ArgumentParser.parse_args. For example: - import argparse parser = argparse.ArgumentParser() parser.add_argument("--boolean", type=bool) parsed_args =

[issue40271] Allow shell like paths in

2020-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If add such option to zipfile.is_zipfile(), why not add it to other functions? There are many tens or hundreds of functions and methods in the stdlib which accept a file path. Adding such option to all of them is not practical. And zipfile.is_zipfile()

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2020-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the behavior is obviously wrong (like in issue25054), we can fix it without warnings, and even backport the fix to older versions, because we do not expect that anybody depends on such weird behavior. If we are going to change the behavior, but expect

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-16 Thread Zachary Ware
Change by Zachary Ware : -- nosy: +alanmcintyre, serhiy.storchaka, twouters ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Eddie Elizondo
Eddie Elizondo added the comment: Mark: > You are asking the whole world to take a hit on both performance and memory > use. That's an explicit non-goal. That's why the code was guarded to add as an optional compilation mode This should be added by default if and only if this is a neutral

[issue40243] Unicode 3.2 numeric uses decimal_changed instead of numeric_changed

2020-04-16 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2020-04-16 Thread Mark Borgerding
Mark Borgerding added the comment: @serhiy.storchaka Thanks for the link to issue25054 to clarify this change was not done solely for aesthetics. Hopefully that will mollify others like me who find their way to this discussion as they try to figure out why their code broke with a new

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Isn't pyport.h a public header? IMHO you should put in a private header and make it an inline function there. Here is for example what we do in Arrow: https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/bit_util.h#L48 -- nosy: +pitrou

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2020-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The former implementation was wrong. See issue25054 which contains more obvious examples of that bug: >>> re.sub(r"\b|:+", "-", "a::bc") '-a-:-bc-' Not all colons were replaced despite the fact that the pattern matches all colons. --

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is a new feature and cannot be added to older versions which are in feature-freeze. Adding the feature to (say) Python 2.7.18 would be inconsistent, because it wouldn't exist in 2.7.0 through .17. Likewise for all the other versions before 3.9.

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
New submission from STINNER Victor : There are multiple files which have to swap bytes. I propose to add functions for that: * _Py_bswap16(): uint16_t * _Py_bswap32(): uint32_t * _Py_bswap64(): uint64_t -- components: Interpreter Core messages: 366600 nosy: vstinner priority: normal

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18899 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19552 ___ Python tracker ___

[issue40271] Allow shell like paths in

2020-04-16 Thread Massimo Sala
Massimo Sala added the comment: Gavin, zipfile works on all the operating systems where python runs. Your request is OS dependent... BSD? linux? The tilde isn't into the ZIP file specifications. I have to agree with Serhiy: the correct solution is os.path.expanduser("~/stuff") --

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-16 Thread Massimo Sala
Change by Massimo Sala : -- title: zipfile module: new feature (two lines of code) -> zipfile module: new feature (two lines of code), useful for test, security and forensics ___ Python tracker

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread Jeffrey Quesnelle
Jeffrey Quesnelle added the comment: Would the simple fix (clearing the flag in `module_free`) be a candidate for a backport to 3.8? This seems to be a regression from the previous stable version that also limits the usability of subinterpreters -- `asyncio` is loaded by a wide variety of

[issue40301] zipfile module: new feature (two lines of code)

2020-04-16 Thread Massimo Sala
New submission from Massimo Sala : module zipfile Tag "Components": I am not sure "Library (Lib)" is the correct one. If it isn't, please fix. I use python to check zip files against malware. In these files the are binary blobs outside the ZIP archive. The malware payload isn't inside the

[issue39953] Let's update ssl error codes

2020-04-16 Thread Michael Felt
Michael Felt added the comment: Checked with latest version - and working as expected. Sorry for the noise. On 15/04/2020 17:53, SilentGhost wrote: > SilentGhost added the comment: > > Michael, could you try with the latest fix in 584a3cfda4? > > -- > nosy: +SilentGhost > >

[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2020-04-16 Thread Mark Borgerding
Mark Borgerding added the comment: So third-party code was knowingly broken to satisfy an aesthetic notion that substitution should be more like iteration. Would not a FutureWarning have been a kinder way to stage this implementation? A foolish consistency, indeed. -- nosy: +Mark

[issue35967] Better platform.processor support

2020-04-16 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35967] Better platform.processor support

2020-04-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 518835f3354d6672e61c9f52348c1e4a2533ea00 by Jason R. Coombs in branch 'master': bpo-35967 resolve platform.processor late (GH-12239) https://github.com/python/cpython/commit/518835f3354d6672e61c9f52348c1e4a2533ea00 --

[issue40255] Fixing Copy on Writes from reference counting

2020-04-16 Thread Mark Shannon
Mark Shannon added the comment: A big -1 to this. You are asking the whole world to take a hit on both performance and memory use, in order to save Instagram memory. The PR uses the term "immortal" everywhere. There is only one reference to copy-on-write in a comment. Yet this issue about

[issue40300] logging.Formatter crashes when default_msec_format is None.

2020-04-16 Thread Mariusz Felisiak
Change by Mariusz Felisiak : -- keywords: +patch pull_requests: +18897 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19551 ___ Python tracker

[issue30483] urllib.parse.parse_qsl does not handle unicode data properly

2020-04-16 Thread Dmitry Tsirkov
Dmitry Tsirkov added the comment: I have recently stumbled upon this bug, and I can present the example and a solution I've used. The issue happens when we try to parse x-www-form-urlencoded of type bytes: ``` >>> from urllib.parse import urlencode, parse_qs >>> urlencode([('v', 'ö')])

[issue40300] logging.Formatter crashes when default_msec_format is None.

2020-04-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40209] read_pyfile function refactor in Lib/test/test_unparse.py

2020-04-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40299] os.dup seems broken with execvp (LINUX)

2020-04-16 Thread Martin Panter
Martin Panter added the comment: The file descriptor created by "os.dup" is not inherited by child processes by default since Python 3.4. https://docs.python.org/3/library/os.html#os.dup Does it work if you use "os.set_inheritable" or "os.dup2" (which apparently sets it inhertiable by

[issue40209] read_pyfile function refactor in Lib/test/test_unparse.py

2020-04-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6a5bf15c71a1c101c28774ae714b58e8a65b130c by Hakan Çelik in branch 'master': bpo-40209: Use tokenize.open in test_unparse (GH-19399) https://github.com/python/cpython/commit/6a5bf15c71a1c101c28774ae714b58e8a65b130c -- nosy:

[issue40300] logging.Formatter crashes when default_msec_format is None.

2020-04-16 Thread Mariusz Felisiak
New submission from Mariusz Felisiak : We would like to subclass logging.Formatter with a custom "default_time_format" and an empty "default_msec_format". Unfortunately logging.Formatter crashes when default_msec_format is None, see [1]. I'm happy to provide a patch. [1]

[issue40133] Provide additional matchers for unittest.mock

2020-04-16 Thread Chris Withers
Chris Withers added the comment: Agreed, this would be better placed in a third party library. There's examples out there already, for example, I maintain a library [0] that has tools for asserting about complex data structures, including flexible type matching [1] and regex string matching

[issue40299] os.dup seems broken with execvp (LINUX)

2020-04-16 Thread krsna
New submission from krsna : ---CODE--- import os path = "file.txt" fd = os.open(path, os.O_WRONLY) os.close(1) #STDOUT os.dup(fd) pid = os.fork() if pid == 0: args = "ls -l".split() os.execvp(args[0], args) else: os.waitpid(pid, 0) print('Done from Parent') --- END CODE

[issue40133] Provide additional matchers for unittest.mock

2020-04-16 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the idea. But given the size of the patch and benefit it provides for the code I feel it could be a better idea to have it in PyPI and then add it to stdlib later once it gathers more feedback and adoption. Adding others for more

[issue40298] Type annotation objects (Tuple, List, etc.) register as callable()

2020-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not a bug. Tuple is a callable, but calling it raises a TypeError with the informative error message. It does not differ from e.g. >>> def foo(): ... raise TypeError("don't call foo()") ... >>> callable(foo) True >>> foo() Traceback (most

[issue40260] modulefinder traceback regression starting on Windows

2020-04-16 Thread Barry Alan Scott
Barry Alan Scott added the comment: I have the fix coded and tested. I run out of git knowledge to update the PR branch so that I can push the fix. I'll work on it more later in the day. -- ___ Python tracker

[issue40260] modulefinder traceback regression starting on Windows

2020-04-16 Thread Barry Alan Scott
Change by Barry Alan Scott : -- pull_requests: +18895 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/19549 ___ Python tracker ___

[issue40093] ThreadPoolExecutor with wait=True shuts down too early

2020-04-16 Thread fireattack
fireattack added the comment: >Yes, you are right. This is a feature of the ThreadPoolExecutor. So is there any way to make the Executor actually wait and accept new job(s) after a while? I tried as_completed(), wait(), none seem to work. -- ___

[issue40296] help(list[int]) fails

2020-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is that isinstance(list[int], type) returns True, but list[int] is not actually an instance of type. >>> isinstance(list[int], type) True >>> issubclass(type(list[int]), type) False >>> type.__subclasses__(list[int]) Traceback (most recent call

[issue40298] Type annotation objects (Tuple, List, etc.) register as callable()

2020-04-16 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40298] Type annotation objects (Tuple, List, etc.) register as callable()

2020-04-16 Thread Noah May
New submission from Noah May : Whether this is considered a bug or not is subjective. The question is should callable(Tuple) return True or False? Or should it for any other annotation object? The reason it returns true in the first place is because of a warning to explicitly NOT call them