[issue42269] Add ability to set __slots__ in dataclasses

2020-11-10 Thread Eric V. Smith
Eric V. Smith added the comment: It would figure it out automatically. See https://github.com/ericvsmith/dataclasses/blob/master/dataclass_tools.py for a decorator that already does this. I'll have a PR ready soon, I hope. -- ___ Python tracker

[issue15034] Document best practices for exceptions

2020-11-10 Thread Vedran Čačić
Vedran Čačić added the comment: Terry: of course, if a method is not overridden, there's no need to call super()'s method, since the only thing it would do is call the same thing that would be called without overriding. But of course, if Exception's __init__ does anything, then super()

[issue40932] subprocess docs should warn of shlex use on Windows

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset f9a8386e44a695551a1e54e709969e90e9b96bc4 by Ammar Askar in branch 'master': bpo-40932: Note security caveat of shlex.quote on Windows (GH-21502) https://github.com/python/cpython/commit/f9a8386e44a695551a1e54e709969e90e9b96bc4 --

[issue39411] pyclbr rewrite using AST

2020-11-10 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset fa476fe13255d0360f18528e864540d927560f66 by Batuhan Taskaya in branch 'master': bpo-39411: pyclbr rewrite on AST (#18103) https://github.com/python/cpython/commit/fa476fe13255d0360f18528e864540d927560f66 --

[issue42301] Add function to exploit heapq structure to locate an index of element

2020-11-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as declined for the reasons listed in the PR comments. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2020-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyModule_AddObject() has unique weird design, it is easy to misuse, and most code misuse it, but fixing it would break the code which uses it correctly. I did not see any problems with PyTuple_GetItem(). -- ___

[issue42269] Add ability to set __slots__ in dataclasses

2020-11-10 Thread Josh Rosenberg
Josh Rosenberg added the comment: Is the plan to allow an argument to auto-generate __slots__, or would this require repeating the names once in __slots__, and once for annotations and the like? -- ___ Python tracker

[issue42269] Add ability to set __slots__ in dataclasses

2020-11-10 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39931] Global variables are not accessible from child processes (multiprocessing.Pool)

2020-11-10 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-11-10 Thread hai shi
Change by hai shi : -- pull_requests: +22132 pull_request: https://github.com/python/cpython/pull/23235 ___ Python tracker ___ ___

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 95ce7cd0a64e7f4739af2d1c158ef69b6980f12a by Victor Stinner in branch 'master': bpo-1635741: Fix typo in PyModule_AddObjectRef() doc (GH-23234) https://github.com/python/cpython/commit/95ce7cd0a64e7f4739af2d1c158ef69b6980f12a --

[issue1487481] Could BIND_FIRST be removed on HP-UX?

2020-11-10 Thread Irit Katriel
Irit Katriel added the comment: Should we close this as out of date or is there anything that can still be done on it? -- nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue3461] smtplib does not fully support IPv6 in EHLO

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue1479255] Fix building with SWIG's -c++ option set in setup.py

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -3rd party, Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: > If you want to work only with non-borrowed references, (...) This is not my goal here. My goal is to reduce the risk of memory leaks. -- ___ Python tracker

[issue6103] Static library (libpythonX.Y.a) installed in incorrect location

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: In bpo-1635741, I added PyModule_AddObjectRef() (commit 8021875bbcf7385e651def51bc597472a569042c): https://docs.python.org/dev/c-api/module.html#c.PyModule_AddObjectRef "Similar to PyModule_AddObject() but don't steal a reference to the value on success."

[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +22131 pull_request: https://github.com/python/cpython/pull/23234 ___ Python tracker ___

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 78ba7c69ada2f7eefd4e3ea375337d78dc2ce721 by kj in branch 'master': bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227) https://github.com/python/cpython/commit/78ba7c69ada2f7eefd4e3ea375337d78dc2ce721 --

[issue42294] [C API] Add new C functions with more regular reference counting like PyTuple_GetItemRef()

2020-11-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +22130 pull_request: https://github.com/python/cpython/pull/23227 ___ Python tracker ___

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: The main drawback of rewriting Modules/getpath.c as Lib/_getpath.py (and removing getpath.c) is that PyConfig_Read() could no longer compute the Python Path Configuration. It would return an "empty" path configuration. --

[issue42140] asyncio.wait function creates futures set two times

2020-11-10 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for the change and for the discussion to everybody involved. The PR makes sense and I've already merged it. -- ___ Python tracker

