[issue45971] calendar module issue

2021-12-02 Thread Vedran Čačić
Vedran Čačić added the comment: https://docs.python.org/3/library/calendar.html#module-calendar The functions and classes defined in this module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. https://en.wikipedia.org/wiki/Proleptic_Gregoria

[issue45971] calendar module issue

2021-12-02 Thread Venkata Raman S S V
New submission from Venkata Raman S S V : In Ubuntu 20.04.3 LTS - OS Type: 64-bit. $ cal sep 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 $ python3 Python 3.8.10 (default, Sep 28 2021

[issue45970] Py_NewInterpreter causes bogus fatal error along the failure path

2021-12-02 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +28124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29900 ___ Python tracker _

[issue45970] Py_NewInterpreter causes bogus fatal error along the failure path

2021-12-02 Thread Jason Haslam
New submission from Jason Haslam : The failure cleanup of `Py_NewInterpreter` causes a bogus fatal error on the call to `PyThreadState_Delete`. The error is about deleting the current thread state. The saved thread state should be swapped back in *before* deleting the new thread state. -

[issue45582] Rewrite getpath.c in Python

2021-12-02 Thread Eric Snow
Eric Snow added the comment: Hurray! Thanks, Steve! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue45969] When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable

2021-12-02 Thread Steve Dower
Steve Dower added the comment: Unless someone can find an authoring bug under Tools/msi, I don't think we can do anything about this. We rely on the built-in Windows support for adding and removing these variables, and if that's broken, we can't do anything with our current setup. I really

[issue45966] Error in Multiplication

2021-12-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations -- nosy: +steven.daprano ___ Python tracker ___

[issue45582] Rewrite getpath.c in Python

2021-12-02 Thread Steve Dower
Steve Dower added the comment: It's done! Those were some of the hardest memory leaks I've had to track down, but it should be clear now. As I mentioned in the commit message, this change attempts to preserve every known quirk. However, I think these ought to be streamlined across platforms

[issue45582] Rewrite getpath.c in Python

2021-12-02 Thread Steve Dower
Steve Dower added the comment: New changeset 99fcf1505218464c489d419d4500f126b6d6dc28 by Steve Dower in branch 'main': bpo-45582: Port getpath[p].c to Python (GH-29041) https://github.com/python/cpython/commit/99fcf1505218464c489d419d4500f126b6d6dc28 --

[issue36338] urlparse of urllib returns wrong hostname

2021-12-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > ansible-5.0.0 Reported upstream (it's a single file, used for tests): https://github.com/ansible/ansible/issues/76452 > gevent-21.8.0 It's https://github.com/gevent/gevent/tree/master/src/greentest directory which contains subsets of the Python test suit

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: According to a code search in the PyPI top 5000 projects: the source code of 21 projects contains "import asyncore", "import asynchat" or "import smtpd": * ansible-5.0.0 * cassandra-driver-3.25.0 * django-extensions-3.1.5 * eth_abi-2.1.1 * eth-account-0.5.6 *

[issue36338] urlparse of urllib returns wrong hostname

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: It produces a deprecation warning on 3.11, but still does the same. >>> urlparse('http://benign.com\[attacker.com]').hostname :1: DeprecationWarning: invalid escape sequence '\[' 'attacker.com' -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11 -

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Ali Amin-Nejad
Ali Amin-Nejad added the comment: Thanks Serhiy, the output is: ['StateSpec'] [''] -- ___ Python tracker ___ ___ Python-bugs-list

[issue24966] shutil.get_terminal_size() throws ValueError if stdout is detached, no fallback

2021-12-02 Thread Eryk Sun
Eryk Sun added the comment: This was fixed in 3.5. -- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix shutil.get_terminal_size() to catch AttributeError ___ Python tracker

[issue14856] argparse: creating an already defined subparsers does not raises an exception

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: The open patch deprecates overriding the parser with add_parser, but it does not add the new set_parser method that Steven suggested. -- nosy: +iritkatriel stage: patch review -> type: -> enhancement versions: +Python 3.11 -Python 3.3 ___

[issue24966] shutil.get_terminal_size() throws ValueError if stdout is detached, no fallback

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: I am unable to reproduce this, was it fixed? >>> import os, sys, codecs, shutil >>> sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) >>> os.get_terminal_size() os.terminal_size(columns=79, lines=36) >>> shutil.get_terminal_size((200, 30)) os.terminal_

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: This is a bug in elementtree - the caller should own a reference to the dict during the entire PyDict_GetItem call. We won't add the refcount change you propose because it's not free and this is a hot function. The test in your patch doesn't fail for me (I t

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ali. It confirms my guess, but it is still not clear why we get a Tcl_Obj rather of None or empty string. Please examine what is the output of the following code: res = root.tk.call('wm', 'overrideredirect', root._w, True) print([res.typename]) p

