[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-28 Thread Rukchad Wongprayoon
Rukchad Wongprayoon added the comment: seems like it doesn't appear in the help func too -- ___ Python tracker ___ ___ Python-bugs-

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-28 Thread Rukchad Wongprayoon
Rukchad Wongprayoon added the comment: here's the example code parent/a.py ```py def multiply(): """multiply stuff""" return 69*420 ``` parent/another folder/b.py ```py import sys sys.path.append('..') import a a.multiply.__doc__ # None ``` -- _

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-28 Thread Rukchad Wongprayoon
Change by Rukchad Wongprayoon : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-28 Thread Rukchad Wongprayoon
New submission from Rukchad Wongprayoon : How to reproduce? 1. Make a random module with doc-string in the function 2. Make a python app in new folder (under the module folder) and import it by do ```py import sys sys.path.append("..") import ``` 3. then every function will don't have doc-st

[issue32658] Metacharacter (\) documentation suggestion

2022-03-28 Thread Stanley
Stanley added the comment: Mike, are you still working on this issue? -- nosy: +slateny ___ Python tracker ___ ___ Python-bugs-list

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 604d003ab4d1084ef828ebca1b28f2bf1b93c744 by Jelle Zijlstra in branch '3.10': [3.10] bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32171) https://github.com/python/cpython/commit/604d003ab4d1084ef828ebca1b28f2bf1b93c

[issue39971] [doc] Error in functional how-to example

2022-03-28 Thread Stanley
Change by Stanley : -- keywords: +patch nosy: +slateny nosy_count: 4.0 -> 5.0 pull_requests: +30250 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32172 ___ Python tracker

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +30249 pull_request: https://github.com/python/cpython/pull/32171 ___ Python tracker ___ __

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: New changeset 788154919c2d843a0a995994bf2aed2d074761ec by Dennis Sweeney in branch 'main': bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122) https://github.com/python/cpython/commit/788154919c2d843a0a995994bf2aed2d074761ec -- ___

[issue47031] math.nan should note that NANs do not compare equal to anything

2022-03-28 Thread Charlie Zhao
Change by Charlie Zhao : -- keywords: +patch pull_requests: +30248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32170 ___ Python tracker ___ ___

[issue47125] Explore hashlib use of the Windows Crypto API NG

2022-03-28 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett
Peter Lovett added the comment: Thanks Eric. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-03-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, they should update Python. A lot of work went in to fixing these issues, and won't be backported. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington
miss-islington added the comment: New changeset d2c6a4428d52c108f4b06dcd1bb86023541c60ce by Miss Islington (bot) in branch '3.9': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/d2c6a4428d52c108f4b06dcd1

