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

2020-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker

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

2020-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger components: +Documentation -Interpreter Core versions: -Python 3.6, Python 3.7 ___ Python tracker ___

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

2020-01-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: This fixed the bug. To reproduce the bug, substitute the "from _lzma import *" statement with "raise ImportError" in Lib/lzma.py to simulate that the _lzma module is missing and run the test.py script written and uploaded by Maciej. --

[issue39451] enum.Enum reference count leaks

2020-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> ethan.furman priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-25 Thread Matt Kokotovich
Change by Matt Kokotovich : -- pull_requests: +17573 pull_request: https://github.com/python/cpython/pull/18190 ___ Python tracker ___

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

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Some thoughts: * The docs talk about descriptor invocation from "attribute access". The reason they don't say "dotted access" is that the descriptors can be invoked in multiple ways: dotted access, getattr()/setattr() functions, super(), or direct

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this particular issue can be closed in now. After it was written, the AST optimizer has been built-out and some peephole logic has moved. Other adjustments and improvements can be continue to be done in the other open issues. --

[issue39309] Please delete my account

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: I can remove OP's User role and change their user name etc. to make it anonymize as much as possible. I cannot get into the server so perhaps Ernest can delete the account. -- nosy: +EWDurbin, berker.peksag ___

[issue39455] Update the documentation for linecache module

2020-01-25 Thread Aurora
New submission from Aurora : Added the definitions for two undocumented functions. -- assignee: docs@python components: Documentation messages: 360709 nosy: docs@python, opensource-assist priority: normal pull_requests: 17572 severity: normal status: open title: Update the

[issue39400] pydoc: Use of MANPAGER variable is incorrect

2020-01-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +serhiy.storchaka versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

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

2020-01-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: In msg360620 Serhiy wrote: > When the interpreter encounters "import foo" in bar.py, the import machinery > takes the module foo from sys.modules. > So you break an infinite cycle and can import modules with cyclic > dependencies. The following pdb session

[issue12915] Add inspect.locate and inspect.resolve

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: FTR, Django has a similar helper: from django.utils.module_loading import import_string ValidationError = import_string('django.core.exceptions.ValidationError')

[issue39165] Completeness and symmetry in RE, avoid `findall(...)[0]`

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy and Terry. Marking this as "closed/rejected". Adding more-ways-to-it usually doesn't make users better-off (more to learn, more to remember, more to choose from, creating a new question about whether or not to use re.search(),