[issue45959] Teach pprint about dict views

2021-12-02 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue45969] When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable

2021-12-02 Thread Luca
New submission from Luca : This issue is related to: https://bugs.python.org/issue3561 and: https://bugs.python.org/issue45968 When installing Python under Windows, if the "Add Python 3.x to PATH" option is flagged, the following two folders are added to the PATH environment variable: %U

[issue45949] Provide pure-Python implementation of Programs/_freeze_module for cross building

2021-12-02 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +28123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29899 ___ Python tracker ___

[issue45968] Windows installer should add also "%USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts" folder to the PATH environment variable

2021-12-02 Thread Luca
New submission from Luca : This issue is related to https://bugs.python.org/issue3561 When installing Python under Windows, if the "Add Python 3.x to PATH" option is flagged, the following two folders are added to the PATH environment variable: %USERPROFILE%\AppData\Local\Programs\Python\Pytho

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Ali Amin-Nejad
Ali Amin-Nejad added the comment: @serhiy.storchaka I tried that command, the returned value is not an empty string, it is an object of type . However including that line in my script immediately after creating the `root` object actually fixes the problem - no more error and the button appea

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue45967] Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block

2021-12-02 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +gpolo, serhiy.storchaka title: treeview -> Tkinter.ttk.Treeview does not clear after opening and reopening another using same code block ___ Python tracker

[issue45933] Illegal Instrution (Core Dumped)

2021-12-02 Thread Tom E
Tom E added the comment: Well I updated the kernel to 5.15.0 and used my succeeding 3.9.9 build and now it works. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker _

[issue45967] treeview

2021-12-02 Thread Harold Meneley
New submission from Harold Meneley : treeview does not clear after opening and reopening another using same code block, You can see leftover treeview after clear and reopen. Simply clikc on file > view all, clear > clear, and then search > author and you should see problem -- compone

[issue45916] documentation link error

2021-12-02 Thread miss-islington
miss-islington added the comment: New changeset f6648e229edf07a1e4897244d7d34989dd9ea647 by Miss Islington (bot) in branch '3.10': bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896) https://github.com/python/cpython/commit/f6648e229edf07a1e4897244d7d34989dd9ea647

[issue44637] Quoting issue on header Reply-To and other address headers

2021-12-02 Thread Alexander Mohr
Alexander Mohr added the comment: btw my work-around was to set maxheaderlen=sys.maxsize, worked for AWS SES at least -- ___ Python tracker ___ __

[issue45916] documentation link error

2021-12-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +28122 pull_request: https://github.com/python/cpython/pull/29898 ___ Python tracker ___ __

[issue45916] documentation link error

2021-12-02 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28121 pull_request: https://github.com/python/cpython/pull/29897 ___ Python tracker _

[issue45916] documentation link error

2021-12-02 Thread Zachary Ware
Zachary Ware added the comment: New changeset 9f2f7e42269db74a89fc8cd74d82a875787f01d7 by Zachary Ware in branch 'main': bpo-45916: Use HTTPS link for The Perils of Floating Point (GH-29896) https://github.com/python/cpython/commit/9f2f7e42269db74a89fc8cd74d82a875787f01d7 -- __

[issue45916] documentation link error

2021-12-02 Thread Zachary Ware
Change by Zachary Ware : -- keywords: +patch pull_requests: +28120 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29896 ___ Python tracker ___ ___

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Ned Deily
Ned Deily added the comment: I am not able to reproduce this failure with various macOS Pythons from python.org that are built with either Tk 8.6.8 or 8.6.12. Perhaps it's an issue with the Tk provided with your Miniconda Python? Besides answering Serhiy's question, it would be helpful to k

[issue45920] make doctest fails

