[issue21600] mock.patch.stopall doesn't work with patch.dict

2020-01-24 Thread Chris Withers
Change by Chris Withers : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-24 Thread miss-islington
miss-islington added the comment: New changeset a46728a570e30e88df253eab17ad6c4372a422da by Miss Islington (bot) in branch '3.8': bpo-39426: Fix outdated default and highest protocols in docs (GH-18154) https://github.com/python/cpython/commit/a46728a570e30e88df253eab17ad6c4372a422da

[issue39429] Add a new "Python Development Mode" page to the documentation

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset b9783d2e035d2babe8fcd9ec109044c0002c18a2 by Victor Stinner in branch 'master': bpo-39429: Add a new "Python Development Mode" doc page (GH-18132) https://github.com/python/cpython/commit/b9783d2e035d2babe8fcd9ec109044c0002c18a2 --

[issue39429] Add a new "Python Development Mode" page to the documentation

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17548 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18161 ___ Python tracker

[issue37669] Make mock_open return per-file content

2020-01-24 Thread Chris Withers
Chris Withers added the comment: I'm not sure I like the API feel after this change: two parameters that can't be used at the same time. As Karthikeyan points out, this can be achieved using side_effect. Personally, I'd prefer a PR that adds a unit test showing that this approach works, and

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +brett.cannon, eric.snow, lars.gustaebel, ncoghlan ___ Python tracker ___ ___

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 18161 fixes race condition by using "from ... import ..." which waits until the module be completely initialized if the specified names are not set. -- components: +Library (Lib) nosy: +serhiy.storchaka type: crash -> behavior versions: +Python

[issue39413] Implement os.unsetenv() on Windows

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17550 pull_request: https://github.com/python/cpython/pull/18163 ___ Python tracker ___

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2020-01-24 Thread Chris Withers
Chris Withers added the comment: New changeset 1d0c5e16eab29d55773cc4196bb90d2bf12e09dd by Chris Withers (Emmanuel Arias) in branch 'master': bpo-24928: Add test case for patch.dict using OrderedDict (GH -11437)

[issue37669] Make mock_open return per-file content

2020-01-24 Thread Chris Withers
Chris Withers added the comment: Closing in favour of issue38157. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17549 pull_request: https://github.com/python/cpython/pull/18162 ___ Python tracker ___

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-24 Thread miss-islington
miss-islington added the comment: New changeset e9652e8d58392f5022759ba06b444ce970eb12db by Miss Islington (bot) (Mark Dickinson) in branch 'master': bpo-39426: Fix outdated default and highest protocols in docs (GH-18154)

