[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-10 Thread Matthias Bussonnier
New submission from Matthias Bussonnier : This page: https://docs.python.org/3/distutils/sourcedist.html Is the first result on google for "python sdist", but does not mention that all but tar.gz and zip are supported by PyPI. -- assignee: docs@python components: Documentation

[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-10 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- keywords: +patch pull_requests: +28269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30043 ___ Python tracker

[issue46043] Python Launcher Not Opening Files.

2021-12-10 Thread Nicholas Bond
New submission from Nicholas Bond : Python launcher opens its preferences and no terminal or Tkinter application opens. It appears as something was launched because for a fraction of a second, I see a window and then the icon glides back to its position on the desktop. However, python files

[issue45929] extend json.tool --json-lines to ignore empty rows

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: I agree with Serhiy that in general the fact that json.tool crashes here is useful: similarly to an exception in Python code, it can inform the user that some data they feed to json.tool is invalid. At the same time, I find it a bit obnoxious that the current

[issue23469] Delete Misc/*.wpr files

2021-12-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since the files have effectively been abandoned, I think removing them should be considered now. The three files in /Misc, for wing-3, 4, and 5, are python-wing3.wpr python-wing4.wpr python-wing5.wpr The current version of Wing is 8.1.1. The files were

[issue23469] Delete Misc/*.wpr files

2021-12-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: url: https://github.com/python/cpython/blob/main/Misc/python-wing5.wpr -- ___ Python tracker ___

[issue46044] Update distutils documentation to say PyPI only accepts tar.gz and zip.

2021-12-10 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46013] Confusing period in object.__hash__ doc

2021-12-10 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-10 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40358] pathlib's relative_to should behave like os.path.relpath

2021-12-10 Thread C.A.M. Gerlach
C.A.M. Gerlach added the comment: For the record, requested [on Discourse](https://discuss.python.org/t/how-to-go-on-with-a-tiny-improvement-idea-for-pathlib/12472) as well, with a fairly similar proposal. -- nosy: +CAM-Gerlach ___ Python tracker

[issue21964] inconsistency in list-generator comprehension with yield(-from)

2021-12-10 Thread Irit Katriel
Irit Katriel added the comment: I think this issue was resolved by now. This is what happens on 3.11: >>> l = ["abc", range(3)] >>> g = [(yield from i) for i in l] File "", line 1 SyntaxError: 'yield' inside list comprehension >>> g2 = ((yield from i) for i in l) File "", line 1

[issue27062] `inspect` doesn't have `__all__`

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 810c1769f1c24ed907bdf3cc1086db4e602a28ae by Kumar Aditya in branch 'main': bpo-27062: add `__all__` to inspect module (GH-30003) https://github.com/python/cpython/commit/810c1769f1c24ed907bdf3cc1086db4e602a28ae -- nosy: +lukasz.langa

[issue9504] signal.signal/signal.alarm not working as expected

2021-12-10 Thread Irit Katriel
Irit Katriel added the comment: I'm unable to reproduce this on 3.11 on a Mac. Has it been fixed? -- nosy: +iritkatriel status: open -> pending ___ Python tracker ___

[issue42114] Documentation of ctypes.CDLL does not correspond to code

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f8eebb0db720cd81fb736d9cbfd16faf2ec68b53 by Miss Islington (bot) in branch '3.9': bpo-42114: ctypes documentation: fix winmode parameter default value (GH-29976) (GH-30038)

[issue46014] functools.singledispatch does not support Union types

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: Support added as an enhancement in Python 3.11. Thanks, Yurii! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue13236] unittest needs more flush calls

2021-12-10 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +28265 pull_request: https://github.com/python/cpython/pull/30039 ___ Python tracker

[issue13236] unittest needs more flush calls

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 83fa1291fd0a25216a4a9e990f423682fda67cbe by Serhiy Storchaka in branch '3.10': [3.10] bpo-13236: Flush the output stream more often in unittest (GH-29864) (GH-29929)

[issue46014] functools.singledispatch does not support Union types

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: This is awesome! Should a note be added to the functools documentation mentioning the new feature? (Genuine question — I'm not sure whether it's necessary myself.) -- ___ Python tracker

[issue45859] test_collections has a wrong test in case _itemgetter is not available

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 7c5b01b5101923fc38274c491bd55239ee9f0416 by Miss Islington (bot) in branch '3.8': bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29710)

[issue43749] venv module does not copy the correct python exe

2021-12-10 Thread Steve Dower
Steve Dower added the comment: We'd also need to update the launcher to launch the executable with its name, which it currently doesn't do. I was looking at this recently for some other reason. -- ___ Python tracker

[issue19737] Documentation of globals() and locals() should be improved

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue13236] unittest needs more flush calls

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d55a03e02e69fb7f639998de71ed3f44c2f4f999 by Miss Islington (bot) in branch '3.9': [3.10] bpo-13236: Flush the output stream more often in unittest (GH-29929) (GH-30039)

[issue43749] venv module does not copy the correct python exe

2021-12-10 Thread Eryk Sun
Change by Eryk Sun : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.11 -Python 3.8 ___ Python tracker ___

[issue46042] Error range of "duplicate argument" SyntaxErrors is too big

2021-12-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for the catch Carl! > I can try to fix this. Awesome, I will wait for the PR! -- ___ Python tracker ___

[issue45635] Tidy up error handling in traceback.c / python run.c

2021-12-10 Thread Irit Katriel
Irit Katriel added the comment: New changeset 0fe104fce7da709edddb701baa2249e3275db1fd by Irit Katriel in branch 'main': bpo-45635: refactor print_exception_recursive into smaller functions to standardize error handling (GH-30015)

[issue27062] `inspect` doesn't have `__all__`

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset e1e3f648ad6ab467356d2d14e1d208583c1a76c6 by Miss Islington (bot) in branch '3.10': bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29758) https://github.com/python/cpython/commit/e1e3f648ad6ab467356d2d14e1d208583c1a76c6

[issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 5f622f1d5c5425ed1e992da6611edfb486a9bf7c by Miss Islington (bot) in branch '3.9': bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) (GH-29759) https://github.com/python/cpython/commit/5f622f1d5c5425ed1e992da6611edfb486a9bf7c

[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-10 Thread Steve Dower
Steve Dower added the comment: I'm going to need a decent amount of time to learn all of these components, because I never use this OS, Tox, nor virtualenv :) I'll try and get to it, but don't hold your breath. Luckily, Modules/getpath.py is much easier to follow and modify than the old

[issue19737] Documentation of globals() and locals() should be improved

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 1f7000808e8385e2a29ffd0ef6aac9a6139d3d92 by Miss Islington (bot) in branch '3.10': bpo-19737: Improved the documentation for globals (GH-29823) (GH-30041) https://github.com/python/cpython/commit/1f7000808e8385e2a29ffd0ef6aac9a6139d3d92

[issue19737] Documentation of globals() and locals() should be improved

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 9299e3a39c3b1dd7d5db0d88080249c2dab3070f by Miss Islington (bot) in branch '3.9': bpo-19737: Improved the documentation for globals (GH-29823) (GH-30042) https://github.com/python/cpython/commit/9299e3a39c3b1dd7d5db0d88080249c2dab3070f

[issue9504] signal.signal/signal.alarm not working as expected

2021-12-10 Thread STINNER Victor
STINNER Victor added the comment: https://www.python.org/dev/peps/pep-0475/ changed deeply how Python handles signals. Python now tries to restart syscalls interrupted by signals (EINTR). A Python function only raises an exception if the Python signal handler raises an exception.

[issue20559] urllib/http fail to sanitize a non-ascii url

2021-12-10 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13236] unittest needs more flush calls

2021-12-10 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Serhiy! ✨  ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue22239] asyncio: nested event loop

2021-12-10 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: +kumaraditya303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45723] Improve and simplify configure.ac checks

2021-12-10 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +28254 pull_request: https://github.com/python/cpython/pull/30029 ___ Python tracker ___

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +functools' singledispatch does not support GenericAlias ___ Python tracker ___ ___

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: -functools' singledispatch does not support GenericAlias ___ Python tracker ___ ___

[issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed)

2021-12-10 Thread Jacob Hayes
Jacob Hayes added the comment: Thanks for the tips! I've been using this patch in my own code in a early imported `__init__.py`: ``` from graphlib import TopologicalSorter from types import GenericAlias if not hasattr(TopologicalSorter, "__class_getitem__"): # pragma: no cover

[issue46029] "ValueError: Invalid isoformat string" from a valid string

2021-12-10 Thread Eric V. Smith
Eric V. Smith added the comment: fromisoformat() is only designed to parse the output of isformat(). See issue 35829 for further discussion. I'm going to close this issue as a duplicate. -- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open -> closed

[issue18349] argparse usage should preserve () in metavars such as range(20)

2021-12-10 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', type=int, choices=range(20), >>> metavar='range(0,20)') _StoreAction(option_strings=[], dest='foo', nargs=None, const=None, default=None, type=,

[issue46037] logging.config.dictConfig with disable_existing_loggers set, also disables loggers in configuration

2021-12-10 Thread vladmihaisima
New submission from vladmihaisima : When invoking logging.config.dictConfig - if a logger was previously disabled (for example by a call to "logging.config.dictConfig({'version': 1})") - the loggers specified in the dictionary will not be enabled. Documentation at

[issue43749] venv module does not copy the correct python exe

2021-12-10 Thread Mitchell Hentges
Mitchell Hentges added the comment: Hey, can I request a backport of this change? For my use case, 3.9+ would be great, but going back to 3.7 should be viable? I trust your judgement :) I'll happily create the PRs for the backport, but it looks like the bug has to be indicated as "needs

[issue21461] Recognize -pthread

2021-12-10 Thread Thomas Klausner
Change by Thomas Klausner : -- pull_requests: +28257 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30032 ___ Python tracker ___

[issue31370] Remove support for threads-less builds

2021-12-10 Thread Brett Cannon
Brett Cannon added the comment: This has unfortunately turned out to be a blocker on getting WASI support as there's not direct threading support in WebAssembly. -- nosy: +brett.cannon ___ Python tracker

[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-12-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: related: https://www.python.org/dev/peps/pep-0490/ (rejected pep to auto-chain from C API calls) I don't come across it often, but I did just review some code at work today where the chain might have been nice (though not a big deal). -- nosy:

[issue4733] Add a "decode to declared encoding" version of urlopen to urllib

2021-12-10 Thread Daniel Diniz
Daniel Diniz added the comment: As Victor notes, this is a controversial issue. And I'll add that the need for this feature seems not to have been brought up up in over a decade. So I'm closing this. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue46033] Duplicated sentence in for statement documentation

2021-12-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +28249 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30025 ___ Python tracker

[issue45723] Improve and simplify configure.ac checks

2021-12-10 Thread Christian Heimes
Christian Heimes added the comment: New changeset 74b23c97cd5e178970a199066795cf0561f46b72 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Normalise configure user communication (GH-30024) https://github.com/python/cpython/commit/74b23c97cd5e178970a199066795cf0561f46b72 --

[issue46033] Duplicated sentence in for statement documentation

2021-12-10 Thread Vedran Čačić
Vedran Čačić added the comment: How about adding the words "More precisely," at the beginning of the second sentence? -- nosy: +veky ___ Python tracker ___

[issue40821] os.getlogin() not working

2021-12-10 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46035] mimetypes.guess_type returns deprecated mimetype application/x-javascript

2021-12-10 Thread milahu
New submission from milahu : deprecated mimetype? per rfc4329, the technical term is "unregistered media type" https://datatracker.ietf.org/doc/html/rfc4329#section-3 related https://stackoverflow.com/a/9664327/10440128 https://github.com/danny0838/PyWebScrapBook/issues/53 quick fix ```py

[issue45723] Improve and simplify configure.ac checks

2021-12-10 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +28251 pull_request: https://github.com/python/cpython/pull/30026 ___ Python tracker ___

[issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter

2021-12-10 Thread Miro Hrončok
Miro Hrončok added the comment: git bisect gives: https://github.com/python/cpython/commit/ea251806b8d11b30d2182af1e589caf88acf -- ___ Python tracker ___

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-10 Thread STINNER Victor
STINNER Victor added the comment: I marked bpo-46034 as a duplicate: setting a class "__init__" attribute doesn't update properly its tp_init slot. update_slot() of Objects/typeobject.c only uses a fast pointer comparison since both strings are interned, but the test fails if the two

[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2021-12-10 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: I ran into this problem in PyPy today, preparing a patch for CPython too (without looking at the old one). -- nosy: +Carl.Friedrich.Bolz ___ Python tracker

[issue37971] Wrong trace with multiple decorators (linenumber wrong in frame)

2021-12-10 Thread Carl Friedrich Bolz-Tereick
Change by Carl Friedrich Bolz-Tereick : -- pull_requests: +28252 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30027 ___ Python tracker ___

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: The above traceback is because the `isinstance(list[str], type)` check at Lib/functools.py:848 evaluates to `True`. Related: #45665. -- ___ Python tracker

[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Indeed, seems my original hunch is correct. Steve, could you take a look when you have some time? -- ___ Python tracker ___

[issue46023] Modules/makesetup generated rules ignore *disabled*

2021-12-10 Thread Christian Heimes
Christian Heimes added the comment: New changeset 036bbb1d1b6156a1a72c40e9f907f302505085bc by Christian Heimes in branch 'main': bpo-46023: Fix makesetup handling of disabled rule (GH-30001) https://github.com/python/cpython/commit/036bbb1d1b6156a1a72c40e9f907f302505085bc --

[issue45654] Freeze the runpy module.

2021-12-10 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 4.0 -> 5.0 pull_requests: +28253 pull_request: https://github.com/python/cpython/pull/30028 ___ Python tracker

[issue45654] Freeze the runpy module.

2021-12-10 Thread Christian Heimes
Christian Heimes added the comment: I noticed that the types module is only used for ModuleType. PR GH-30028 gets rid of 205 kB object code: 205K Python/deepfreeze/types.o -- ___ Python tracker

[issue46030] socket module add couple of FreeBSD constants

2021-12-10 Thread David CARLIER
Change by David CARLIER : -- nosy: +devnexen -dcarlier ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46000] NetBSD curses compatibility

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 040f9f9c48f4e74e851d850275aa9e050a04d0c6 by Miss Islington (bot) in branch '3.9': bpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023) https://github.com/python/cpython/commit/040f9f9c48f4e74e851d850275aa9e050a04d0c6

[issue32683] isinstance is calling ob.__getattribute__ as a fallback instead of object.__class__.__get__

2021-12-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: The plot thickens. I was wrong to say that type() always and only looks at the "real" underlying type of the instance. type() does look at __class__ as well. But only sometimes. >>> class A: ... __class__ = int ... >>> type(A()) >>> a = A() >>>

[issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter

2021-12-10 Thread Miro Hrončok
New submission from Miro Hrončok : Hello, based on some bug reports reported in: - https://github.com/GrahamDumpleton/mod_wsgi/issues/729 - https://github.com/poljar/weechat-matrix/issues/293 - https://bugzilla.redhat.com/show_bug.cgi?id=2030621 I have isolated the following reproducer that

[issue46035] mimetypes.guess_type returns deprecated mimetype application/x-javascript

2021-12-10 Thread milahu
milahu added the comment: patch https://github.com/milahu/cpython/commit/8a50633bb1b0c3e39fbe2cd467bb34a839ad068f -- ___ Python tracker ___

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: It would be well worth it to improve the error message, however: ``` >>> from functools import singledispatch >>> @singledispatch ... def func(arg): ... raise NotImplementedError ... >>> @func.register ... def _(arg: list[str]): ... print('Got a list

[issue46000] NetBSD curses compatibility

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Thomas for your contribution. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11, Python 3.9 ___ Python tracker

[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong

2021-12-10 Thread Ned Batchelder
Ned Batchelder added the comment: git bisect also identifies that commit as the first bad: 99fcf1505218464c489d419d4500f126b6d6dc28 is the first bad commit commit 99fcf1505218464c489d419d4500f126b6d6dc28 Author: Steve Dower Date: Fri Dec 3 00:08:42 2021 + bpo-45582: Port

[issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter

2021-12-10 Thread STINNER Victor
STINNER Victor added the comment: I mark this issue as a duplicate of bpo-46006. It's not exactly the same issue, but the root cause is the same: in some functions, Python use fast pointer comparisons when two strings are interned, but this now fails if two interned strings belong to two

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-10 Thread STINNER Victor
STINNER Victor added the comment: Attachd cmp_interned_strings.patch fix _PyUnicode_EqualToASCIIId() and update_slot() for subinterpreters. I will create a PR once we agree if it's required to support subinterpreters there, and if there is no better (faster) option. For update_slot(), one

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2021-12-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +3.10regression nosy: +pablogsal priority: normal -> release blocker ___ Python tracker ___

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Alex Waygood
Alex Waygood added the comment: #46032 is related to this issue. -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list

[issue46036] Single-phase initialized modules gets initialized multiple times in 3.10.0

2021-12-10 Thread Daniel
New submission from Daniel : The documentation (https://docs.python.org/3/c-api/init.html#c.Py_NewInterpreter) states: For modules using single-phase initialization, e.g. PyModule_Create(), the first time a particular extension is imported, it is initialized normally, and a (shallow) copy

<    1   2