[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread Guido van Rossum
Guido van Rossum added the comment: I have a nit on the commit message used here (and also in issue 39885). *Please* don't use this style of commit message "IDLE context menu clears selection". That phrasing sounds like it is the description of a bug. Please always use a phrasing that makes

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18227 pull_request: https://github.com/python/cpython/pull/18869 ___ Python tracker

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset e53a3932cb01683b0fa8a7448ca25a2e658c39e6 by Terry Jan Reedy in branch 'master': bpo-27115: Move IDLE Query error blanking (GH-18868) https://github.com/python/cpython/commit/e53a3932cb01683b0fa8a7448ca25a2e658c39e6 --

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +18228 pull_request: https://github.com/python/cpython/pull/18870 ___ Python tracker ___

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +18216 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/18859 ___ Python tracker

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +18217 pull_request: https://github.com/python/cpython/pull/18860 ___ Python tracker

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 4ca060d8ad7c6df1fd4df30f9a14f6aa35380c09 by Terry Jan Reedy in branch 'master': bpo-39885: IDLE context menu clears selection (#18859) https://github.com/python/cpython/commit/4ca060d8ad7c6df1fd4df30f9a14f6aa35380c09 --

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset f9684d222e0950c1ce206873a9c66dfd30ed by Miss Islington (bot) in branch '3.7': bpo-39885: IDLE context menu clears selection (GH-18859) https://github.com/python/cpython/commit/f9684d222e0950c1ce206873a9c66dfd30ed --

[issue39905] Cannot load sub package having a 3-dot relative import

2020-03-08 Thread Mark Dickinson
Mark Dickinson added the comment: In this line: > spec = spec_from_file_location("subsubpkg_rel", > "/home/yon/myproj/mypkg/subpkg/subsubpkg_rel/__init__.py") try providing the fully-qualified name, instead of just "subsubpkg_rel". That is: > spec =

[issue39906] pathlib.Path: add `follow_symlinks` argument to `stat()` and `chmod()`

2020-03-08 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +18221 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18864 ___ Python tracker ___

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset f3f0c7a108cd2a5071592e77e2f4b14ca35d4fcc by Miss Islington (bot) in branch '3.8': bpo-27115: Move IDLE Query error blanking (GH-18868) https://github.com/python/cpython/commit/f3f0c7a108cd2a5071592e77e2f4b14ca35d4fcc --

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread Maor Kleinberger
Maor Kleinberger added the comment: Great, thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7479] os.lchmod is not present

2020-03-08 Thread Barney Gale
Change by Barney Gale : -- nosy: +barneygale nosy_count: 5.0 -> 6.0 pull_requests: +18222 pull_request: https://github.com/python/cpython/pull/18864 ___ Python tracker ___

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-08 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch nosy: +pablogsal nosy_count: 2.0 -> 3.0 pull_requests: +18224 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18866 ___ Python tracker

[issue39908] Remove unused args from init_set_builtins_open and _Py_FatalError_PrintExc in Python/pylifecycle.c

2020-03-08 Thread Andy Lester
New submission from Andy Lester : init_set_builtins_open(PyThreadState *tstate) -> unused arg _Py_FatalError_PrintExc(int fd) -> unused arg -- components: Interpreter Core messages: 363690 nosy: petdance priority: normal severity: normal status: open title: Remove unused args from

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-08 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +18223 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18865 ___ Python tracker ___

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset 9d5ed8355d4cb73ab13fa6094c9ab57798dff3be by Miss Islington (bot) in branch '3.7': bpo-27115: Move IDLE Query error blanking (GH-18868) https://github.com/python/cpython/commit/9d5ed8355d4cb73ab13fa6094c9ab57798dff3be --

[issue39907] `pathlib.Path.iterdir()` wastes memory by using `os.listdir()` rather than `os.scandir()`

2020-03-08 Thread Barney Gale
New submission from Barney Gale : `pathlib.Path.iterdir()` uses `os.listdir()` rather than `os.scandir()`. I think this has a small performance cost, per PEP 471: > It returns a generator instead of a list, so that scandir acts as a true > iterator instead of returning the full list

[issue39908] Remove unused args from init_set_builtins_open and _Py_FatalError_PrintExc in Python/pylifecycle.c

2020-03-08 Thread Andy Lester
Change by Andy Lester : -- keywords: +patch pull_requests: +18225 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18867 ___ Python tracker ___

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +18226 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/18868 ___ Python tracker

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-08 Thread SHANKAR JHA
SHANKAR JHA added the comment: I have added the pull request: https://github.com/python/cpython/pull/18851. Please check it out and let me know if I need to change anything. Thank you everyone for your guidance. -- ___ Python tracker

[issue39902] dis.Bytecode objects should be comparable

2020-03-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: What does it mean for two Bytecode objects to be equal? I know what equality means for ints: they have the same numeric value. I know what equality means for strings: they have the same sequence of Unicode code points. I have no concept of what it would

[issue39898] Remove unused arg from append_formattedvalue in Python/ast_unparse.c

2020-03-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 28ca43b7e30e2eaa2997c3becd8b1a837484ae5c by Andy Lester in branch 'master': closes bpo-39898: Remove unused arg from append_formattedvalue. (GH-18840) https://github.com/python/cpython/commit/28ca43b7e30e2eaa2997c3becd8b1a837484ae5c

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset a5e821c7269ebed6e8b4b4eee3f2247ec41a9788 by Miss Islington (bot) in branch '3.8': bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801) https://github.com/python/cpython/commit/a5e821c7269ebed6e8b4b4eee3f2247ec41a9788

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread Maor Kleinberger
Maor Kleinberger added the comment: Hey there, the PR was approved a week ago, is there a reason it is not merged yet? -- ___ Python tracker ___

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset 0687bdf5def13ddca09e854113c0eac0772afea0 by Miss Islington (bot) in branch '3.8': bpo-39517: Allow runpy.run_path() to accept path-like objects (GH-18699) https://github.com/python/cpython/commit/0687bdf5def13ddca09e854113c0eac0772afea0