[issue42140] asyncio.wait function creates futures set two times

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset 33922cb0aa0c81ebff91ab4e938a58dfec2acf19 by Miss Islington (bot) in branch '3.9': bpo-42140: Improve asyncio.wait function (GH-22938) https://github.com/python/cpython/commit/33922cb0aa0c81ebff91ab4e938a58dfec2acf19 --

[issue42314] Incorrect documentation entry for venv

2020-11-10 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset f8bea0a44d718296a249bdb766b8dbc92f38e8df by Zackery Spytz in branch '3.9': [3.9] bpo-4bpo-42314: Fix the documentation for venv --upgrade-deps (GH-22113) (GH-23232) https://github.com/python/cpython/commit/f8bea0a44d718296a249bdb766b8dbc92f38e8df

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Hummm, I think the gains of having the .o over the .a are very very small as you can almost recreate anything you want with the .o using the .a and a small initialization function unless I am missing something. --

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: > bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) Nice! It will be simpler to use PyType_GetSlot() in an extension with the limited C API, without having to care if the type is a static type or a heap type. --

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: The Fedora package of Python doesn't build the static libpython for 10 years (patch added at 2010-01-18): https://src.fedoraproject.org/rpms/python3.9/blob/master/f/00111-no-static-lib.patch libpython3.10.a (static) is around 15 MB and libpython3.10.so

[issue42140] asyncio.wait function creates futures set two times

2020-11-10 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +22129 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23233 ___ Python tracker ___

[issue42140] asyncio.wait function creates futures set two times

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset 7e5ef0a5713f968f6e942566c78bf57ffbef01de by Diogo Dutra in branch 'master': bpo-42140: Improve asyncio.wait function (GH-22938) https://github.com/python/cpython/commit/7e5ef0a5713f968f6e942566c78bf57ffbef01de -- nosy: +miss-islington

[issue42273] Using LazyLoader leads to AttributeError

2020-11-10 Thread Kevin Keating
Kevin Keating added the comment: One possible solution here would be to update the documentation at https://github.com/python/cpython/blob/master/Doc/library/importlib.rst#implementing-lazy-imports to either note the limitation or to modify the lazy_import function so that it adds the

[issue42273] Using LazyLoader leads to AttributeError

2020-11-10 Thread Kevin Keating
Kevin Keating added the comment: Brett, what do you mean by "the way import works"? Is the difference between using LazyLoader and using a normal import intentional? -- status: -> open ___ Python tracker

[issue42273] Using LazyLoader leads to AttributeError

2020-11-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon resolution: not a bug -> status: closed -> ___ Python tracker ___ ___

[issue42273] Using LazyLoader leads to AttributeError

2020-11-10 Thread Brett Cannon
Brett Cannon added the comment: The way import works, -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42315] `python -m` semantics conflict with `__file__`'s being optional

2020-11-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42232] mmap module add Darwin specific madvise options

2020-11-10 Thread Ronald Oussoren
New submission from Ronald Oussoren : Thanks for the PR. The reason I haven't reviewed the PR yet is that I need to check the SDK headers to see if the patch is complete. -- versions: +Python 3.10 ___ Python tracker

[issue42225] Tkinter hangs or crashes when displaying astral chars

2020-11-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've filed Issue42318 about the surrogate pairs error I mention in msg380552. -- ___ Python tracker ___

[issue42318] [tkinter] surrogate pairs in Tcl/Tk string when pasting an emoji in a text widget

2020-11-10 Thread Ronald Oussoren
New submission from Ronald Oussoren : As mentioned in msg380552: I get an SyntaxError with message "utf-8' codec can't encode characters in position 7-12: surrogates not allowed." when I paste a smiley emoji in an IDLE interactive shell and try to execute that line, for example using: >>>

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: The way sys.prefix is calculated on macOS ensures that the correct sys.prefix is calculated even if you copy the binary to a different location. That's functionality I don't want to drop. -- ___ Python tracker

[issue15034] Document best practices for exceptions

2020-11-10 Thread Irit Katriel
Irit Katriel added the comment: There are examples in the tutorial where super().__init__ is not called, like here: https://docs.python.org/3/tutorial/errors.html#user-defined-exceptions -- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2,

[issue4655] during Python installation, setup.py should not use .pydistutils.cfg

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset a13b26cac1519dad7bbc8651de7b826df7389d75 by Hai Shi in branch 'master': bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) https://github.com/python/cpython/commit/a13b26cac1519dad7bbc8651de7b826df7389d75 -- nosy:

[issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Neil Schemenauer
Neil Schemenauer added the comment: I think the comments are correct in that it is used to create a new statically linked interpreter that includes a user provided extension module. We could include python.o inside the libpythonXX.a file but then I think it breaks if you are embedding

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Michael Ferguson
Michael Ferguson added the comment: > For example, when I run the test exec on my macOS system, it is clear that > the python3 being invoked is not the venv one but a different python3 > altogether that shows up earlier on PATH. In the test case I am interested in, PATH is not set to the

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

2020-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: The PR entirely removed the note that a slot's value "May not be NULL". In fact, only tp_doc may be NULL. AFAIK, the restriction is still there for other slots. Can that note be added back? -- status: closed -> open

[issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format

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

[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 by Victor Stinner in branch 'master': bpo-42260: Fix _PyConfig_Read() if compute_path_config=0 (GH-23220) https://github.com/python/cpython/commit/ace3f9a0ce7b9fe8ae757fdd614f1e7a171f92b0 --

[issue42085] Add dedicated slot for sending values

2020-11-10 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 1e996c3a3b51e9c6f1f4cea8a6dbcf3bcb865060 by Vladimir Matveev in branch 'master': bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)

[issue42085] Add dedicated slot for sending values

2020-11-10 Thread Yury Selivanov
Yury Selivanov added the comment: Vladimir, please do a follow up PR documenting Py_TPFLAGS_HAVE_AM_SEND. -- ___ Python tracker ___

[issue1598083] Top-level exception handler writes to stdout unsafely

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue35560] format(float(123), "00") causes segfault in debug builds

2020-11-10 Thread Ned Deily
Ned Deily added the comment: New changeset dae5d728bc3f1d4039b64e4ec3a9036fd5d19587 by Miss Islington (bot) in branch '3.6': bpo-35560: Remove assertion from format(float, "n") (GH-11288) (GH-23231) https://github.com/python/cpython/commit/dae5d728bc3f1d4039b64e4ec3a9036fd5d19587

[issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format

2020-11-10 Thread Ned Deily
Ned Deily added the comment: New changeset a63234c49b2fbfb6f0aca32525e525ce3d43b2b4 by Serhiy Storchaka in branch '3.6': [3.6] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23118) https://github.com/python/cpython/commit/a63234c49b2fbfb6f0aca32525e525ce3d43b2b4 --

[issue42103] [security] DoS (MemError via CPU and RAM exhaustion) when processing malformed Apple Property List files in binary format

2020-11-10 Thread Ned Deily
Ned Deily added the comment: New changeset 225e3659556616ad70186e7efc02baeebfeb5ec4 by Serhiy Storchaka in branch '3.7': [3.7] bpo-42103: Improve validation of Plist files. (GH-22882) (#23117) https://github.com/python/cpython/commit/225e3659556616ad70186e7efc02baeebfeb5ec4 --

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that the same is true for python3 outside of a venv, it does not use argv[0] to locate says.prefix (for framework builds). That’s intentional. -- ___ Python tracker

[issue42297] [argparse] Bad error message formatting when using custom usage text

2020-11-10 Thread paul j3
paul j3 added the comment: We could look into using a different more compact 'prog' for these error messages. Currently the subparser 'prog' uses the main prog plus positionals plus the subparser name. The goal is to construct a subparser usage that reflects required input. This is

[issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left

2020-11-10 Thread Ravi Chityala
Ravi Chityala added the comment: Hello All In math and physics we typically use terms clockwise and anti-clockwise and not right and left for rotation. This change will make it easy for kids to learn the terms that they will eventually use in math and physics anyway. The change I am

[issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple

2020-11-10 Thread Dominik V.
New submission from Dominik V. : Due to caching of `__getitem__` for generic types, the order of arguments as returned by `get_args` might be different for Union: ```python >>> from typing import List, Union, get_args >>> get_args(get_args(List[Union[int, str]])[0]) (, ) >>>

[issue42267] Python 3.9 broken installer

2020-11-10 Thread JackSkellington
JackSkellington added the comment: Thank you for everything. -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42314] Incorrect documentation entry for venv

2020-11-10 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +22128 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23232 ___ Python tracker

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: The difference in behaviour is because the executable does not look at argv[0] to find its location on macOS. Your trick therefore doesn't work. I prefer the current behaviour. What I don't understand is *why* you want to do this. If I read your report

[issue35560] format(float(123), "00") causes segfault in debug builds

2020-11-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: This bug was introduced into the Python 3.6.8 "bugfix" release. https://github.com/python/cpython/pull/23231 will fix it if anyone needs that on modern 3.6. -- nosy: +gregory.p.smith versions: +Python 3.6 ___

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Ned Deily
Ned Deily added the comment: Sorry, I didn't intend to criticize what you are trying to do, I just not sure I understand it so I could give a more helpful response. It seems to me that an explanation for the difference in behavior you are seeing between your Ubuntu and macOS setups is in

[issue42273] Using LazyLoader leads to AttributeError

2020-11-10 Thread E. Paine
E. Paine added the comment: In short, the module isn't being added to the package's namespace because we are directly modifying sys.modules (hence why the behaviour would be the same if we imported using `import foo.b` as `from foo import b`). I personally prefer to use the metapath instead

[issue35560] format(float(123), "00") causes segfault in debug builds

2020-11-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +22127 pull_request: https://github.com/python/cpython/pull/23231 ___ Python tracker ___

[issue6899] Base.replace breaks tree

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3 ___ Python tracker ___

[issue16926] setup.py register does not always respect --repository

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue11728] mbox parser incorrect behaviour

2020-11-10 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue42309] BUILD: AIX-64-bit segmentation fault

2020-11-10 Thread Michael Felt
Michael Felt added the comment: On a different server, different compiler (xlc-v13, mine is xlc-v11) it gets past this point. So, perhaps it is a compiler issue. As the second system is missing many 64-bit libraries - still cannot build 64-bit Python-3.9. Low priority - imho. --

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Michael Ferguson
Michael Ferguson added the comment: > I'm not sure I understand exactly what you are trying to accomplish but one > potential issue strikes me: you may need to ensure you are execing the right > python binary by including a more complete path: That does not help with the original problem I

[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"

2020-11-10 Thread Xtrem532
Change by Xtrem532 : -- nosy: +Xtrem532 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types

2020-11-10 Thread Dylan Van Assche
Change by Dylan Van Assche : -- keywords: +patch pull_requests: +22126 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23230 ___ Python tracker

[issue42316] Walrus Operator in list index

2020-11-10 Thread Brandon
New submission from Brandon : Reading the PEP 572 document I don't see anything stating that Walrus operator in list indexes must be enclosed in parenthesis. Minimal Example: ''' In [1]: a = list(range(10)) In [2]: idx = -1 In [3]: a[idx := idx +1] File "", line 1 a[idx := idx +1]

[issue42313] rstrip removes the trailing `e`s.

2020-11-10 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: For 3.9+, you could do exactly what you want with .removesuffix (/.removeprefix) methods; >>> test = "external_e_object" >>> test.removesuffix("_object") 'external_e' -- nosy: +BTaskaya ___ Python

[issue42315] `python -m` semantics conflict with `__file__`'s being optional

2020-11-10 Thread William Schwartz
New submission from William Schwartz : `python -m mod` sets `sys.argv[0]` to the `mod.__file__` according to https://docs.python.org/3.9/using/cmdline.html#cmdoption-m > If ["-m"] is given, the first element of sys.argv will be the full path to > the module file (while the module file is

[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-11-10 Thread hai shi
Change by hai shi : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42311] It seems like ctypes code makes truncated pointer values in x64(access violations)

2020-11-10 Thread Eryk Sun
Eryk Sun added the comment: A function that returns a pointer needs an explicit `restype` set. A function parameter that's a pointer generally requires `argtypes` to be set. For example: _testdll.GetPointer.restype = ctypes.c_void_p _testdll.SetPointer.argtypes = (ctypes.c_void_p,)

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset 14a343a9af27725faeab8b330a6d66ff573704d3 by Miss Islington (bot) in branch '3.9': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/14a343a9af27725faeab8b330a6d66ff573704d3

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset c745b36ee3786fabc9231a43c085218df27dcd47 by Miss Islington (bot) in branch '3.8': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/c745b36ee3786fabc9231a43c085218df27dcd47

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2020-11-10 Thread William Schwartz
Change by William Schwartz : -- nosy: +William.Schwartz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- nosy: -giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Ned Deily
Ned Deily added the comment: > Embedding? The example I cited from the docs was for extending Python by building a new interpreter using an installed Python, not embedding. Dunno how often that is done, though. Perhaps on Windows where it was more difficult to build an interpreter from

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread miss-islington
Change by miss-islington : -- keywords: +patch pull_requests: +22124 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23228 ___ Python tracker ___

[issue42314] Incorrect documentation entry for venv

2020-11-10 Thread Adrien
New submission from Adrien : Hello, I am reading the venv official documentation available here: https://docs.python.org/3/library/venv.html If I pick English - 3.9.0, it's stated: "Changed in version 3.8: Add --upgrade-deps option to upgrade pip + setuptools to the latest on PyPI" When I

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +22125 pull_request: https://github.com/python/cpython/pull/23229 ___ Python tracker ___

[issue42014] shutil.rmtree calls onerror with different function than failed

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset e59b2deffde61e5641cabd65034fa11b4db898ba by Michal Čihař in branch 'master': bpo-42014: shutil.rmtree: call onerror with correct function (GH-22585) https://github.com/python/cpython/commit/e59b2deffde61e5641cabd65034fa11b4db898ba --

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > But... does any user really build Python manually after Python is installed? > The Python build system couldn't handle that as part of the regular build? > Maybe using a new configure --enable-static flag? Embedding? But they should use the .a not

[issue42313] rstrip removes the trailing `e`s.

2020-11-10 Thread Zachary Ware
Zachary Ware added the comment: See https://docs.python.org/3/library/stdtypes.html#str.rstrip The `{l,r,}strip` methods remove all characters contained in the passed-in string; `"aabbccddeeffgg".rstrip("gfe") == "aabbccdd"` -- nosy: +zach.ware resolution: -> not a bug stage: ->

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Ned Deily
Ned Deily added the comment: I'm not sure I understand exactly what you are trying to accomplish but one potential issue strikes me: you may need to ensure you are execing the right python binary by including a more complete path: $ (exec -a test-venv/bin/python3 test-venv/bin/python3 -c

[issue42111] Make the xxlimited module an example of best extension module practices

2020-11-10 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +22123 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23226 ___ Python tracker ___

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Michael Ferguson
Michael Ferguson added the comment: In the above I meant to include the `bin` path in the examples, but it does not matter for the behavior (exec -a test-venv/bin/python3 python3 -c 'import sys; print(sys.executable); print (sys.prefix);') --

[issue42313] rstrip removes the trailing `e`s.

2020-11-10 Thread Athul R
New submission from Athul R : rstrip removes the trailing `e`s. i = "external_e_object" i = i.rstrip('_object') print(i) """ It should have printed `external_e` but it prints only `external_`. """ It happens only when I user rstrip("_object") not for other strings. #

[issue42312] sys.prefix is set incorrectly on Mac OS X

2020-11-10 Thread Michael Ferguson
New submission from Michael Ferguson : I have been trying to create a wrapper script for `python3` in a venv that behaves similarly to a symbolic link. I am able to use `exec -a` in bash to run `python3` with `argv[0]` set to the wrapper script. This allows it to function similarly to the

[issue42311] It seems like ctypes code makes truncated pointer values in x64(access violations)

2020-11-10 Thread Taekab Park
New submission from Taekab Park : It seems like ctypes code makes truncated pointer values in x64(access violations) windows10 x64 options : __cdecl(/Gd) tested : python(x64) 3.2, 3.4, 3.6, 3.9 dll build with vc++2015 The test code is simple. Simply loaded TestDll and called function and

[issue42171] Add PEP 573 to the stable ABI

2020-11-10 Thread Petr Viktorin
Petr Viktorin added the comment: Added. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-11-10 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7 ___ Python tracker ___

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: Oh! I managed to build a static Python with the following commands: cd /opt/pymaster/lib/python3.10/config-3.10-x86_64-linux-gnu gcc -static -o ~/python-static python.o -L. $(./python-config.py --libs --embed) I get a static binary: $ ldd ~/python-static

[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset 109c17315af124b25853c248f4a9bf00f03036f6 by Miss Islington (bot) in branch '3.8': bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020)

[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset 90115a2cf7033c990a54d1ecb90ebd850b5f13cf by Miss Islington (bot) in branch '3.9': bpo-42183: Fix a stack overflow error for asyncio Task or Future repr() (GH-23020)

[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Ned Deily
Ned Deily added the comment: I don't know for sure why python.o is included but perhaps the intent was to allow a user to rebuild a static interpreter with an user-supplied extension as is hinted at in https://docs.python.org/dev/extending/extending.html#compilation-and-linkage --

  1   2   >