[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett
Peter Lovett added the comment: I'm not getting the problem on 3.9.7 on Windows. Did get it on 3.7 (3.7.11?) on a different Windows machine last week. Not getting the problem on 3.10.4 The wrong line number is a problem for IDLE's syntax highlighter, that marks the first line as a Syntax Err

[issue31140] Insufficient error message with incorrect formated string literal

2022-03-28 Thread Peter Lovett
Change by Peter Lovett : -- nosy: +PeterL777 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +30247 pull_request: https://github.com/python/cpython/pull/32169 ___ Python tracker ___ __

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +30246 pull_request: https://github.com/python/cpython/pull/32168 ___ Python tracker ___ __

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +30245 pull_request: https://github.com/python/cpython/pull/32167 ___ Python tracker _

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower
Steve Dower added the comment: New changeset 0dfabf9b4a58b835b61fc3d17784d4746f677e56 by Steve Dower in branch '3.10': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/0dfabf9b4a58b835b61fc3d17784d4746f67

[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I mean that the code sample above from attrs doesn't properly update the closure for wrapped methods, such as those created by @functools.cache, or any other arbitrary decorator that creates a wrapper function. Example (with Python 3.9.4 and attrs 21.4.0):

[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: Jelle Zijlstra: > I believe the attrs code wouldn't work if a method is decorated with a > decorator that wraps the original function, such as @functools.cache. What do you mean by "wouldn't work"? Do you mean that the semantics of "copy_class()" should be b

[issue47143] Add types.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: The stdlib types module looks like a better place for such new function, rather than the functools module. The types module documentation starts with: "This module defines utility functions to assist in dynamic creation of new types." https://docs.python.org

[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-28 Thread Steve Dower
Steve Dower added the comment: It's in! Any new issues probably won't be found until the next release, so I'll close this and we can open new bugs. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-28 Thread Steve Dower
Steve Dower added the comment: New changeset bad86a621af61f383b9f06fe4a08f66245df99e2 by Steve Dower in branch 'main': bpo-46566: Add new py.exe launcher implementation (GH-32062) https://github.com/python/cpython/commit/bad86a621af61f383b9f06fe4a08f66245df99e2 -- _

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I believe the attrs code wouldn't work if a method is decorated with a decorator that wraps the original function, such as @functools.cache. -- nosy: +JelleZijlstra ___ Python tracker

[issue41571] Implement thread-related commands in pdb

2022-03-28 Thread Cebtenzzre
Change by Cebtenzzre : -- nosy: +cebtenzzre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-03-28 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.11, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45099] asyncio.Task's documentation says that loop arg is removed when it's not

2022-03-28 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +30244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32166 ___ Python tracker ___ _

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: Looks like there may be a new plan where we solve a smaller problem (overloads) in the context of typing only. -- ___ Python tracker ___ _

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___

[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-b

[issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset

2022-03-28 Thread John Paul Adrian Glaubitz
John Paul Adrian Glaubitz added the comment: > Awesome, thanks! I'll give it a try later today or tomorrow. I have applied the patch and the problem seems to have been fixed. \o/ -- ___ Python tracker _

[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I suspect backporting the fix to older versions won't be possible. Yeah, very much the case unfortunately -- ___ Python tracker ___

[issue39805] Copying functions doesn't actually copy them

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-47143 "Add functools.copy_class() which updates closures". -- nosy: +vstinner ___ Python tracker ___ ___

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington
miss-islington added the comment: New changeset 2bcbc3113dee6c35631595ec0d5ee3a8dd2a2ddd by Miss Islington (bot) in branch '3.10': bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131) https://github.com/python/cpython/commit/2bcbc3113dee6c35631595ec0d5ee3a8dd2a2ddd ---

[issue29270] ctypes: fail to create a _ctypes._SimpleCData subclass using a closure like calling super() without arguments

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: CreateSwappedType() is an helper function used by the _ctypes.PyCSimpleType type. Python script reproducing this ctypes bug: --- class PyCSimpleType(type): def __new__(cls, name, bases, dct): print(f"PyCSimpleType: create {name} class") cel

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington
miss-islington added the comment: New changeset f84fb55659079bbc99d4cd0441dc13ab07ac3dcf by Miss Islington (bot) in branch '3.9': bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131) https://github.com/python/cpython/commit/f84fb55659079bbc99d4cd0441dc13ab07ac3dcf

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: Note: Implementing a metaclass in Python is hard, it's easy to mess up with closures: see bpo-29270 "ctypes: fail to create a _ctypes._SimpleCData subclass using a closure like calling super() without arguments". type.__new__() is called twice on the same ty

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +30242 pull_request: https://github.com/python/cpython/pull/32164 ___ Python tracker _

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +30243 pull_request: https://github.com/python/cpython/pull/32165 ___ Python tracker ___ __

[issue27929] asyncio.AbstractEventLoop.sock_connect broken for AF_BLUETOOTH

2022-03-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 5c30388f3c586ba2f33e349e22e5949cb92de621 by Vincent Bernat in branch 'main': bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131) https://github.com/python/cpython/commit/5c30388f3c586ba2f33e349e22e5949cb92de621 -

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Maciej Górski
Maciej Górski added the comment: Thanks for helping me with my very first python contribution! @eric.smith @lys.nikolaou -- ___ Python tracker ___

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @macgors! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___ __

[issue47129] Improve errors messages in f-string syntax errors

2022-03-28 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 7b44ade018cfe6f54002a3cee43e8aa415d4d635 by Maciej Górski in branch 'main': bpo-47129: Add more informative messages to f-string syntax errors (32127) https://github.com/python/cpython/commit/7b44ade018cfe6f54002a3cee43e8aa415d4d635 --

[issue47137] MemoryError in codeop.compile_command

2022-03-28 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +pablogsal title: MemoryError -> MemoryError in codeop.compile_command versions: +Python 3.8 ___ Python tracker ___ _

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: Looks like that fixed it, per https://github.com/python/cpython/pull/32134. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel
Irit Katriel added the comment: Thank you, Serhiy! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Irit Katriel
Irit Katriel added the comment: New changeset 15ba8167d78f9e66bd5b07c4e5cbb0463460310a by Irit Katriel in branch 'main': bpo-26120: make pydoc exclude __future__ imports from the data block of the module (GH-30888) https://github.com/python/cpython/commit/15ba8167d78f9e66bd5b07c4e5cbb0463460

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +30241 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/32163 ___ Python tracker ___ _

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: New changeset 4c116f716bd1c174d6530b9a7a5ed3863927a109 by Eric Snow in branch 'main': bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162) https://github.com/python/cpython/commit/4c116f716bd1c174d6530b9a7a5ed3863927

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: I used 9 in deepfreeze.py to signify "immortal object". It has been copied by others (small integers are essentially immortal too). I wasn't too sure that the refcount wouldn't go below zero if the interpreter is repeatedly finalized and reinitiali

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower
Steve Dower added the comment: New changeset 295114dcd32b3aad5453e5e15e9e1befa0e5ca01 by Steve Dower in branch 'main': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/295114dcd32b3aad5453e5e15e9e1befa0e5

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +30240 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32162 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Julien Palard
Julien Palard added the comment: Hum, and why 9? I am probably missing something obvious but 1 should be enough to ensure the value never hits 0. Except for refcount bugs obviously, but I don't think this is the right reason? -- ___ Python

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Steve Dower
Change by Steve Dower : -- nosy: +steve.dower nosy_count: 4.0 -> 5.0 pull_requests: +30239 status: pending -> open pull_request: https://github.com/python/cpython/pull/32161 ___ Python tracker ___

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset dae09c2b819c2683ad870733451c050b59c3eb93 by Miss Islington (bot) in branch '3.9': [3.9] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140) (GH-32156) https://github.com/python/cpython/commit/dae09c2b819c2683ad

[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Ethan Furman
Change by Ethan Furman : -- nosy: +ethan.furman versions: +Python 3.11 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In general, anything changing the python syntax needs to be discussed in the mailing lists and it may likely need a PEP as well, even if is minor. This is because this has consequences rippling the whole ecosystem, from IDEs to other parsers and this

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
Patrick Reader added the comment: Ok, will do, but what is the bar for a feature to need to go to the mailing lists first? I thought as this was a relatively minor one it wouldn't need to. Is it just because it's an actual syntax change? -- ___ Py

[issue43818] Email does not apply policy to multipart messages with defects

2022-03-28 Thread Martin Dengler
Martin Dengler added the comment: Possible related to https://github.com/python/cpython/pull/32137 and https://bugs.python.org/issue43323 -- ___ Python tracker ___ __

[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh
Sam Ezeh added the comment: I've submitted the above patch. I created the ZipFile.mkdir function, created the necessary tests and wrote the documentation. I think it is ready for review. -- Added file: https://bugs.python.org/file50705/sam_ezeh.patch

[issue4833] Explicit directories for zipfiles

2022-03-28 Thread Sam Ezeh
Change by Sam Ezeh : -- keywords: +patch pull_requests: +30238 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32160 ___ Python tracker _

[issue43224] Add support for PEP 646

2022-03-28 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +30237 pull_request: https://github.com/python/cpython/pull/32159 ___ Python tracker ___ ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 1e3132b1c3ebff8d28a6dd353bf217cb97c41e81 by Miss Islington (bot) in branch '3.9': bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32145) https://github.com/python/cpython/commit/1e3132b1c3ebff8d28a6dd353bf217cb97c41e8

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
Eric Snow added the comment: There's probably something racy with make. See: https://github.com/python/cpython/runs/5712538599?check_suite_focus=true#step:10:1147 -- ___ Python tracker

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington
miss-islington added the comment: New changeset 5944807b09717d43bb017f700e8c451dd07199ed by Miss Islington (bot) in branch '3.10': [3.10] bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866) (GH-32140) https://github.com/python/cpython/commit/5944807b09717d43bb017f700e8c4

[issue44493] Missing terminated NUL in the length of sockaddr_un

2022-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +30236 pull_request: https://github.com/python/cpython/pull/32156 ___ Python tracker ___ __

[issue45100] Improve help() by making typing.overload() information accessible at runtime

2022-03-28 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue47147] Allow `return yield from`

2022-03-28 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Please, submit an email to python-ideas or python-dev first as this need to be discussed in the mailing lists. -- ___ Python tracker

[issue47147] Allow `return yield from`

2022-03-28 Thread Patrick Reader
New submission from Patrick Reader : I would like to be able to use a `yield from` expression in a `return` statement without parentheses, as a small quality of life tweak, i.e.: return yield from gen instead of return (yield from gen) I think this makes sense, since `yield from` ca

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily
Ned Deily added the comment: Thanks, everyone! Merged for 3.10.5, 3.9.13, and 3.7.14. I'll leave the issue in pending state until merged for 3.8.14. -- resolution: -> fixed stage: patch review -> resolved status: open -> pending ___ Python tracker

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily
Ned Deily added the comment: New changeset 25c40bd994aa0da75283c5efdd71ba26c734b67e by Hugo van Kemenade in branch '3.9': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32153) https://github.com/python/cpython/commit/25c40bd994aa0da75283c5efdd71ba26c734b67e ---

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily
Ned Deily added the comment: New changeset 9194a7b8990a0feec1209b1e5694df3bf42906d8 by Hugo van Kemenade in branch '3.10': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32154) https://github.com/python/cpython/commit/9194a7b8990a0feec1209b1e5694df3bf42906d8 --