[issue39891] [difflib] Improve get_close_matches() to better match when casing of words are different

2020-03-08 Thread brian.gallagher
brian.gallagher added the comment: I agree that there is an appeal to leaving any normalization to the application and that trying guess what people want is a tough hole -- I hadn't even considered what casing would mean in a general sense for Unicode. I'm not entirely convinced that this

[issue39831] Reference leak in PyErr_WarnEx()

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +18215 pull_request: https://github.com/python/cpython/pull/18858 ___ Python tracker ___

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +18214 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/18857 ___ Python tracker

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 2522db11df102be3baf25ce9e816ebe8ffdb7fcc by Terry Jan Reedy in branch 'master': bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801) https://github.com/python/cpython/commit/2522db11df102be3baf25ce9e816ebe8ffdb7fcc

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset ec61f53243a4455f41e37a5c645e668661952c28 by Miss Islington (bot) in branch '3.7': bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801) https://github.com/python/cpython/commit/ec61f53243a4455f41e37a5c645e668661952c28

[issue39852] IDLE: Goto should remove selection and update the status bar

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

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +18219 pull_request: https://github.com/python/cpython/pull/18862 ___ Python tracker

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread Steve Dower
Steve Dower added the comment: Nope, just that I apparently forgot to merge (or forgot to come back after CI had finished). Thanks for the reminder! -- nosy: -miss-islington ___ Python tracker

[issue39517] runpy calls open_code with Path object