[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

2020-01-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +17574 pull_request: https://github.com/python/cpython/pull/18191 ___ Python tracker ___

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

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is already covered here: https://docs.python.org/3/library/stdtypes.html#dict and here: https://docs.python.org/3/library/collections.html#ordereddict-objects -- resolution: -> out of date stage: -> resolved status: open -> closed

[issue38337] inspect: getmembers calls properties

2020-01-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Here is a link to the discussion of this on ideas: https://discuss.python.org/t/implement-inspect-getmembers-static/2550 -- nosy: +cheryl.sabella versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8

[issue9216] FIPS support for hashlib

2020-01-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Should this issue be closed as resolved? -- nosy: +cheryl.sabella ___ Python tracker ___ ___

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 10355ed7f132ed10f1e0d8bd64ccb744b86b1cce by Raymond Hettinger in branch 'master': bpo-36018: Add another example for NormalDist() (#18191) https://github.com/python/cpython/commit/10355ed7f132ed10f1e0d8bd64ccb744b86b1cce --

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17575 pull_request: https://github.com/python/cpython/pull/18192 ___ Python tracker ___

[issue36350] inspect.Signature.parameters and inspect.BoundArguments.arguments should be dicts instead of OrderedDicts

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm neutral on whether to move this forward or not. Usually, we would only make an externally visible and possibly consequential API change if there were some compensating benefit to users (a significant speed-up for example). Also note that the

[issue36018] Add a Normal Distribution class to the statistics module

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset eebcff8c071b38b53bd429892524ba8518cbeb98 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36018: Add another example for NormalDist() (GH-18191) (GH-18192)

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

2020-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8271441d8b6e1f8eae1457c437da24e775801d9f by Raymond Hettinger (Juhana Jauhiainen) in branch 'master': bpo-39374: Updated sorting documentation (GH-18177) https://github.com/python/cpython/commit/8271441d8b6e1f8eae1457c437da24e775801d9f

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

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

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17569 pull_request: https://github.com/python/cpython/pull/18186 ___ Python tracker ___

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17568 pull_request: https://github.com/python/cpython/pull/18185 ___ Python tracker ___

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 7de617455ed788e6730c40cf854c4b72b0432194 by Berker Peksag (alclarks) in branch 'master': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/7de617455ed788e6730c40cf854c4b72b0432194 --

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 548685e364af3d366d3aef924b2077ee6f8d13dc by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/548685e364af3d366d3aef924b2077ee6f8d13dc

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 321491a536c378227f9d574703f7c06f89c67dcf by Berker Peksag (Miss Islington (bot)) in branch '3.8': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/321491a536c378227f9d574703f7c06f89c67dcf

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17571 pull_request: https://github.com/python/cpython/pull/18188 ___ Python tracker ___

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17570 pull_request: https://github.com/python/cpython/pull/18187 ___ Python tracker ___

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 4b09dc79f4d08d85f2cc945563e9c8ef1e531d7b by Berker Peksag (Windson yang) in branch 'master': bpo-36654: Add examples for using tokenize module programmically (#12947)

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 1cf0df4f1bcc38dfd70a152af20cf584de531ea7 by Berker Peksag (Miss Islington (bot)) in branch '3.8': bpo-36654: Add examples for using tokenize module programmatically (GH-18187)

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 6dbd843dedc9e05c0e3f4714294837f0a83deebe by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-36654: Add examples for using tokenize module programmatically (GH-12947)

[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2020-01-25 Thread R. David Murray
R. David Murray added the comment: Please open a new issue for this question. -- ___ Python tracker ___ ___ Python-bugs-list

[issue39234] `enum.auto()` incrementation value not specified.

2020-01-25 Thread Ned Deily
Change by Ned Deily : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36654] Add example to tokenize.tokenize

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: Wow, I managed to make typos in all three commits! PR 12947 has some discussion about why adding these examples would be a good idea as we now have two different APIs for unicode and bytes input. Thanks for the PR, Windson. -- resolution: -> fixed

[issue39234] `enum.auto()` incrementation value not specified.

2020-01-25 Thread Ned Deily
Ned Deily added the comment: New changeset eec7636bfd07412b5872c0683636e9e98bf79a8c by Ned Deily (Miss Islington (bot)) in branch '3.8': bpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872) (GH-17875)

[issue39234] `enum.auto()` incrementation value not specified.

2020-01-25 Thread Ned Deily
Ned Deily added the comment: New changeset b0a6ec256b460f071e33b4633e5bec450d8e6394 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-39234: Doc: `enum.auto()` incrementation value not specified. (GH-17872) (GH-17876)

[issue37022] pdb: do_p and do_pp swallow exceptions from __repr__

2020-01-25 Thread daniel hahler
Change by daniel hahler : -- keywords: +patch pull_requests: +17564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18180 ___ Python tracker ___

[issue33973] HTTP request-line parsing splits on Unicode whitespace

2020-01-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread miss-islington
miss-islington added the comment: New changeset a23449285430081ea317cc1f203c80c410bbd8b9 by Miss Islington (bot) in branch '3.8': bpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068) https://github.com/python/cpython/commit/a23449285430081ea317cc1f203c80c410bbd8b9

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

2020-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reopening because it seems my reading of the doc was wrong (took a backslash for a regular slash :-o). -- resolution: not a bug -> stage: resolved -> status: closed -> open ___ Python tracker

[issue37955] mock.patch incorrect reference to Mock

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

[issue12915] Add inspect.locate and inspect.resolve

2020-01-25 Thread Vinay Sajip
Vinay Sajip added the comment: > With the lack of support, I suggest closing this. Well, the lack of support is just for adding to importlib. It still seems useful to refactor it out ... just not clear where the best place is. Perhaps pkgutil? It's definitely useful to have in the stdlib in

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

2020-01-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d0d9fa8c5e30aff71b6d5e8b2673396622f33270 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068)

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17562 pull_request: https://github.com/python/cpython/pull/18178 ___ Python tracker ___

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17563 pull_request: https://github.com/python/cpython/pull/18179 ___ Python tracker ___

[issue39082] AsyncMock is unable to correctly patch static or class methods

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset 62865f4532094017a9b780b704686ca9734bc329 by Chris Withers (Matthew Kokotovich) in branch 'master': bpo-39082: Allow AsyncMock to correctly patch static/class methods (GH-18116)

[issue39082] AsyncMock is unable to correctly patch static or class methods

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

[issue37955] mock.patch incorrect reference to Mock

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset 40c080934b3d49311209b1cb690c2ea1e04df7e7 by Chris Withers (Paulo Henrique Silva) in branch 'master': bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521)

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39388] IDLE: Changes to keybindings aren't reverted on cancel

