[issue38436] Improved performance for list addition.

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How often do you need to add three or more lists in comparison with other uses of the "+" operator? How larger is the benefit of this optimization? How much it slows down other uses of the "+" operator? Would be nice if you provide some numbers. More eff

[issue38441] failing to build the Documentation

2019-10-11 Thread Aurora
New submission from Aurora : I'm failing to build the cpython/Doc dir. The full build log is as follows: mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b epub -d build/doctrees -D latex_elements.papersize= -W . build/epub Running Sphinx v2.2.0 m

[issue38440] Possible new issues with IDLE

2019-10-11 Thread Ned Deily
Ned Deily added the comment: (Just FYI: the version of Tcl/Tk, 8.6.8, we are shipping with the python.org installers for macOS is unchanged since 3.7.2 a year ago, 2.7.16 (in March), and has not changed during the 3.8.0 pre-release cycle. We did try to update to 8.6.9 for 3.7.2rc1 but there

[issue38441] failing to build the Documentation

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. That problem was fixed on the master branch by 141da44bb45bc182886303fce92cbbae5631cb4c on 2019-06-03. Suggest you build from a more recent source release or updated git repo. -- nosy: +ned.deily resolution: -> out of date stage:

[issue38442] Doc/whatsnew/3.8.rst has an execution bit

2019-10-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It likely happened when it was edited on Windows. -- assignee: docs@python components: Documentation messages: 354428 nosy: docs@python, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Doc/whatsnew/3.8.rst has a

[issue38442] Doc/whatsnew/3.8.rst has an execution bit

2019-10-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16293 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16715 ___ Python tracker ___

[issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically

2019-10-11 Thread Ned Deily
New submission from Ned Deily : ./configure's --with-universal-archs= supports a number of different CPU architecture combinations. However most of them are no longer supported on current macOS systems. If you choose an option with archs not available in the build tool chain in use, the con

[issue38443] unavailable --with-universal-archs= macOS confgure options fail cryptically

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Also note that, on current macOS systems, specifying just --enable-universalsdk to ./configure results in an implicit --with-universal-archs of intel (which implies both x86_64 and i386). checking for --enable-universalsdk... / checking for --with-universal-archs

[issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Going and back and looking closer at the original failure, I see now that the root cause of the configure failures *is* using --with-universal-archs=64-bit. As noted in the Mac/README file, "64-bit" means compile for both "ppc64" and "x86_64" architectures; the

[issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Going back and looking closer at the original failure, I see now that the root cause of the configure failures *is* using --with-universal-archs=64-bit. As noted in the Mac/README file, "64-bit" means compile for both "ppc64" and "x86_64" architectures; the conf

[issue38014] ./configure on recent macOS versions can fail with multiple "present but cannot be compiled" messages

2019-10-11 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg354431 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38440] Possible new issues with IDLE

2019-10-11 Thread Ned Deily
Ned Deily added the comment: (“8.7.10” should be “8.6.10”) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38442] Doc/whatsnew/3.8.rst has an execution bit

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cbb548130caf24275fa16100bccc537570cb46df by Serhiy Storchaka in branch 'master': bpo-38442: Remove an execution bit from Doc/whatsnew/3.8.rst. (GH-16715) https://github.com/python/cpython/commit/cbb548130caf24275fa16100bccc537570cb46df -

[issue38442] Doc/whatsnew/3.8.rst has an execution bit

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Strange, it was only in master. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 ___ Python tracker _

[issue12271] panel.h is not found even if it's installed on various flavours of SUSE

2019-10-11 Thread Fabrice BAUZAC
Fabrice BAUZAC added the comment: I have been hit by the same issue today. Kenneth's patch seems fine. Why not integrate it? -- nosy: +fbauzac ___ Python tracker ___

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
New submission from Shmuel H. : Currently, `dataclasses.dataclass` will generate `__init__` only where the user has not defined one. However, sometimes, with frozen classes or dataclasses with a lot of members, redefinition of this function is not trivial, especially if the only purpose is t

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: This would be a 3.9 feature only, so changing the versions. -- versions: -Python 3.7, Python 3.8 ___ Python tracker ___ _

[issue38435] Start the deprecation cycle for subprocess preexec_fn

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: > We cannot provide a general do everything replacement and should not try. It > not possible. Well, I proposed a solution at: https://bugs.python.org/issue38417#msg354242 I know that this solution has multiple flaws, but a bad solution may be better than n

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Nika
New submission from Nika : os.path.exists() accepts either True or False as argument and returns True. Reproducible on Windows, e. g., in jupyter notebook or in Eclipse, although not in IDLE, which returns False, as expected. import os print(os.path.exists(False)) -- messages: 354440

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Doesn't __post_init__ address this use case? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue38446] Ambiguous signature for builtins.__build_class__

2019-10-11 Thread Dan Snider
New submission from Dan Snider : The function has the following signature documented: __build_class__(func, name, *bases, metaclass=None, **kwds) This implies that `func` and `name` are not positional only parameters when in fact, they are. Another problem with that signature is that Non

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Mariano Anaya
Mariano Anaya added the comment: Hi, I would like to take a look at this issue. Could someone please assign it to me? Thanks -- nosy: +Mariano Anaya ___ Python tracker ___ __

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Eryk Sun
Eryk Sun added the comment: Note that the underlying stat call supports file descriptors, which are non-negative integers. This is a supported and tested capability for genericpath.exists (see GenericTest.test_exists_fd in Lib/test/test_genericpath.py). False and True are integers with the

[issue32561] Add API to io objects for cache-only reads/writes

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Here a proof-of-concept of an asynchronous io module reusing the existing blocking io module: it implements AsyncBufferedReader.readline() using existing _pyio.BufferedReader.readline(). The approach seems to work, but only if bpo-13322 is fixed first: Buff

[issue32561] Add API to io objects for cache-only reads/writes

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: I suggest to leave not attempt to put "async or "await" in the io module to keep it a "simple" as possible, but fix bpo-13322 (in io and _pyio modules). Instead, I suggest to write a new module only providing asynchronous methods, maybe even for open() and c

[issue38447] test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7

2019-10-11 Thread STINNER Victor
New submission from STINNER Victor : AMD64 RHEL7 Refleaks 3.7: https://buildbot.python.org/all/#/builders/311/builds/22 0:15:09 load avg: 12.21 [311/416/1] test_multiprocessing_spawn failed (env changed) (14 min 39 sec) -- running: test_shelve (5 min 11 sec), test_sqlite (1 min), test_cmd_lin

[issue38448] test_concurrent_futures: reap_children() reaped child process 26487 on AMD64 RHEL8 Refleaks 3.x

2019-10-11 Thread STINNER Victor
New submission from STINNER Victor : AMD64 RHEL8 Refleaks 3.x: https://buildbot.python.org/all/#/builders/272/builds/23 0:27:13 load avg: 4.88 [416/419/1] test_concurrent_futures failed (env changed) (17 min 11 sec) -- running: test_capi (7 min 28 sec), test_gdb (8 min 49 sec), test_asyncio (

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2019-10-11 Thread Thomas Caswell
Thomas Caswell added the comment: Any update on resolving this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: I’m happy to write one. This seems like a pretty straightforward fix. -- ___ Python tracker ___ ___

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2b7dc40b2af6578181808ba73c1533fc114e55df by Victor Stinner (Ruediger Pluem) in branch 'master': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) https://github.com/python/cpython/commit/2b7dc40b2af6578181808ba73c153

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +16295 pull_request: https://github.com/python/cpython/pull/16718 ___ Python tracker ___ __

[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16294 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16717 ___ Python tracker ___ __

[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 16717 which uses a similar approach than python.patch. -- components: +Build versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker

[issue37415] Error build Python with Intel compiler: doesn't provide atomic_uintptr_t

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Can someone please test PR 16717 with ICC? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16296 pull_request: https://github.com/python/cpython/pull/16719 ___ Python tracker ___ __

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread miss-islington
miss-islington added the comment: New changeset 73665b41470532f873315d5ae39906160192320d by Miss Islington (bot) in branch '3.8': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) https://github.com/python/cpython/commit/73665b41470532f873315d5ae39906160192320d

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Yaroslav Halchenko
New submission from Yaroslav Halchenko : Our tests in DataLad started to fail while building on Debian with Python 3.7.5rc1 whenever they passed just fine previously with 3.7.3rc1. Analysis boiled down to mimetypes $> ./python3.9 -c 'import mimetypes; mimedb = mimetypes.MimeTypes(strict=

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Yaroslav Halchenko
Yaroslav Halchenko added the comment: FWIW, our more complete test filename is # python3 -c 'import patoolib.util as ut; print(ut.guess_mime(r" \"\`;b&b&c |.tar.gz"))' (None, None) which works fine with older versions -- ___ Python tracker

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
Shmuel H. added the comment: I think it was designed to. However, it is not very usable in production for a number of reasons: 1. It won't work with frozen instances (you'll have to call `object.__setattr__` directly). 2. It gets very messy with more than one or two `InitVar`s which makes it

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Bob, as OP you get first dibs on a PR. Brandt, you're next in line :-) -- ___ Python tracker ___ _

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I'll try and think of something better. I know I'm guilty of sending to python-ideas all the time, but discussing proposed design decisions like this are what that list is all about. If you want to bring it up there, I'd focus on making the problem descriptio

[issue1294959] Problems with /usr/lib64 builds.

2019-10-11 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue1294959] Problems with /usr/lib64 builds.