2020-03-08 Thread Steve Dower
Steve Dower added the comment: New changeset 0911ea5c172264eaefa3efe4a1788159c160920d by Maor Kleinberger in branch 'master': bpo-39517: Allow runpy.run_path() to accept path-like objects (GH-18699) https://github.com/python/cpython/commit/0911ea5c172264eaefa3efe4a1788159c160920d

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The related issue is #39852. Since its PR-18801 fixed the status issue, I am returning this to the box replacement issue. -- ___ Python tracker

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-08 Thread SHANKAR JHA
Change by SHANKAR JHA : -- keywords: +patch pull_requests: +18213 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18851 ___ Python tracker ___

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +18218 pull_request: https://github.com/python/cpython/pull/18861 ___ Python tracker ___

[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-03-08 Thread Maor Kleinberger
Maor Kleinberger added the comment: Hey there, it's been more than a week since I pushed the last changes, can anyone review them? -- ___ Python tracker ___

[issue39885] IDLE right click should clear any selection

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

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-08 Thread SHANKAR JHA
Change by SHANKAR JHA : -- nosy: +shankarj67 nosy_count: 2.0 -> 3.0 pull_requests: +18208 pull_request: https://github.com/python/cpython/pull/18851 ___ Python tracker ___

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-08 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue, my change introduced a *new* issue. While trying to fix bpo-19466, work on PR 18848, I noticed that my commit eb4e2ae2b8486e8ee4249218b95d94a9f0cc513e introduced a race condition :-( The problem is that while the main thread is executing

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated the PR according to review comments. PyNumber_ToBase() now raises SystemError for unsupported base instead of crashing. unicode_eq() asserts that unicode strings are ready (it is only called for hashed strings and if we have a hash they should be

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 1.0 -> 2.0 pull_requests: +18220 pull_request: https://github.com/python/cpython/pull/18863 ___ Python tracker

[issue39902] dis.Bytecode objects should be comparable

2020-03-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Code objects themselves supports equality comparisons, >>> compile("print(1)", "", "eval") == compile("print(1)", "", >>> "eval") True So this patch basically compares the underlying code objects with 2 Bytecode specific attribute, first_line and

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18210 pull_request: https://github.com/python/cpython/pull/18848 ___ Python tracker ___

[issue39885] IDLE right click should clear any selection

2020-03-08 Thread miss-islington
miss-islington added the comment: New changeset b2e8240261aa879b8978d7add6dd1efc4318add1 by Miss Islington (bot) in branch '3.8': bpo-39885: IDLE context menu clears selection (GH-18859) https://github.com/python/cpython/commit/b2e8240261aa879b8978d7add6dd1efc4318add1 --

[issue39905] Cannot load sub package having a 3-dot relative import

2020-03-08 Thread Yon Ar Chall
New submission from Yon Ar Chall : Hi there ! I was trying to use importlib.util.spec_from_file_location() to import a nested package containing a 3-dot relative import. $ tree ~/myproj /home/yon/myproj └── mypkg ├── __init__.py └── subpkg ├── __init__.py ├──

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry Zackery, I did not know about this issue so I wrote different PR to fix this problem. And only after writing it I have found this issue. There are several differences between your PR and PR 18863. * SystemError is raised instead of ValueError

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +C API -Interpreter Core ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 14166 does not fix this issue. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue39831] Reference leak in PyErr_WarnEx()

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 89fabe51af27a16ae7174ad94921e3980e28 by Serhiy Storchaka in branch '3.7': [3.7] bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750). (GH-18765) https://github.com/python/cpython/commit/89fabe51af27a16ae7174ad94921e3980e28

[issue39862] Why are the union relationships not implemented by default for ≤ and ≥?

2020-03-08 Thread Géry
Géry added the comment: Thanks for the reference @Raymond. I could not find any mention of the union relationships for ≤ and ≥ though. Since they are always valid for Boolean values, in the same way that ≠ is always the complement of = for Boolean values and default implemented as such in

[issue39904] Move handling of one-argument call of type() from type.__new__() to type.__call__()

2020-03-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The builtin type() serves two functions: 1. When called with a single positional argument it returns the type of the argument. >>> type(1) 2. Otherwise it acts as any class when called -- creates an instance of this class (a type). It includes

[issue39904] Move handling of one-argument call of type() from type.__new__() to type.__call__()

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18209 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18852 ___ Python tracker

[issue19466] Clear state of threads earlier in Python shutdown

2020-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18212 pull_request: https://github.com/python/cpython/pull/18854 ___ Python tracker ___

[issue19466] Clear state of threads earlier in Python shutdown

2020-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48961/asyncio_gc.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18211 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18854 ___ Python tracker ___

[issue39798] Update and Improve README.AIX

2020-03-08 Thread Michael Felt
Michael Felt added the comment: Thanks for asking! Last December I was thinking about this - and what would be the best way to proceed. The reply I liked best suggested working on this - outside of CPython "bugfixes" - perhaps later moving bits into the core. So, motivated by your

[issue27115] IDLE goto should use query.Query subclass

2020-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since PR-18801 fixed the status issue, I am returning this to the box replacement issue. -- title: IDLE goto should always update status bar line & column -> IDLE goto should use query.Query subclass ___ Python

[issue39906] pathlib.Path: add `follow_symlinks` argument to `stat()` and `chmod()`

2020-03-08 Thread Barney Gale
New submission from Barney Gale : As of Python 3.3, `os.lstat()` and `os.lchmod()` are available as `os.stat(follow_symlinks=False)` and `os.chmod(follow_symlinks=False)`, but an equivalent change didn't make it into pathlib. I propose we add the `follow_symlinks` argument to `Path.stat()`

[issue39901] `pathlib.Path.owner()` and `group()` use `pwd` and `grp` modules directly

2020-03-08 Thread Barney Gale
New submission from Barney Gale : The implementations of `Path.owner()` and `Path.group()` directly import and use the `pwd` and `grp` modules. Given these modules provide information about the *local* system, I believe these implementations should instead live in `pathlib._NormalAccessor`

[issue39901] `pathlib.Path.owner()` and `group()` use `pwd` and `grp` modules directly

2020-03-08 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +18201 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18844 ___ Python tracker ___

[issue39638] Keep ASDL signatures for AST nodes

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2020-03-08 Thread Barney Gale
Barney Gale added the comment: I see no reason for the duplication, and I can point to one concrete bug affecting your re-implementation of `expanduser` that doesn't affect the original, i.e. that a `KeyError` is raised on Windows when `"USERNAME"` is not present in `os.environ`, whereas

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-08 Thread hai shi
Change by hai shi : -- keywords: +patch nosy: +shihai1991 nosy_count: 3.0 -> 4.0 pull_requests: +18202 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18845 ___ Python tracker

[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-03-08 Thread hai shi
hai shi added the comment: > I would prefer that codecs.lookup() and encodings.normalize_encoding() behave > the same. Either always ignore or always copy. How about calling `encodings.normalize_encoding() in codecs.normalizestring()` to keep same behavior?(I create PR18845) > Maybe we

[issue39682] pathlib.Path objects can be used as context managers

2020-03-08 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +18203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18846 ___ Python tracker ___

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-08 Thread Michael Felt
Michael Felt added the comment: The PR for 3.9 breaks AIX build (since https://buildbot.python.org/all/#/builders/119/builds/384) reporting the following: Traceback (most recent call last): File "/data/prj/python/python3-3.9/../git/python3-3.9/setup.py", line 69, in from

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-08 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +18204 pull_request: https://github.com/python/cpython/pull/18847 ___ Python tracker ___

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was discussed in issue19776. Having separate implementation we can avoid design flaws of os.path.expanduser(). -- ___ Python tracker

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I see no reason to change the current code. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36287] Make ast.dump() not output optional default fields

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 18843 solves this issue by setting None as class attributes for optional fields and attributes (like "kind" or "end_col_offset"). It is not so easy for fields like "type_ignores". They are mutable lists, so this approach cannot be applied to them. I

[issue36287] Make ast.dump() not output optional default fields

2020-03-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > It is not so easy for fields like "type_ignores". They are mutable lists, so > this approach cannot be applied to them. What about keeping ASDL signatures in the nodes (). If we know the type of a field (can be parsed in runtime) we can infer the default

[issue36287] Make ast.dump() not output optional default fields

2020-03-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: Related issue: issue 39638 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39889] Fix ast.unparse() for subscription by extended slices and tuples

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34822] Simplify AST for slices

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I did not know about your PR Batuhan and fixed this bug in issue39889. After fixing the bug in the current code PR 9605 only simplifies the code. So in this case the new code is not more complex than correctly written old code. --

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset eb4e2ae2b8486e8ee4249218b95d94a9f0cc513e by Victor Stinner in branch 'master': bpo-39877: Fix PyEval_RestoreThread() for daemon threads (GH-18811) https://github.com/python/cpython/commit/eb4e2ae2b8486e8ee4249218b95d94a9f0cc513e --

