[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
Alex Waygood added the comment: Oh — I've already nearly finished a PR. Do you mind if I submit mine? Happy to make any changes you like, obviously. -- ___ Python tracker ___

[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-14 Thread Michael Sullivan
Michael Sullivan added the comment: I tend to agree with Carl that making Final imply ClassVar for dataclass would make things worse. For better or worse (mostly better, but there are downsides like this!), dataclass class bodies are essentially written in their own domain specific language

[issue45451] IDLE Shell GUI - remove window border

2021-10-14 Thread primexx
primexx added the comment: of course that's fair, colour schemes are a very preferential thing. the main issue really is the border that creates a visual separation between the line indicators and the lines that they should be visually associated with. thanks! -- ___

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +27230 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28942 ___ Python tracker ___

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27231 pull_request: https://github.com/python/cpython/pull/28943 ___ Python tracker _

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c96d1546b11b4c282a7e21737cb1f5d16349656d by Serhiy Storchaka in branch 'main': bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) https://github.com/python/cpython/commit/c96d1546b11b4c282a7e21737cb1f5

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Similar to 45461, but with "raw-unicode-escape". When an incremental decoder gets a part of escape sequence (\u or \U) it raises an exception or return a bare "\" if it was the only part instead of keeping it until getting the rest. It is exp

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string ___ Python tracker ___ ___

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +27232 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28944 ___ Python tracker ___

[issue45247] [C API] Add explicit support for Cython to the C API

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: My first attempt: Add PyThreadState_EnterTracing() and PyThreadState_LeaveTracing() https://github.com/python/cpython/pull/28542 It adds an abstraction on accesses to PyThreadState.tracing and PyThreadState.cframe.use_tracing members. -- __

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27233 pull_request: https://github.com/python/cpython/pull/28945 ___ Python tracker ___

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread E. Paine
Change by E. Paine : -- nosy: +epaine ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How would it be used from Python? What are scenarios? -- ___ Python tracker ___ ___ Python-bugs

[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-10-14 Thread swgmma
swgmma added the comment: Ping in case anyone from the windows team is available to review the PR -- ___ Python tracker ___ ___ Pyt

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : I would like to propose adding support for preloading a Python script before executing a Python application. Potential design: A new environment variable (e.g. PY_PRELOAD, an allusion to LD_PRELOAD, or PYTHONPRELOAD to be more aligned with the namin

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- keywords: +patch pull_requests: +27235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28946 ___ Python tracker

[issue45469] lambda issue in for-loop

2021-10-14 Thread Vincent Liang
New submission from Vincent Liang : Strange behavior is found when lambda is used inside for-loop. code:(same as attached file) # begin of CODE def aa(x): print("aa") def bb(x): print("bb") namefun = [ ("a", aa), ("b", bb), ] name2fun = {} for name, fun in namefun: name2fu

[issue45448] PIP package installation failure for multiple packages

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: This is not a problem that we can fix. Third party packages like numpy and tensorflow have not build and publish builds for Python 3.10 for all platforms yet. -- nosy: +christian.heimes resolution: -> third party status: open -> closed __

[issue45469] lambda issue in for-loop

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: You are running in a typical scope issue. The local and global scope of a lambda work differently than you expect. You can work around the issue by making fun a local variable: for name, fun in namefun: name2fun[name] = lambda x, fun=fun: fun(x) -

[issue45469] lambda issue in for-loop

2021-10-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: See also the FAQs: https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result -- nosy: +steven.daprano ___ Python tracker

[issue45457] Documentation for ssl.load_default_certs is outdated

2021-10-14 Thread Lincoln Puzey
Change by Lincoln Puzey : -- keywords: +patch pull_requests: +27237 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28947 ___ Python tracker ___

[issue22449] SSLContext.load_verify_locations behavior on Windows and OSX

2021-10-14 Thread Lincoln Puzey
Change by Lincoln Puzey : -- nosy: +LincolnPuzey nosy_count: 10.0 -> 11.0 pull_requests: +27238 pull_request: https://github.com/python/cpython/pull/28947 ___ Python tracker __

[issue34897] distutils test errors when CXX is not set

2021-10-14 Thread Jan Pieczkowski
Jan Pieczkowski added the comment: This issue also still affects Python versions 3.6.15 and 3.7.12 IMHO it would make sense to backport this patch to the 3.6 and 3.7 branches, especially as it only affects one line of code and doesn't seem to affect anything else, but solves the same issue f

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: > How would it be used from Python? What are scenarios? I am preparing PoC, I will share you once done. >From gdbm 1.21, gdbm provides 2 kinds of format. (Standard format / Extended >format.) To create a gdm format with the extended option, GDBM_NUMSYNC flag ne

[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-14 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue45367] Specialize BINARY_MULTIPLY

2021-10-14 Thread Mark Shannon
Mark Shannon added the comment: New changeset 3b3d30e8f78271a488965c9cd11136e1aa890757 by Dennis Sweeney in branch 'main': bpo-45367: Specialize BINARY_MULTIPLY (GH-28727) https://github.com/python/cpython/commit/3b3d30e8f78271a488965c9cd11136e1aa890757 -- _

[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: You are correct. To be more precise, it's caused by GH-16856. The commit introduced PyAttributeErrorObject struct. Since AttributeError and OSError now have an incompatible memory layout, it is no longer possible to create a subclass that has AttributeErro

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And what's next? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: > And what's next? I may introduce following API which only available to use extension format. (I am PoC with this) > dbm.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1') About gdbm_latest_snapshot(), I am still curious that Python module should provid

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: Sorry, I don't know my answer is enough. Or do you have any ideas or the opposite ideas? -- ___ Python tracker ___ _

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: dbm.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1') -> db.gdbm_failure_atomic('snapshot_path0', 'snapshot_path1') -- ___ Python tracker ___

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am interesting how these gdbm_failure_atomic() and gdbm_latest_snapshot() can be used in user code. Some real world examples. They look very low-level and requiring an additional boilerplate code to be useful if I understand it correctly. -- __

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: Yeah, I agree with gdbm_latest_snapshot(), this API might be too low-level. But as I am one of the rocksdb user who directly uses rocksdb API for the production platform as caching purposes. so when I think about my and my team's rocksdb usage, gdbm_failure_atomi

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
Change by Alex Waygood : -- keywords: +patch pull_requests: +27239 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/28950 ___ Python tracker

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please show examples. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unfortunately there isn't much we can do here other than document this :( -- ___ Python tracker ___ __

[issue45447] IDLE: Support syntax highlighting for .pyi stub files

2021-10-14 Thread Alex Waygood
Alex Waygood added the comment: Have posted my PR. I've tested it manually and run the IDLE test suite on it with the `-u all` setting; it seems fine. The new tests I've written are a bit thin on the ground right now, though. I may need some guidance/help if more extensive tests are needed -

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Dong-hee Na
Dong-hee Na added the comment: > Please show examples. Sorry, I don't understand, do you mean caching example or recovery example? When we use rocksdb, we can get checkpoints files under local file system. And we can recover the database by using them. http://rocksdb.org/blog/2015/11/10/use-ch

[issue45470] possible bug in datetime.timestamp()

2021-10-14 Thread Stefan
New submission from Stefan : I noticed that there is a difference between intervals when computed from timedeltas vs timestamps. Is this a bug? Thanks! In [2]: import datetime as datet In [3]: d0 = datet.datetime(2016,3,27) In [4]: d1 = datet.datetime(2016,3,28) In [5]: (d1-d0).total_seconds()

[issue45464] TypeError when inheriting from both OSError and AttributeError

2021-10-14 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, just to clarify something: there is no guarantee that multiple build-in, unrelated exceptions can be inherited and this is not supported. And this is not unique to this case. For example: >>> class A(StopIteration, OSError): ...... ... Trace

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0bff4ccbfd3297b0adf690655d3e9ddb0033bc69 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28943) https://github.com/python/cpython/commit/0bff4ccb

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7c722e32bf582108680f49983cf01eaed710ddb9 by Serhiy Storchaka in branch '3.9': [3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945) https://github.com/python/cpython/commit/7c722e32bf5821

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 39aa98346d5dd8ac591a7cafb467af21c53f1e5d by Serhiy Storchaka in branch 'main': bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) https://github.com/python/cpython/commit/39aa98346d5dd8ac591a7cafb4

[issue45470] possible bug in datetime.timestamp()

2021-10-14 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue45470] possible bug in datetime.timestamp()

2021-10-14 Thread Stefan
Stefan added the comment: sorry it's resolved. it was a timezone issue: In [2]: d0 = datet.datetime(2016,3,27,tzinfo=datet.timezone.utc) In [3]: d1 = datet.datetime(2016,3,28,tzinfo=datet.timezone.utc) In [4]: (d1-d0).total_seconds()/3600 Out[4]: 24.0 In [5]: (d1.timestamp()-d0.timestamp())

[issue45448] PIP package installation failure for multiple packages

2021-10-14 Thread Zayden Micheal James
Zayden Micheal James added the comment: Oh so the problem will resolve itself when they, support Python 3.10 PIP 21.2.4. Sorry for the inconvenience. Can't wait for the libraries to be resolved and optimized -- ___ Python tracker

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27240 pull_request: https://github.com/python/cpython/pull/28952 ___ Python tracker ___

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27241 pull_request: https://github.com/python/cpython/pull/28953 ___ Python tracker ___

[issue45452] Support crash tolerance feature for gdbm module

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Examples of using the new feature. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45461] UnicodeDecodeError: 'unicodeescape' codec can't decode byte 0x5c in position 8191: \ at end of string

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