2019-10-11 Thread Matej Cepl
Change by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue1294959] Problems with /usr/lib64 builds.

2019-10-11 Thread Matej Cepl
Change by Matej Cepl : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Copy of wmanley's comment: https://github.com/python/cpython/pull/13948#issuecomment-541076882 """ This caused a regression for people overriding Thread.join to implement custom thread interruption. See https://stackoverflow.com/questions/50486083/ending-non-

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset ed189ce49423f15ba8774ff174c15d03d12bc807 by Victor Stinner in branch '3.7': bpo-38347: find pathfix for Python scripts whose name contain a '-' (GH-16536) (GH-16719) https://github.com/python/cpython/commit/ed189ce49423f15ba8774ff174c15d03d12bc

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Thanks Ruediger Pluem: I merged your change into master and backported to 3.8 and 3.7. For the 3.7 backport, I skipped tests. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Pyth

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-10-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hummmis this really a regression? The docs say: > No other methods (except for the constructor) should be overridden in a > subclass. In other words, only override the __init__() and run() methods of > this class. So if someone is overriding join

[issue38450] 3.8 Release Notes: IDLE section dupe

2019-10-11 Thread Sebastian Rittau
New submission from Sebastian Rittau : In the 3.8 release notes (https://docs.python.org/3.8/whatsnew/3.8.html), the section "IDLE and idlelib" is duplicated as "idlelib and IDLE". Also, the section "gc" and "gzip" between them are not sorted alphabetically like the rest of the list. ---

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Kyle Meyer
Kyle Meyer added the comment: I've performed a bisect the issue with the following script: #!/bin/sh make -j3 || exit 125 ./python <<\EOF || exit 1 import sys import mimetypes res = mimetypes.MimeTypes(strict=False).guess_type(";1.tar.gz") if res[0] is None:

[issue34632] Port importlib_metadata to Python 3.8

2019-10-11 Thread Arne Recknagel
Arne Recknagel added the comment: Is there a reason the object returned by importlib.metadata.metadata is an EmailMessage and not a dict? If it quacks like a duck it should be a duck, no? -- nosy: +arne ___ Python tracker

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Nick Timkovich
Nick Timkovich added the comment: The `[arg [arg ...]]` feels a bit more formal to me, and I might prefer it in the example shown where the arg name is fairly short. That said, `man mv` shows something like: mv [OPTION]... [-T] SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY mv [O

[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2019-10-11 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: > Should I update the Status and Resolution of the issue here, or wait for some > kind of confirmation? The status is changed after the patch is merged. The person that merges will usually change the status of the issue or If he/she forgets, anyone with d

[issue34632] Port importlib_metadata to Python 3.8

2019-10-11 Thread Arne Recknagel
Arne Recknagel added the comment: I just learned that metadata is stored as an email, and changing the format was rejected in PEP 426. Be that as it may, if it isn't too much of an issue it might still be something that should be hidden from users of the module. Noone wants to know that this

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Marking as regression release blocker for 3.7.5 final and 3.8.0 final. -- keywords: +3.7regression nosy: +lukasz.langa, martin.panter, ned.deily, vstinner priority: normal -> release blocker ___ Python tracker

[issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name

2019-10-11 Thread Ned Deily
Ned Deily added the comment: This change introduces a potential 3.7 regression; see Issue38449. -- nosy: +ned.deily ___ Python tracker ___

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Shmuel H.
Shmuel H. added the comment: The only other solution I could think about was to change setattr's behaviour dynamically so that it would be valid to call it from frozen instance's `__init__`, but I think it is somehow even worst. However, thanks for your help, I think we can close this one fo

[issue35826] Typo in example for async with statement with condition

2019-10-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +16297 pull_request: https://github.com/python/cpython/pull/16720 ___ Python tracker ___ __

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks. I'm always looking for ways to make dataclasses easier to use, while keeping within the original goals. I'll close this for now. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Pyt

[issue38436] Improved performance for list addition.

2019-10-11 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have repeated the benchmark in the speed.python.org server with CPU isolation + PGO + LTO: Slower (21): - xml_etree_iterparse: 127 ms +- 2 ms -> 131 ms +- 2 ms: 1.03x slower (+3%) - xml_etree_parse: 195 ms +- 1 ms -> 200 ms +- 2 ms: 1.03x slower (+3%

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: For backward compatibility with 2 metavars, the two-name form should still be possible. Just pass metavar=("FOO", "FOO"). -- ___ Python tracker _

[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it's any more precise. It just seems verbose and confusing to me, while conveying the same information. `[arg [arg ...]]` to me means "optionally, an arg followed by one or more optional args". While `[arg ...]` to me means "optionally, one or

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue38451] Datetime definition does not work in function definition as list definition

2019-10-11 Thread Pouria
Change by Pouria : -- components: Library (Lib) nosy: Pouria_ff priority: normal severity: normal status: open title: Datetime definition does not work in function definition as list definition type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python

[issue38432] ZeroDivisionError when inf is expected

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See https://en.wikipedia.org/wiki/Denormal_number. -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue38451] Datetime definition does not work in function definition as list definition

2019-10-11 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : Can you please add an example of the issue and the actual/expected behavior? -- nosy: +xtreak ___ Python tracker ___

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: Thanks, Pablo, for providing that. So the changes look like mostly a wash on these benchmarks. Serhiy: I do not see any significant change in + operator timing on my machine (again, just a rough test): $ ./python.exe -m timeit -s z=0 z+0 # master 1000

[issue38431] dataclasses.InitVar breaks with typing.Optional

2019-10-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38424] typing.Generator shorthand

2019-10-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38446] Ambiguous signature for builtins.__build_class__

2019-10-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Py

[issue38424] typing.Generator shorthand

2019-10-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: If you would like to propose a doc fix, then please go ahead and make a PR. -- ___ Python tracker ___ __

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eryk, I think testing for bool in _fd_converter and issuing a warning is a good idea. Do you want to create a PR? -- nosy: +serhiy.storchaka ___ Python tracker __

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: ...and obviously the gains are more pronounced for more/longer lists. In general I'm not married to this change, though. If the consensus is "not worth it", I get it. But it seems like too easy of a win to me. --

[issue38424] typing.Generator shorthand

2019-10-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python ___ Python tracker ___ ___

[issue38424] typing.Generator shorthand

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is already documented, with examples. I do not think the documentation can be made better. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue38424] typing.Generator shorthand

2019-10-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Actually Serhiy is right, I just checked and found this sentence: ``` Alternatively, annotate your generator as having a return type of either Iterable[YieldType] or Iterator[YieldType] ``` -- resolution: -> works for me stage: -> resolved status:

[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-10-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16298 pull_request: https://github.com/python/cpython/pull/16705 ___ Python tracker ___ ___

[issue38436] Improved performance for list addition.

2019-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I do not see any significant change in + operator timing on my machine > (again, just a rough test): Because the time includes the time of iterating, which can be significant in comparison with adding two integers. Please use the pyperf module with --du

[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-10-11 Thread Armin Rigo
Change by Armin Rigo : -- nosy: -arigo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread Rüdiger Plüm
Rüdiger Plüm added the comment: Welcome Victor Stinner. Any chance to get it also backported to 3.6 as I guess this would increase the chance to see it in RedHat 8 where I hit the issue? -- ___ Python tracker __

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: Serhiy, here are the better performance measurements: $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # list-add . Mean +- std dev: 17.3 ns +- 0.3 ns $ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # master ..

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Abhilash Raj
Abhilash Raj added the comment: I am looking into the issue. -- nosy: +maxking ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21478] mock calls don't propagate to parent (autospec)

2019-10-11 Thread Caris Moses
Caris Moses added the comment: Hello, I am still running into this issue. I have tested the following code with Python 3.7.4, 3.7.5rc1 , and 3.8.0rc1. from unittest import TestCase from unittest.mock import patch, Mock, call class MyObject: def __init__(self): self.foo = 0

[issue38395] proxy_contains (weakref.proxy) can access an object with 0 refcount

2019-10-11 Thread miss-islington
miss-islington added the comment: New changeset 193366e25c4f84a58d2f6c6c577fd9f0143dc6e1 by Miss Islington (bot) (Pablo Galindo) in branch '3.7': [3.7] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16663) https://github.com/python/cpython/commit/193366e25c4f84a58d2f6c6c577f

[issue21478] mock calls don't propagate to parent (autospec)

2019-10-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Oh well :( My initial guess is that the report is for methods. The other reports were for functions. So I am wondering if the check for FunctionType is successful and if I need to handle something more. I haven't tried it yet. -- _

[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-11 Thread miss-islington
Change by miss-islington : -- pull_requests: +16299 pull_request: https://github.com/python/cpython/pull/16721 ___ Python tracker ___ __

[issue38436] Improved performance for list addition.

2019-10-11 Thread Brandt Bucher
Brandt Bucher added the comment: I went ahead and ran an instrumented build on some random production code (mostly financial data processing), just because I was curious: BINARY_ADD ops: 3,720,776 BINARY_ADD ops with two lists: 100,452 (2.7% of total) BINARY_ADD with new fast path: 26,357 (26

[issue38450] 3.8 Release Notes: IDLE section dupe

2019-10-11 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! Those whatsnew issues are being addressed in PR 16621. -- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue38347] pathfix.py does not find Python scripts that have '-' in its filename

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: > Welcome Victor Stinner. Any chance to get it also backported to 3.6 as I > guess this would increase the chance to see it in RedHat 8 where I hit the > issue? Python 3.6 doesn't accept bugfixes upstream. If you are a Red Hat customer, you can contact the

[issue38445] os.path.exists() takes bool as argument and returns True

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Maybe os.fspath() can be used: >>> os.fspath(True) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not bool -- ___ Python tracker

[issue21478] mock calls don't propagate to parent (autospec)

2019-10-11 Thread Caris Moses
Caris Moses added the comment: I tried it with mocked functions instead of methods and got the same result, so I dug into this a little deeper. It seems as though the issue it how the mocked functions are called. If I replace the do_something() line with the following then it works. #do_som

[issue38270] Tests: Avoid MD5 or check for MD5 availablity

2019-10-11 Thread Ned Deily
Ned Deily added the comment: It looks like Christian originally requested autobackports to both 3.8 and 3.7 but both failed due to git checkout errors. He then manually restarted the 3.8 backport but it looks like the 3.7 one did not get restarted. Christian, was that intentional or just a

[issue28188] os.putenv should support bytes arguments on Windows

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: This issue was referenced from https://bugs.python.org/issue29240#msg285482 -- ___ Python tracker ___ ___

[issue28188] os.putenv should support bytes arguments on Windows

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: In the meanwhile, the PEP 540 "UTF-8 Mode" has been implemented. -- nosy: +vstinner ___ Python tracker ___ __

[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-10-11 Thread Abhilash Raj
Abhilash Raj added the comment: The bug is interesting due to some of the implementation details of "guess_type". The documentation says that it can parse either a URL or a filename. Switching from urllib.parse._splittype to urllib.parse.urlparse changed what a valid "path" is. _splittype d

[issue38452] unittest setUpClass missing 1 required positional argument: 'cls'

2019-10-11 Thread Danylo
New submission from Danylo : Currently, unittest setUpClass and tearDownClass methods are incorrectly called from within its core. ``` class TestUltrasonicEnv(unittest.TestCase): def setUpClass(cls): pass def tearDownClass(cls): pass ``` Traceback (the same for

[issue32238] Handle "POSIX" in the legacy locale detection

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: In Python 3.8, if the LC_CTYPE is "POSIX", the default stdio error handler is now "surrogateescape" instead of "strict", and the UTF-8 is now enabled. In short, LC_CTYPE="POSIX" now behaves as LC_CTYPE="C". This change impacts at least FreeBSD. If I correctl

[issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X)

2019-10-11 Thread STINNER Victor
STINNER Victor added the comment: Since this issue has been created, I deeply reworked the Python Initialization with the PEP 587, and I made many changes related to locales and the UTF-8 Mode (PEP 540). What's the status of this issue? -- nosy: +vstinner ___

[issue38382] statistics.harmonic_mean fails to raise error with negative input that follows a 0

2019-10-11 Thread Tal Einat
Tal Einat added the comment: I'd certainly be surprised to have the order of zero and negative values in the input have such a dramatic effect on the result. It would make debugging these cases unnecessarily confusing and difficult. And I think it is indeed worth fixing, as these edge-cases

  1   2   >