[issue34822] Simplify AST for slices

2020-03-08 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > Sorry, I did not know about your PR Batuhan and fixed this bug in issue39889. No problem. -- ___ Python tracker ___

[issue19466] Clear state of threads earlier in Python shutdown

2020-03-08 Thread STINNER Victor
STINNER Victor added the comment: The change has been reverted in 2014. I reopen the issue since using daemon thraeds became safer in Python 3.9. As soon as a daemon thread attempts to take the GIL, it does exit immediately. With the commit eb4e2ae2b8486e8ee4249218b95d94a9f0cc513e

[issue39877] Daemon thread is crashing in PyEval_RestoreThread() while the main thread is exiting the process

2020-03-08 Thread STINNER Victor
STINNER Victor added the comment: Ok, it should now be fixed. Let me try to revisit the old bpo-19466 issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2020-03-08 Thread Barney Gale
Barney Gale added the comment: The only design flaw mentioned in that thread is that `os.path.expanduser()` returns the input unchanged if expansion fails, which is not very pythonic. However, such a problem doesn't necessitate a rewrite of `os.path.expanduser()`. Checking `result[:1]` is

[issue19466] Clear state of threads earlier in Python shutdown

2020-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18205 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18848 ___ Python tracker ___

[issue19466] Clear state of threads earlier in Python shutdown