[issue45462] Speed up re.match with pre-compiled patterns

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Calling re.math() with a pre-compiled pattern is an uncommon case. Common cases are calling re.math() with a string pattern and calling the math() method of a pre-compiled pattern. Your change speeds up an uncommon case but slows down a common case. -

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
New submission from Eric Snow : (This follows bpo-45211.) In gh-28586 I added the code in Py_SetPythonHome() to set _Py_path_config.stdlib_dir to the provided directory. However, this is the wrong value. Furthermore, the relationship between _Py_path_config.home and _Py_path_config.stdlib_

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27242 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28954 ___ Python tracker ___

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +27243 pull_request: https://github.com/python/cpython/pull/28954 ___ Python tracker ___ ___

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4641afef661e6a22bc64194bd334b161c95edfe2 by Serhiy Storchaka in branch '3.10': [3.10] bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28952) https://github.com/python/cpython/commit/4641afef

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 684860280687561f6312e206c4ccfbe4baa17e89 by Serhiy Storchaka in branch '3.9': bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28953) https://github.com/python/cpython/commit/684860280687561f

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Eric V. Smith
Eric V. Smith added the comment: Can you accomplish what you want with .pth files? -- nosy: +eric.smith ___ Python tracker ___ ___

[issue45384] Accept Final as indicating ClassVar for dataclass