[issue47138] Pin Jinja2 to fix docs build

2022-03-28 Thread Ned Deily
Ned Deily added the comment: New changeset 25f00bfb264a3197ac91c41cdec15036fd8401f1 by m-aciek in branch '3.7': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32111) https://github.com/python/cpython/commit/25f00bfb264a3197ac91c41cdec15036fd8401f1 -- _

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-28 Thread Eric Snow
New submission from Eric Snow : The "Check if generated files are up to date" GitHub check for PRs has been failing recently. It may also impact local usage of "make regen-all". Example: https://github.com/python/cpython/runs/5719012664 This may be related to gh-32061. -- assignee:

[issue26120] pydoc: move __future__ imports out of the DATA block

2022-03-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Module objects are not shown in the help unless they are submodules of the specified module, even if they are imported with the star import. With this precedence I think it is okay to exclude the __future__ annotations as well. --

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: > The same problem exists at the function level: see bpo-39805: "Copying > functions doesn't actually copy them". See also bpo-14369 "make function __closure__ writable". -- ___ Python tracker

[issue14369] make function __closure__ writable

2022-03-28 Thread STINNER Victor
Change by STINNER Victor : -- title: make __closure__ writable -> make function __closure__ writable ___ Python tracker ___ ___ Pyth

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: bpo-32176 "Zero argument super is broken in 3.6 for methods with a hacked __class__ cell" added test_code.test_closure_injection() and fixed the CO_NOFREE flag in the code object constructor (types.CodeType). -- _

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: > If I understand correctly, a cell content can be modified since Python 3.7: > since commit 64505a1f6c0af4574e17e823b27ffe24eca44df5 of bpo-30486 Moreover, it's possible to create a cell object since Python 3.8, commit df8d2cde63c865446468351f8f648e1c7bd451