2020-03-08 Thread STINNER Victor
STINNER Victor added the comment: asyncio_gc.py: script to reproduce bpo-20526 (copied from there), but ported to Python 3.9 (replace asyncio.async with asyncio.ensure_future). Sadly, Python with PR 18848 does crash when running asyncio_gc.py if I press CTRL+c twice: * A thread does crash

[issue39891] [difflib] Improve get_close_matches() to better match when casing of words are different

2020-03-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: It looks like Brian is expecting some kind of normalization of the strings before they enter the function, e.g. convert to lowercase, remove extra whitespace, convert diacritics to regular letters, combinations of such normalizations, etc. Since both

[issue39902] dis.Bytecode objects should be comparable

2020-03-08 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : import dis >>> dis.Bytecode("print(1)") == dis.Bytecode("print(1)") False -- components: Library (Lib) messages: 363656 nosy: BTaskaya priority: normal severity: normal status: open title: dis.Bytecode objects should be comparable type: enhancement

[issue39902] dis.Bytecode objects should be comparable

2020-03-08 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18849 ___ Python tracker ___

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is very strange code in _elementtree.Element.__getstate__ which decrement references to elements of a list before decrementing a reference to the list itself. It happens only if creating a dict fails, so it is almost impossible to reproduce, but

[issue39903] Double decref in _elementtree.Element.__getstate__

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +18207 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18850 ___ Python tracker

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-08 Thread Antoine Pitrou
Change by Antoine Pitrou : -- stage: -> needs patch type: crash -> behavior versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 ___ Python tracker ___

[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-08 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset db283b32e7580741a8b6b7f27f616cc656634750 by Serhiy Storchaka in branch 'master': bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob. (GH-18499)

[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-03-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___