2021-10-14 Thread Gregory Beauregard
Gregory Beauregard added the comment: Hi Michael, Thanks for taking the time to look into this. I don't feel strongly enough about following the existing PEP wording to desire creating a situation where instance vars can't be marked Final if we can instead make a workaround with ClassVar[Fi

[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-10-14 Thread Diego Alonso
Diego Alonso added the comment: I had an empty stropts.h lying around somewhere in /usr/* (can't remember where) because some programs don't compile if they don't see that file (even an empty one suffices). But Python doesn't compile if it sees it... So I deleted stropts.h and then ran ./con

[issue45472] Add public C API for partial "unicode-escape" and "raw-unicode-escape" decoding

2021-10-14 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR adds C API functions PyUnicode_DecodeUnicodeEscapeStateful() and PyUnicode_DecodeRawUnicodeEscapeStateful() for partially decoding with "unicode-escape" and "raw-unicode-escape" encodings. It were the only multibyte text codecs which did

[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: I'm glad you figured out the problem and fixed your system. Python uses autoconf (configure) to detect the presence of features. It's a standard approach. Since you had a stropts.h in your include directory, configure declared HAVE_STROPTS_H. The system ca

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: There is also https://www.python.org/dev/peps/pep-0648/ -- nosy: +christian.heimes ___ Python tracker ___ _

[issue45472] Add public C API for partial "unicode-escape" and "raw-unicode-escape" decoding

2021-10-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +27244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28955 ___ Python tracker ___

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: I suppose that this issue can now be closed? -- ___ Python tracker ___ ___ Python-bugs-li

[issue45473] Enum add "from_name" and "from_value" class methods

2021-10-14 Thread Aaron Koch
New submission from Aaron Koch : Documentation: https://docs.python.org/3/library/enum.html#creating-an-enum Current behavior: SomeEnum[name] is used to construct an enum by name SomeEnum(value) is used to construct an enum by value Problem: As a user of enums, it is difficult to remember th

[issue45467] Fix incremental decoder and stream reader in the "raw-unicode-escape" codec

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

[issue45473] Enum add "from_name" and "from_value" class methods

2021-10-14 Thread Ethan Furman
Change by Ethan Furman : -- assignee: -> ethan.furman nosy: +ethan.furman versions: +Python 3.11 ___ Python tracker ___ ___ Python-

[issue45452] Support crash tolerance feature for gdbm module

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

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3cc56c828d2d8f8659ea49447234bf0d2b87cd64 by Victor Stinner in branch 'main': bpo-45439: Move _PyObject_VectorcallTstate() to pycore_call.h (GH-28893) https://github.com/python/cpython/commit/3cc56c828d2d8f8659ea49447234bf0d2b87cd64 --

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: @christian.heimes thanks for bringing PEP 648 to my attention. The solution proposed there would work for me, although it actually does a bit more with some extra complexity. Not a big issue though. @eric.smith I think that, as argued in PEP 648, pth fi

[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: I decided to merge my PR to address https://bugs.python.org/issue45439 initial issue: "[C API] Move usage of **tp_vectorcall_offset** from public headers to the internal C API". Last years, I added `tstate` parameters to internal C functions. The agreement

[issue45434] [C API] Clean-up the Python.h header file

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: I tried to remove the include from Python.h: -#include// memcpy() ... but it required me to modify 100+ files. I don't know the exact number, I gave up after 100 files. I was near half of C extensions built by setup.py, so the number total

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor
New submission from STINNER Victor : Include/marshal.h defines 2 functions with FILE* argument in the limited C API, whereas the PEP 384 disallows that: "In addition, functions expecting FILE* are not part of the ABI, to avoid depending on a specific version of the Microsoft C runtime DLL on

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +27245 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28956 ___ Python tracker ___ _

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Christian Heimes
Christian Heimes added the comment: We generally prefer to have only way way to accomplish a goal. If PEP 648 gets accepted then your proposal won't be accepted. In case the PEP is rejected, then your proposal may still be rejected or may require a new PEP. Preloading has some complicated ed

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main': bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954) https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875718ef38715 -- __

[issue45211] Useful (expensive) information is discarded in getpath.c.

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 0bbea0723ee07f9d7ad9745f0e1875718ef38715 by Eric Snow in branch 'main': bpo-45471: Do not set PyConfig.stdlib_dir in Py_SetPythonHome(). (gh-28954) https://github.com/python/cpython/commit/0bbea0723ee07f9d7ad9745f0e1875718ef38715 -- __

[issue45471] _Py_path_config.stdlib_dir should not be set in Py_SetPythonHome().

2021-10-14 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue45468] Add support for preloading a Python script

2021-10-14 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: That's totally fine. My aim is to have something in place that would make preloading some code less clunky than what it is just now. -- ___ Python tracker

[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-14 Thread Eric Snow
Eric Snow added the comment: @MAL, what's the best way to make sure Tools/freeze is still working? I don't see any tests for it in the test suite. I tried running the test in Tools/freeze/test, but I can't get that to work on main (or on the 3.10 branch). -- __

[issue45417] Enum creation non-linear in the number of values

2021-10-14 Thread Ethan Furman
Ethan Furman added the comment: New changeset b2af211e229df941d9b404f69547a264115156b5 by Carl Friedrich Bolz-Tereick in branch 'main': bpo-45417: [Enum] fix quadratic behavior during creation (GH-28907) https://github.com/python/cpython/commit/b2af211e229df941d9b404f69547a264115156b5 -

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27246 pull_request: https://github.com/python/cpython/pull/28957 ___ Python tracker ___ __

[issue45475] gzip fails to read a gzipped file (ValueError: readline of closed file)

2021-10-14 Thread minstrelofc
New submission from minstrelofc : Attempting to iterate over an opened gzip file raises a ValueError: readline of closed file Behavior in Python 3.9.7: Python 3.9.7 (default, Oct 13 2021, 09:08:19) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

[issue45473] Enum add "from_name" and "from_value" class methods

2021-10-14 Thread Ethan Furman
Ethan Furman added the comment: The problem with adding methods is that those names are then unavailable for member names -- at least not without possible confusion. Also, unlike the `name` and `value` instance attributes which do not hide class attributes (aka members) of the same name, `fr

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread STINNER Victor
New submission from STINNER Victor : The Python C API provides "AS" functions to convert an object to another type, like PyFloat_AS_DOUBLE(). These macros can be abused to be used as l-value: "PyFloat_AS_DOUBLE(obj) = new_value;". It prevents to change the PyFloat implementation and makes lif

[issue45477] configure script cannot detect float word ordering on linux

2021-10-14 Thread Sourish Basu
New submission from Sourish Basu : I am trying to compile Python 3.10.0 on a Red Hat linux system with intel C/C++ compilers. This is my configure command: ``` ./configure --with-computed-gotos --without-gcc --with-ensurepip=install --enable-optimizations --with-libm=-limf --with-cxx-main=icp

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread Eric Snow
Eric Snow added the comment: Thanks, Victor! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21736] Add __file__ attribute to frozen modules

2021-10-14 Thread Eric Snow
Eric Snow added the comment: New changeset 79cf20e48d0b5d69d9fac2a0204b5ac2c366066a by Eric Snow in branch 'main': bpo-21736: Set __file__ on frozen stdlib modules. (gh-28656) https://github.com/python/cpython/commit/79cf20e48d0b5d69d9fac2a0204b5ac2c366066a -- _

[issue21736] Add __file__ attribute to frozen modules

2021-10-14 Thread Eric Snow
Eric Snow added the comment: I've merged the change to add __file__ for frozen stdlib modules (when possible) and to set __path__ appropriately. There are still a number of things to address though: * set co_filename (for tracebacks) * implement FrozenImporter.get_filename() * implement Fro

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0a883a76cda8205023c52211968bcf87bd47fd6e by Victor Stinner in branch 'main': bpo-35134: Add Include/cpython/floatobject.h (GH-28957) https://github.com/python/cpython/commit/0a883a76cda8205023c52211968bcf87bd47fd6e --

[issue29595] Expose max_queue_size in ThreadPoolExecutor

2021-10-14 Thread Jack Wong
Change by Jack Wong : -- nosy: +iforapsy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue45476] [C API] Convert "AS" functions, like PyFloat_AS_DOUBLE(), to static inline functions

2021-10-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: > These macros can be abused to be used as l-value You could simply document, "don't do that". Also if these is a need to make an assignment, you're now going to have to create a new setter function to fill the need. We really don't have to go on thin i

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27247 pull_request: https://github.com/python/cpython/pull/28958 ___ Python tracker ___ __

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since there is new activity on it :-) -- resolution: fixed -> status: closed -> open ___ Python tracker ___ _

[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2021-10-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: -23644 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset af1083e975b9627a5c97013d3a2b9aef0e4b333c by Victor Stinner in branch 'main': bpo-45474: Fix the limited C API of marshal.h (GH-28956) https://github.com/python/cpython/commit/af1083e975b9627a5c97013d3a2b9aef0e4b333c -- ___

[issue45442] Update `Virtual Environment` tutorial

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

[issue45474] [C API] marshal.h must not use FILE* type in the limited C API

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

[issue45434] [C API] Clean-up the Python.h header file

2021-10-14 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27249 pull_request: https://github.com/python/cpython/pull/28960 ___ Python tracker ___ __

[issue45434] [C API] Clean-up the Python.h header file

2021-10-14 Thread STINNER Victor
STINNER Victor added the comment: New changeset 284994762d820d8e09cc019f8f7c4bc501e37dd4 by Victor Stinner in branch 'main': bpo-45434: Limited Python.h no longer includes stdio.h (GH-28960) https://github.com/python/cpython/commit/284994762d820d8e09cc019f8f7c4bc501e37dd4 -- __

  1   2   >