[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2020-01-24 Thread Chris Withers
Chris Withers added the comment: As I said before, I can't see an additional test like this hurting, especially if it highlights problems with earlier python versions when it's backported. -- ___ Python tracker

[issue39433] curses.setupterm can raise _curses.error

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: curses.error is documented as an exception raised when a curses library function returns an error. No need to repeat this for every curses function. It is very uncommon to document all exceptions that can be raised by a particular function in Python.

[issue39441] mimetypes.guess_extension unable to get non-lowercase mimetype

2020-01-24 Thread Guénaël Muller
New submission from Guénaël Muller : mimetypes.guess_extension and mimetypes.guess_all_extensions doesn't work correctly with non-lowercase mimetype. >>> import mimetypes >>> mimetypes.guess_type('file.pptm') ('application/vnd.ms-powerpoint.presentation.macroEnabled.12', None) >>>

[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-24 Thread Ammar Askar
Ammar Askar added the comment: See also: https://bugs.python.org/issue37645 which discusses changing the string representation of functions to omit the address. -- nosy: +ammar2 ___ Python tracker

[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: You're right, Windows works as expected. I close the issue. See https://github.com/python/cpython/pull/18115 for more information. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You will get the same problem for common idiom of using a singleton for optional parameters without default value. _singleton = object() def get(key, default=_signleton): if default is _signleton: ... And for other objects whos

[issue39442] from __future__ import annotations breaks dataclasses.Field.type

2020-01-24 Thread Wojciech Łopata
New submission from Wojciech Łopata : I've checked this behaviour under Python 3.7.5 and 3.8.1. ``` from __future__ import annotations from dataclasses import dataclass, fields @dataclass class Foo: x: int print(fields(Foo)[0].type) ``` With annotations imported, the `type` field of

[issue39409] AIX: FAIL: test_specific_values (test.test_cmath.CMathTests)

2020-01-24 Thread Michael Felt
Michael Felt added the comment: I am looking at this, as/when I can. Was hoping for a ancient school option to have the compiler stop with assembly code generation ipv objdump. However, I have not been successful there. Found objdump, and I'll work from that - and also do some of the tests

[issue39426] Pickler docstring misstates default and highest protocols

2020-01-24 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: > Building and verifying the checksum in "RTA protocol" that uses this: (...) Are you simply asking to not deprecate binascii.crc_hqx()? -- ___ Python tracker

[issue39424] [easy] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- title: test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method -> [easy] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method ___ Python tracker

[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17551 pull_request: https://github.com/python/cpython/pull/18164 ___ Python tracker ___

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't that the entire point of "from __future__ import annotations"? Also, please show the traceback when reporting errors so that I can see what's going on. -- ___ Python tracker

[issue38473] AttributeError on asserting autospecced mock object added using attach_mock

2020-01-24 Thread Chris Withers
Chris Withers added the comment: New changeset 66b00a9d3aacf6ed49412f48743e4913104a2bb3 by Chris Withers (Karthikeyan Singaravelan) in branch 'master': bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784)

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: For completeness, a similar problem is present also on python < 3.8 if passing a pathlib.Path type as *src*: the callback function will receive a pathlib.Path type once, and then string types. -- ___ Python

[issue39413] Implement os.unsetenv() on Windows

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 161e7b36b1ea871a1352ccfc1d4f4c1eda76830f by Victor Stinner in branch 'master': bpo-39413: Implement os.unsetenv() on Windows (GH-18163) https://github.com/python/cpython/commit/161e7b36b1ea871a1352ccfc1d4f4c1eda76830f --

[issue38473] AttributeError on asserting autospecced mock object added using attach_mock

2020-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17552 pull_request: https://github.com/python/cpython/pull/18166 ___ Python tracker ___

[issue38473] AttributeError on asserting autospecced mock object added using attach_mock

2020-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17553 pull_request: https://github.com/python/cpython/pull/18167 ___ Python tracker ___

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: > PR 18161 fixes race condition by using "from ... import ..." > which waits until the module be completely initialized if the specified > names are not set. Correct me if I'm wrong, but I think the behavior of 'import lzma' in this case (vulnerable to race

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: By the way, thanks a lot for the fix <3 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38691] [easy] importlib: PYTHONCASEOK should be ignored when using python3 -E

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: sys.flags.ignore_environment should be used. -- keywords: +newcomer friendly title: importlib: PYTHONCASEOK should be ignored when using python3 -E -> [easy] importlib: PYTHONCASEOK should be ignored when using python3 -E

[issue39395] The os module should unset() environment variable at exit

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: On non-Windows platforms, Python now requires setenv() and unsetenv() functions to build. setenv() and unsetenv() should be available on all platforms supported by Python. If it's not the case, someone can maintain a downstream patch which is a revert of

[issue39395] The os module should unset() environment variable at exit

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39398] AMD64 Fedora Rawhide Clang 3.x: C compiler cannot create executables

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: Charalampos downgraded clang to 10.0.0 to workaround the issue. The buildbot worker compiles the code succesfully again: https://buildbot.python.org/all/#/builders/169 I close the issue. The issue is now tracked in Fedora Rawhide anyway:

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Wojciech Łopata
Change by Wojciech Łopata : -- title: from __future__ import annotations breaks dataclasses.Field.type -> from __future__ import annotations makes dataclasses.Field.type a string, not type ___ Python tracker

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 88704334e5262c6cd395a0809d4ef810f33f3ca5 by Giampaolo Rodola (mbarkhau) in branch 'master': bpo-39390 shutil: fix argument types for ignore callback (GH-18122) https://github.com/python/cpython/commit/88704334e5262c6cd395a0809d4ef810f33f3ca5

[issue39361] [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39361] [C API] Document PyTypeObject.tp_print removal in What's New In Python 3.9

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2d5097663d7f80921fb07cdcd26c9d59cf71f1a2 by Victor Stinner (Ammar Askar) in branch 'master': bpo-39361: Document the removal of PyTypeObject.tp_print (GH-18125) https://github.com/python/cpython/commit/2d5097663d7f80921fb07cdcd26c9d59cf71f1a2

[issue39380] ftplib uses latin-1 as default encoding

2020-01-24 Thread Inada Naoki
Inada Naoki added the comment: Can we have some deprecation period? def __init__(self, ..., encoding=None): ... if encoding is not None: self.encoding = encoding else: warnings.warn("The default encoding of the FTP class will be changed from 'latin1' to 'utf-8' in

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is intended to support circular imports. Let foo.py contains "import bar" and bar.py contains "import foo". When you execute "import foo", the import machinery first creates an empty module foo, adds it to sys.modules, reads foo.py and executes it in

[issue39035] Travis CI fail on backports: pyvenv not installed

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: I didn't notice the error in the last days, so I close the issue. I would be nice to merge PR 17623, but that can be done later (by Larry Hastings, the 3.5 release manager). -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue39395] The os module should unset() environment variable at exit

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset b8d1262e8afe7b907b4a394a191739571092acdb by Victor Stinner in branch 'master': bpo-39395: putenv() and unsetenv() always available (GH-18135) https://github.com/python/cpython/commit/b8d1262e8afe7b907b4a394a191739571092acdb --

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Wojciech Łopata
Wojciech Łopata added the comment: > Isn't that the entire point of "from __future__ import annotations"? I'm not complaining about Foo.__annotations__ storing strings instead of types. I'm complaining about dataclass.Field.type being a string instead of type. I don't think the former needs

[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 656c45ec9a9dc2e94cec199ebde553a6979e0e05 by Victor Stinner in branch 'master': bpo-38631: Avoid Py_FatalError() in GC collect() (GH-18164) https://github.com/python/cpython/commit/656c45ec9a9dc2e94cec199ebde553a6979e0e05 --

[issue39380] ftplib uses latin-1 as default encoding

2020-01-24 Thread Dong-hee Na
Dong-hee Na added the comment: I agree with inada.naoki -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17557 pull_request: https://github.com/python/cpython/pull/18172 ___ Python tracker ___

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +17556 pull_request: https://github.com/python/cpython/pull/18171 ___ Python tracker ___

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Ethan Furman
Ethan Furman added the comment: New changeset 9017e0bd5e124ae6d2ed94b9e9cacb2e86270980 by Ethan Furman (Serhiy Storchaka) in branch 'master': bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161) https://github.com/python/cpython/commit/9017e0bd5e124ae6d2ed94b9e9cacb2e86270980

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Ethan Furman
Ethan Furman added the comment: Brett: -- > It's covered in the language reference where import semantics are > explained. It isn't explicitly called out in higher-level docs that > I'm aware of because it only really comes up in edge cases like > importing in a thread which we actively

[issue39414] Multiprocessing resolving object as None

2020-01-24 Thread Ned Deily
Change by Ned Deily : -- nosy: +davin, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: > Should `dataclass.Field.type` become a property that evaluates the annotation > at runtime much in the same way that `get_type_hints` works? I think not. But maybe a function that evaluates all of the field types. Or maybe an @dataclass parameter to cause

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread miss-islington
miss-islington added the comment: New changeset 1a274359283d3d1f4f60dd527843f72e0368caf3 by Miss Islington (bot) in branch '3.7': bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161) https://github.com/python/cpython/commit/1a274359283d3d1f4f60dd527843f72e0368caf3

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread miss-islington
miss-islington added the comment: New changeset ea4a61fec842c94107eef46e5030b89a086f94bb by Miss Islington (bot) in branch '3.8': bpo-39430: Fix race condition in lazy imports in tarfile. (GH-18161) https://github.com/python/cpython/commit/ea4a61fec842c94107eef46e5030b89a086f94bb

[issue39448] Add regen-frozen makefile target

2020-01-24 Thread Neil Schemenauer
New submission from Neil Schemenauer : Updating the frozen module "__hello__" code inside Python/frozen.c is currently a manual process. That's a bit tedious since it adds some extra work in the case that bytecode changes are made. I've created a small script and a makefile target to

[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: As mentioned on the attached PR, the first argument is positional, so it doesn't matter that the name in the docs is not the same as the name in the code. The name "bytes_object" makes it clear which type of object is accepted, which makes it a better fit

[issue39446] Documentation should reflect that all dicts are now ordered

2020-01-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue33609 . -- nosy: +xtreak ___ Python tracker ___

[issue22724] byte-compile fails for cross-builds

2020-01-24 Thread Xavier de Gaye
Xavier de Gaye added the comment: PYTHON_FOR_BUILD does not use PYTHONPATH in the implementation of (closed) PR 17420 and should fix the current issue as a side effect. FWIW, PR 17420 fixes cross-compilation of third-party extension modules by replacing the complex PYTHON_FOR_BUILD command

[issue39447] imaplib documentation claims that commands return a string, but they return bytes

2020-01-24 Thread Daniel Kahn Gillmor
New submission from Daniel Kahn Gillmor : The imaplib documentation says: > Each command returns a tuple: (type, [data, ...]) where type is usually > 'OK' or 'NO', and data is either the text from the command response, or > mandated results from the command. Each data is either a string, or

[issue39443] Inhomogeneous behaviour for descriptors in between the class-instance and metaclass-class pairs

2020-01-24 Thread Eric Snow
Eric Snow added the comment: @Raymond, What do you think about adding a helpful note or two in the docs? -- nosy: +rhettinger ___ Python tracker ___

[issue39446] Documentation should reflect that all dicts are now ordered

2020-01-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +inada.naoki, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38972] [venv] Link to instructions to change PowerShell execution policy for venv activation

2020-01-24 Thread Brett Cannon
Brett Cannon added the comment: https:/go.microsoft.com/fwlink/?LinkID=135170 is the link to the MS docs. The command is: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -- ___ Python tracker

[issue38076] Make struct module PEP-384 compatible

2020-01-24 Thread Dino Viehland
Dino Viehland added the comment: One more data point: Backporting this change to Python 3.6 (I just happened to have it applied there already, so I haven't tried it on 3.7 or 3.8) has no crash and no hangs in multiprocessing on Linux. So something definitely changed in multiproessing which

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose it fixed the bug. But I cannot confirm because I cannot reproduce the original bug. -- ___ Python tracker ___

[issue39395] The os module should unset() environment variable at exit

2020-01-24 Thread Eric Snow
Eric Snow added the comment: FTR, #39376 is related (avoid the process-global env vars in the first place). -- nosy: +eric.snow ___ Python tracker ___

[issue39374] Key in sort -> Callable Object instead of function

2020-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that we should keep 'function', as it is often used at least somewhat generically (as in Library Manual 'Built-in Functions' chapter). I marked this as an easy first PR. -- keywords: +easy, newcomer friendly nosy: +terry.reedy

[issue39446] Documentation should reflect that all dicts are now ordered

2020-01-24 Thread Michael Shields
New submission from Michael Shields : As of Python 3.7, dicts always preserve insertion order. This is mentioned briefly in the release notes, but it would also be helpful to mention it in the language reference, and in the discussion of collections.OrderedDict. -- assignee:

[issue39443] Inhomogeneous behaviour for descriptors in between the class-instance and metaclass-class pairs

2020-01-24 Thread Eric Snow
Eric Snow added the comment: First of all, thanks for asking about this. Everything is working as expected. Let's look at why. First, be sure the behavior of descriptors is clear: the descriptor protocol is only triggered by "dotted access" on an object ("obj.attr"). So you should

[issue38076] Make struct module PEP-384 compatible

2020-01-24 Thread Eric Snow
Eric Snow added the comment: > there's still probably some underlying issue in multiprocessing. Whoa, I've never heard that before! -- ___ Python tracker ___

[issue39447] imaplib documentation claims that commands return a string, but they return bytes

2020-01-24 Thread Daniel Kahn Gillmor
Daniel Kahn Gillmor added the comment: I should note that the "header of the response" appears to also be a bytes object, not a string object. -- ___ Python tracker ___

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I don't think we need to change anything on < 3.8, but 3.8 and 3.9 will always convert *src* to str via os.fspath(), which IMO is more consistent (e.g. os.path.* functions and others do the same). -- ___

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Manuel Barkhau added the comment: > For completeness, a similar problem is present also on python < 3.8 Fair point. I'll have a look. -- ___ Python tracker ___

[issue39444] Incorrect description of sorting for PrettyPrinter

2020-01-24 Thread Steven DeRose
New submission from Steven DeRose : The doc for pprint.PrettyPrinter at https://docs.python.org/3/library/pprint.html says: If sort_dicts is true (the default), dictionaries will be formatted with their keys sorted, otherwise they will display in insertion order I believe the insertion

[issue39405] Using relative path as a --prefix during configure.

2020-01-24 Thread Éric Araujo
Éric Araujo added the comment: Hello! I suggest you bring your question to the forum, which is a better place to have discussions than the issue tracker :) https://discuss.python.org/c/users/7 -- nosy: +eric.araujo status: open -> pending ___

[issue8901] Windows registry path not ignored with -E option

2020-01-24 Thread Zackery Spytz
Change by Zackery Spytz : -- pull_requests: +17555 pull_request: https://github.com/python/cpython/pull/18169 ___ Python tracker ___

[issue39445] h5py not playing nicely with subprocess and mpirun

2020-01-24 Thread Rafael Laboissière
New submission from Rafael Laboissière : * Preamble: The problem reported hereafter possibly comes from the h5py module, which is not part of Python per se. This problem has been already reported to the h5py developers: https://github.com/h5py/h5py/issues/1467 and also against the Debian

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread David Hagen
David Hagen added the comment: Should `dataclass.Field.type` become a property that evaluates the annotation at runtime much in the same way that `get_type_hints` works? -- nosy: +drhagen ___ Python tracker

[issue39443] Inhomogeneous behaviour for descriptors in between the class-instance and metaclass-class pairs

2020-01-24 Thread Hugo Ricateau
New submission from Hugo Ricateau : Assume one has defined the following descriptor: ``` class Descriptor: def __set__(self, instance, value): print('SET') ``` On the one hand, for the class-instance pair, the behaviour is as follows: ``` class FirstClass: descriptor =

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Manuel Barkhau added the comment: > If you pass a string, you will get a string, so existing code will continue > to work as before. Somebody might have code that is running against a flat directory and have written their ignore function expecting to get a pathlib.Path, because that's the

[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-24 Thread Martin Panter
Martin Panter added the comment: Of course I would prefer “crc_hqx” to stay, because we use it at work. But I understand if you think it is not popular enough to justify maintaining it. But I was more asking if the deprecation notice should point the way forward. This function is no longer

[issue39451] enum.Enum reference count leaks

2020-01-24 Thread Dan Gass
New submission from Dan Gass : Given (1) instantiation of an enumeration class with an invalid value (2) a try/except around the instantiation where the exception is ignored Then: An unneeded reference to the bad value is lost (as well as other values that I suspect are local variables within

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Manuel Barkhau
Change by Manuel Barkhau : -- pull_requests: +17554 pull_request: https://github.com/python/cpython/pull/18168 ___ Python tracker ___

[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > For completeness, a similar problem is present also on python < 3.8 if > passing a pathlib.Path type as *src* I do not think this is a problem. If you pass a string, you will get a string, so existing code will continue to work as before. The only

[issue39442] from __future__ import annotations makes dataclasses.Field.type a string, not type

2020-01-24 Thread Eric V. Smith
Eric V. Smith added the comment: Well the type comes from the annotation, so this makes sense to me. If dataclasses were to call get_type_hints() for every field, it would defeat the purpose of PEP 563 (at least for dataclasses). -- ___ Python

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Maciej Gol
Maciej Gol added the comment: This is a HUGE eye opener! Didn't know of that 'import' vs 'from x import y' difference. Thanks a lot! Is it documented somewhere ? pt., 24 sty 2020, 15:08 użytkownik Serhiy Storchaka napisał: > > Serhiy Storchaka added the comment: > > It is intended to

[issue39444] Incorrect description of sorting for PrettyPrinter

2020-01-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: dicts preserve their insertion order from Python 3.6 and is reflected in the documentation unless I am missing something here. -- nosy: +xtreak ___ Python tracker

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Brett Cannon
Brett Cannon added the comment: It's covered in the language reference where import semantics are explained. It isn't explicitly called out in higher-level docs that I'm aware of because it only really comes up in edge cases like importing in a thread which we actively discourage unless

[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-24 Thread Ethan Furman
Ethan Furman added the comment: Thanks, Serhiy! I had no idea of those changes to import. This does raise the question, though, of whether accessing an empty module's attributes should either: - wait for the module to finish initializing; or - raise an exception immediately with better

[issue39374] Key in sort -> Callable Object instead of function

2020-01-24 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +17560 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18177 ___ Python tracker ___

[issue39444] Incorrect description of sorting for PrettyPrinter

2020-01-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't think that any change is needed here. Adding "their default" to insertion order doesn't really help: if the reader knows dicts are now ordered, adding "default" is redundant; if the reader doesn't know, they'll still be confused. "What default

[issue39451] enum.Enum reference count leaks

2020-01-24 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list

[issue39374] Key in sort -> Callable Object instead of function

2020-01-24 Thread Juhana Jauhiainen
Juhana Jauhiainen added the comment: I created a pull request for this issue. It adds the description "(or other callable)" to two places in sorting documentation. "function (or other callable) to be called on each list element prior to making comparisons." and later "The value of the

[issue39444] Incorrect description of sorting for PrettyPrinter

2020-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Closing is fine with me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39449] New Assignment operator

2020-01-24 Thread Arthur Fibich
New submission from Arthur Fibich : It's just a personal thing, but I kind of miss the following possibility in Python (and likewise every other language I know): Like a += 1 is the same as a = a + 1 I'd love to see a .= b() as an opportunity to express a = a.b() Possible usages are for

[issue12915] Add inspect.locate and inspect.resolve

2020-01-24 Thread Éric Araujo
Éric Araujo added the comment: With the lack of support, I suggest closing this. -- ___ Python tracker ___ ___ Python-bugs-list

[issue39450] unittest TestCase shortDescription does not strip whitespace

2020-01-24 Thread Steve C
New submission from Steve C : When running unit tests with the --verbose flag test descriptions are run using the first line of the test case's docstring. If the first character of the docstring is a newline, no description is printed. Examples: Current code expects docstrings to look like

  1   2   >