[issue47144] Allow setting __classcell__

2022-03-28 Thread Douglas Raillard
Douglas Raillard added the comment: EDIT: empty_list() is a class method of List, not ContainerBase -- ___ Python tracker ___ ___ P

[issue47144] Allow setting __classcell__

2022-03-28 Thread Douglas Raillard
Douglas Raillard added the comment: > Would bpo-47143 "Add functools.copy_class() which updates closures" solve > your use case? This looks like a similar issue indeed. If I'm able to copy a class "cleanly" (as defined in this other thread), that may solve the problem (hard to tell precisel

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: See also the types.new_class() function: https://docs.python.org/dev/library/types.html#types.new_class Oh, I didn't know this function! -- ___ Python tracker _

[issue29944] Argumentless super() fails in classes constructed with type()

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-47143 "Add functools.copy_class() which updates closures". -- nosy: +vstinner ___ Python tracker ___ ___

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: > * old fixed attrs issue: https://github.com/python-attrs/attrs/issues/102 > * attrs issue with Python 3.11: > https://github.com/python-attrs/attrs/issues/907 > * dataclasses issues with slots=True: https://bugs.python.org/issue46404 Similar bug without att

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: The same problem exists at the function level: see bpo-39805: "Copying functions doesn't actually copy them". For example, copy.deepcopy(func) returns func unchanged if it's a function. Example: --- import copy def make_closure(): closure = [] def a

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-28 Thread Larry Hastings
New submission from Larry Hastings : I've maintained my own topological sort class for a while now. The API I came up with (or was it Tim and I?) was adopted for graphlib.TopologicalSort(). Some of my method names are slightly different, but the APIs are so similar, I can do a little renami

