[issue32462] validate mime types loaded from system files. Document that system files take precedence.

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- title: mimetypes.guess_type() returns incorrectly formatted type -> validate mime types loaded from system files. Document that system files take precedence. type: behavior -> enhancement versions: +Python 3.11 -Python 3.7

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

2022-01-18 Thread Irit Katriel
Irit Katriel added the comment: As noted in Issue32462, the fact that system files take precedence over the definitions in the sodlib is a feature, so the proposed patch to reverse this behaviour cannot be applied unless it is decided to change the API in this way. That would require a

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28864 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30663 ___ Python tracker ___

[issue46424] `typing.Annotated` one type argument usage is not covered in tests

2022-01-18 Thread Nikita Sobolev
New submission from Nikita Sobolev : This condition is not covered: https://github.com/python/cpython/blob/bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048/Lib/typing.py#L1674-L1677 I propose to add a test for it, because `Annotated[int]` is invalid. PR is on its way :) -- components: Tests

[issue46423] CLI: Addition assignment for tuples

2022-01-18 Thread Ali Ramezani
New submission from Ali Ramezani : In CLI (Command Line Interpreter): A tuple has a list component then try to += that component. Since tuple doesn't allow assignment then it raises error but actually does that. If you try actual equivalence (A=A+B) it does not. Python 3.9.1

[issue41791] mimetypes module does not recognize jp2 type

2022-01-18 Thread Irit Katriel
Irit Katriel added the comment: It is found by the module-level guess_type but not by the MimeType class's guess_type: >>> from mimetypes import MimeTypes >>> MimeTypes().guess_type('test.jp2') (None, None) >>> mimetypes.guess_type('test.jp2') ('image/jp2', None) >>> That difference is the

[issue1043134] Add preferred extensions for MIME types

2022-01-18 Thread Irit Katriel
Irit Katriel added the comment: PR14375 indeed adds a test for this as well (test_preferred_extension). -- nosy: +iritkatriel resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 ___ Python

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-18 Thread Petr Viktorin
Petr Viktorin added the comment: If we have static types, that means there is a mechanism to share some objects across interpreters. And if that's the case, why can't small ints (like sys.float_info.n_unnamed_fields) be static & shared as well? -- nosy: +petr.viktorin

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-18 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-18 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048 by Erlend Egeberg Aasland in branch 'main': bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660) https://github.com/python/cpython/commit/bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048 --

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +28863 pull_request: https://github.com/python/cpython/pull/30662 ___ Python tracker ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28862 pull_request: https://github.com/python/cpython/pull/30661 ___ Python tracker

[issue43950] Include column offsets for bytecode instructions

2022-01-18 Thread Nikita Sobolev
Nikita Sobolev added the comment: I've opened a new issue about unused `dis.Positions` here: https://bugs.python.org/issue46422 -- nosy: +sobolevn ___ Python tracker ___

[issue46422] Why do we need `dis.Positions`?

2022-01-18 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/30058 I've noticed that `Positions` namedtuple is kinda strange, source: https://github.com/python/cpython/blame/8c2fd09f365e082cfceb29afdf38953cdd670946/Lib/dis.py#L204-L213 Why? 1. It is not used.

[issue46392] MessageIDHeader is too strict for message-id

2022-01-18 Thread bpoaugust
bpoaugust added the comment: When the library is being used to parse existing emails, I think it needs to do the minimum validation and canonicalisation. It may be useful in some circumstances to report where the input is not syntactically correct, but I'm not sure it is helpful to truncate

[issue46391] Library multiprocess leaks named resources.

2022-01-18 Thread XD Trol
XD Trol added the comment: loop file owner. -- nosy: +benjamin.peterson, sbt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-01-18 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: -kumaraditya303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46390] Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

2022-01-18 Thread Kumar Aditya
Change by Kumar Aditya : -- nosy: -kumaraditya303 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46339] PEG parser segfault from ast.literal_eval

2022-01-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8c2fd09f365e082cfceb29afdf38953cdd670946 by Pablo Galindo Salgado in branch 'main': bpo-46339: Include clarification on assert in 'get_error_line_from_tokenizer_buffers' (#30545)

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I created GH-30660 in order to try to enhance the docs. Ned and Eric, would you mind taking a look at the PR? -- ___ Python tracker ___

[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +28861 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30660 ___ Python tracker

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

2022-01-18 Thread STINNER Victor
STINNER Victor added the comment: See also: https://discuss.python.org/t/virtual-environments-vs-nix-python-upgrades/12588 "Virtual environments vs. *nix Python upgrades". -- nosy: +vstinner ___ Python tracker

[issue16482] pdb.set_trace() clobbering traceback on error

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: patch review -> resolved status: pending -> closed ___ Python tracker ___

[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed ___ Python tracker ___

[issue45644] Make json.tool soak up input before opening output for writing

2022-01-18 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +methane nosy_count: 4.0 -> 5.0 pull_requests: +28860 pull_request: https://github.com/python/cpython/pull/30659 ___ Python tracker ___

[issue30268] Make mimetypes.guess_type accept path-like objects

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Allow querying a Path's mime-type ___ Python tracker ___

[issue46390] Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

2022-01-18 Thread Christian Heimes
Christian Heimes added the comment: I would put it differently: The package maintainer of Python on Alpine decided to ignore all test failures in these test modules. -- ___ Python tracker

[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46390] Multiple test failures on Alpine 3.15 / musl-1.2.2-r7

2022-01-18 Thread Kumar Aditya
Kumar Aditya added the comment: These tests seems to be expected to fail on alpine. See https://github.com/alpinelinux/aports/blob/b36ed9bba2fdbf49a98dfdc3377c29271525082f/main/python3/APKBUILD#L123 -- nosy: +kumaraditya303 ___ Python tracker

[issue46411] modernize exception handling in tests

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42161] Remove private _PyLong_Zero and _PyLong_One variables

2022-01-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 243c31667cc15a9a338330ad9b2a29b1cd1c76ec by Raymond Hettinger in branch 'main': bpo-42161: Hoist the _PyLong_GetOne() call out of the inner loop. (GH-30656) https://github.com/python/cpython/commit/243c31667cc15a9a338330ad9b2a29b1cd1c76ec

<    1   2