2021-12-02 Thread Ned Deily
Ned Deily added the comment: > So I guess the only way to actually get make doctest to work is if the > virtual env uses the version of python in main. Is there anyway to do that? By default, the Doc/Makefile "venv" target uses the first "python3" it finds on your shell PATH to build the ven

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread Christian Heimes
Christian Heimes added the comment: New changeset a31173c5ceb1708df687f942d714bdecae7cb759 by Christian Heimes in branch 'main': bpo-40280: Update what's new (GH-29893) https://github.com/python/cpython/commit/a31173c5ceb1708df687f942d714bdecae7cb759 --

[issue45897] Frozen dataclasses with slots raise TypeError

2021-12-02 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +28119 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29895 ___ Python tracker ___ ___

[issue45897] Frozen dataclasses with slots raise TypeError

2021-12-02 Thread Alex Waygood
Alex Waygood added the comment: You get the same error if you subclass a frozen dataclass, then try to set an attribute that is not one of the superclass's __slots__: ``` >>> @dataclass(slots=True, frozen=True) ... class Point: ... x: int ... y: int ... ... >>> class Subclass(Po

[issue45535] Enum's dir() does not contain inherited members

2021-12-02 Thread Ethan Furman
Ethan Furman added the comment: New changeset b2afdc95cc8f4e9228148730949a43cef0323f15 by Alex Waygood in branch 'main': bpo-45535: Improve output of Enum ``dir()`` (GH-29316) https://github.com/python/cpython/commit/b2afdc95cc8f4e9228148730949a43cef0323f15 -- _

[issue45966] Error in Multiplication

2021-12-02 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug, it's a function of the IEEE-754 double precision floating point type that python uses. See: https://docs.python.org/3/tutorial/floatingpoint.html You might want to consider the decimal module, although that will also have limitations.

[issue45966] Error in Multiplication

2021-12-02 Thread Mukesh
New submission from Mukesh : I've tried various methods to multiply some numbers but every time I get an unsatisfying result when I try to evaluate 48*1.2 or 41*1.2 or 51*1.4 etc. For example if I run import math NUM3 = eval(input("Your Input: ")) print(NUM3) Output: Your Input: 51*1.4 71.39

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > mypy-0.910 I proposed a fix: https://github.com/python/mypy/pull/11652 -- ___ Python tracker ___ _

[issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions

2021-12-02 Thread Matej Cepl
Matej Cepl added the comment: And no there is no other patch touching pdb (or pdb tests). -- ___ Python tracker ___ ___ Python-bugs

[issue45965] fileinput.input(path, inplace=True) crashes for valid filename with 252-255 characters

2021-12-02 Thread Jamil Raichouni
New submission from Jamil Raichouni : import fileinput from pathlib import Path path = Path(252 * "x") path.write_text("") for line in fileinput.input(path, inplace=True): pass raises an OSError: [Errno 63] File name too long for perfectly valid (yes, quite long) file names. Reason: Int

[issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions

2021-12-02 Thread Matej Cepl
Matej Cepl added the comment: > Which system are you running on? Happens when packaging Python 3.10 for openSUSE/Linux. -- ___ Python tracker ___

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > Naked-0.1.31 Affected code is only code generated by Cython: the project only has to regenerated code with a recent Cython version. -- ___ Python tracker ___

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > pysha3-1.0.2 This module must not be used on Python 3.6 and newer which has a built-in support for SHA-3 hash functions. Example: $ python3.6 Python 3.6.15 (default, Sep 5 2021, 00:00:00) >>> import hashlib >>> h=hashlib.new('sha3_224'); h.update(b'hello

[issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: This is not failing on our buildbots, so the fix is probably not right. Which system are you running on? -- nosy: +iritkatriel ___ Python tracker ___

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > frozendict-2.1.1 If I understand correctly, this module is compatible with the PEP 674, it only has to copy Python 3.11 header files once Python 3.11 is released, to port the project to Python 3.11. Incompatable code is not part of the "frozendict" implem

[issue45476] [C API] PEP 674: Disallow using macros as l-value

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: > * zstd-1.5.0.2: src/python-zstd.c I proposed a fix upstream: https://github.com/sergey-dryabzhinsky/python-zstd/pull/70 -- ___ Python tracker ___

[issue23819] test_asyncio fails when run under -O

2021-12-02 Thread Kumar Aditya
Change by Kumar Aditya : -- keywords: +patch pull_requests: +28118 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29894 ___ Python tracker

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28117 pull_request: https://github.com/python/cpython/pull/29893 ___ Python tracker ___

[issue45964] 3.10.0 tests fail in test_pdb_breakpoints_preserved_across_interactive_sessions

2021-12-02 Thread Matej Cepl
New submission from Matej Cepl : When running tests with 3.10.0 test_pdb_breakpoints_preserved_across_interactive_sessions test fails: [ 842s] == [ 842s] FAIL: test_pdb_breakpoints_preserved_across_interactive_sessions (tes

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread Ethan Smith
Change by Ethan Smith : -- pull_requests: +28116 pull_request: https://github.com/python/cpython/pull/29892 ___ Python tracker ___ _

[issue45963] Embed interpreter frame in generator.

2021-12-02 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +28115 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29891 ___ Python tracker ___ ___

[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-12-02 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +28114 pull_request: https://github.com/python/cpython/pull/29890 ___ Python tracker ___

[issue45963] Embed interpreter frame in generator.

2021-12-02 Thread Mark Shannon
New submission from Mark Shannon : Currently, the InterpreterFrame for a generator is allocated on the heap separately from the generator. This means that 2 allocations are needed to create a generator, and an extra indirection is needed to get from the generator to the frame. By embedding th

[issue45725] test_freeze doesn't clean up after itself

2021-12-02 Thread Mark Shannon
Mark Shannon added the comment: This seems to be fixed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25403] urllib.parse.urljoin is broken in python 3.5

2021-12-02 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread Christian Heimes
Christian Heimes added the comment: New changeset cb8f491f46e262549f6c447b31625cab7c20a60a by Christian Heimes in branch 'main': bpo-40280: Optimize ints and and startup on wasm (GH-29887) https://github.com/python/cpython/commit/cb8f491f46e262549f6c447b31625cab7c20a60a --

[issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges

2021-12-02 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue45954] Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges

2021-12-02 Thread STINNER Victor
STINNER Victor added the comment: New changeset a6c3b0faa1d55e36539caf19bd3bcf1dea12df84 by Victor Stinner in branch 'main': bpo-45954: Rename PyConfig.no_debug_ranges to code_debug_ranges (GH-29886) https://github.com/python/cpython/commit/a6c3b0faa1d55e36539caf19bd3bcf1dea12df84 -

[issue45961] [doc] Missing documentation for wait_for module

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: If you mean this: https://pypi.org/project/wait-for/ then it is not part of the python library. If you mean asyncio's wait_for, it's documented here: https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for -- nosy: +iritkatriel resolutio

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-12-02 Thread Sam Bull
Sam Bull added the comment: It has been addressed, PR should be merged this week: https://github.com/python/cpython/pull/28149 Like most open source projects, it just needed someone to actually propose a fix. -- ___ Python tracker

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not raise an error if it contradicts language spec? -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread miss-islington
miss-islington added the comment: New changeset cb2b3c8d3566ae46b3b8d0718019e1c98484589e by Christian Heimes in branch 'main': bpo-40280: Emscripten has no support for subprocesses (GH-29872) https://github.com/python/cpython/commit/cb2b3c8d3566ae46b3b8d0718019e1c98484589e -- nosy:

[issue45962] Clarify that PyModule_AddString{Constant, Macro} use utf-8

2021-12-02 Thread Antony Lee
New submission from Antony Lee : The documentation for PyModule_AddString{Constant,Macro} does not specify the encoding used. Checking the source shows that these simply call PyUnicode_FromString and thus use utf8, but perhaps this could be made explicit. -- assignee: docs@python com

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the result of root.tk.call('wm', 'overrideredirect', root._w, True) ? Is it not an empty string? -- nosy: +serhiy.storchaka ___ Python tracker __

[issue45961] [doc] Missing documentation for wait_for module

2021-12-02 Thread Alex
New submission from Alex : I wondering why there is no documentation for the synchronous module "wait_for": site-packages/wait_for/__init__.py It's just missing or there are some reason? I didn't see any deprecation info about this module. -- messages: 407516 nosy: Alex-Izquierdo pri

[issue45960] bullseye arm/v7 time.time() Operation not permitted

2021-12-02 Thread Sascha Hesse
New submission from Sascha Hesse : Given a docker container on raspbian 10.11 based on bullseye: docker run --rm -it --entrypoint sh python:3.10-slim time.time() fails with error # python Python 3.10.0 (default, Nov 18 2021, 00:56:34) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-12-02 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28113 pull_request: https://github.com/python/cpython/pull/29887 ___ Python tracker ___