[issue47125] Explore hashlib use of the Windows Crypto API NG

2022-03-28 Thread Steve Dower
Steve Dower added the comment: Did a basic test (with timeit and a work-internal library I already have) and the native functionality is *slightly* faster than OpenSSL. But I think it's worthwhile anyway, to help reduce our dependency on OpenSSL. -- _

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: In the Python C API, PEP 384 added PyType_FromSpec(). There is also PyStructSequence_NewType(). PEP 3121 proposed PyType_Copy() but it was never implemented: see bpo-3760. But in C, closures are implemented using a module state, or previously using a global

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: If I understand correctly, a cell content can be modified since Python 3.7: since commit 64505a1f6c0af4574e17e823b27ffe24eca44df5 of bpo-30486: bpo-30486: Allow setting cell value (#1840) Antoine Pitrou created bpo-30486 for cloudpickle: "There are use

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: More recent copy.copy() change: commit 5c1c3b4f197c57952760be37d77d73669284a607 of bpo-11480: Issue #11480: Fixed copy.copy to work with classes with custom metaclasses. +try: +issc = issubclass(cls, type) +except TypeError: # cls is not

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: pickle.dump(x) checks if x is a type since commit f048a8f6d79173cc1da1bf12c60ae06fea36762c (March 2002) of bpo-494904: Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with a metaclass, reported by Dan Parisien. +if issubclas

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: The pickle module doesn't copy a type but gets it from its module. The Python implementation is pickle._Pickler.save_type() which calls pickle._Pickler.save_global(). The cloudpickle module doesn't copy types neither: same behavior than pickle. Example: ---

[issue47143] Add functools.copy_class() which updates closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: It seems like the copy module doesn't support copying a class. copy.deepcopy(cls) doesn't copy a class but returns its argument, the class unchanged. -- ___ Python tracker ___

[issue46404] RFE: @dataclasses.dataclass(slots=True) doesn't support methods using closures

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45520: "Frozen dataclass deep copy doesn't work with __slots__" which is related but a different issue. -- ___ Python tracker _

[issue47144] Allow setting __classcell__

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: > This is unfortunate as there is a use-case for such trickery: if the method > of a class A are only used to be grafted onto another class B (monkey > patching), A.__classcell__ should be set to B so that super() works as > expected. Would you elaborate yo

  1   2   >