2020-01-25 Thread miss-islington
miss-islington added the comment: New changeset fd9ce2b924263c1f5c5a2f3f3095fe6ae97c1432 by Miss Islington (bot) in branch '3.7': bpo-39388: IDLE: Fix bug when cancelling out of configdialog (GH-18068) https://github.com/python/cpython/commit/fd9ce2b924263c1f5c5a2f3f3095fe6ae97c1432

[issue39380] ftplib uses latin-1 as default encoding

2020-01-25 Thread Sebastian G Pedersen
Sebastian G Pedersen added the comment: Thank you for the feedback. I will elaborate a little bit on the reasons and thoughts behind the pull request: Since RFC 2640, the industry standard within FTP Clients is UTF-8 (see e.g. FileZilla here:

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

2020-01-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset a5906b2bfce9560568dee1dcc3550e74e742dd34 by Karthikeyan Singaravelan (Miss Islington (bot)) in branch '3.8': bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (GH-18167)

[issue38932] unittest.mock.Mock.reset_mocks does not pass all arguments to its children

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

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

2020-01-25 Thread Hugo Ricateau
Hugo Ricateau added the comment: Thanks for this detailed answer; very instructive :) > the descriptor protocol is only triggered by "dotted access" Indeed; this is what I was missing... despite it is indirectly mentioned in the documentation. Nonetheless, it could be worth the overload to

[issue37465] Incorrect documentation for `s#` arguments in C API argument parsing

2020-01-25 Thread Iustin Pop
Change by Iustin Pop : -- keywords: +patch pull_requests: +17566 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17478 ___ Python tracker

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

2020-01-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thank you all for the review. Closing it as fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39453] Use-after-free in list contain

2020-01-25 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +17567 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18181 ___ Python tracker ___

[issue39454] when \\u in byte_string , byte_string.decode('raw_unicode_escape') maybe has problem

2020-01-25 Thread YPf
New submission from YPf : >>> path=r'C:\Users\Administrator\Desktop' >>> path.encode('raw_unicode_escape') b'C:\\Users\\Administrator\\Desktop' >>> path.encode('raw_unicode_escape').decode('raw_unicode_escape') Traceback (most recent call last): File "", line 1, in

[issue39454] when \\u in byte_string , byte_string.decode('raw_unicode_escape') maybe has problem

2020-01-25 Thread SilentGhost
SilentGhost added the comment: Why are you using this type of encoding on this bytes object? It specifically says in its description that "Existing backslashes are not escaped in any way.". If you'd use unicode_escape instead, you would be able to round-trip back to your original string.

[issue39449] New Assignment operator

2020-01-25 Thread SilentGhost
Change by SilentGhost : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39452] Improve the __main__ module documentation

2020-01-25 Thread Géry
New submission from Géry : This PR will apply the following changes on the [`__main__` module documentation](https://docs.python.org/3.7/library/__main__.html): - correct the phrase "run as script" by "run from the file system" (as used in the

[issue39453] Use-after-free in list contain

2020-01-25 Thread Dong-hee Na
New submission from Dong-hee Na : class poc() : def __eq__(self,other) : l.clear() return NotImplemented l = [poc(), poc(), poc()] 3 in l [1]2606 segmentation fault sigh.. -- assignee: corona10 messages: 360686 nosy: corona10, pablogsal, vstinner priority:

[issue39453] Use-after-free in list contain

2020-01-25 Thread Dong-hee Na
Dong-hee Na added the comment: I will send a patch ASAP. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-01-25 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 71d2b3344f4560ffee14fccd320b20e7add50fec by Karthikeyan Singaravelan (Miss Islington (bot)) in branch '3.7': bpo-38473: Handle autospecced functions and methods used with attach_mock (GH-16784) (#18166)

[issue38932] unittest.mock.Mock.reset_mocks does not pass all arguments to its children

2020-01-25 Thread Chris Withers
Chris Withers added the comment: New changeset aef7dc89879d099dc704bd8037b8a7686fb72838 by Chris Withers (Vegard Stikbakke) in branch 'master': bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409)

[issue39449] New Assignment operator

2020-01-25 Thread Aurora
Aurora added the comment: That's a nice simple idea. -- nosy: +opensource-assist ___ Python tracker ___ ___ Python-bugs-list

[issue39452] Improve the __main__ module documentation

2020-01-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: There are some serious problems with the PR. You state that these two phrases are from the runpy documentation: * "run from the module namespace" * "run from the file system" but neither of those phrases appear in the runpy documentation here:

[issue39380] ftplib uses latin-1 as default encoding

2020-01-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It's been a long time since I implemented UTF-8 support in pyftpdlib, but long story short is that: - most recent servers are supposed to use UTF-8 by default - such servers must include "UTF-8" in the FEAT command response - some servers may enable UTF-8