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

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17771 pull_request: https://github.com/python/cpython/pull/18395 ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-06 Thread Vedran Čačić
Vedran Čačić added the comment: > Of course the result is exactly 2. Which I have enough RAM to hold ;-) You might think so, but if you write it as 2.00...0 with >>> decimal.MAX_PREC 99 zeros, I think you're overestimating your RAM capacity. :-P Now, what is the exact

[issue37815] 'Make Test' error while trying to install Python 3.7.4 on Linux Mint

2020-02-06 Thread Avery Uslaner
Avery Uslaner added the comment: FYI, the problem seems isolated to the libreadline-gplv2-dev package. -- ___ Python tracker ___

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-06 Thread Tim Peters
New submission from Tim Peters : Here under Python 3.8.1 on 64-bit Windows: >>> import decimal >>> c = decimal.getcontext() >>> c.prec = decimal.MAX_PREC >>> i = decimal.Decimal(4) >>> i / 2 Traceback (most recent call last): File "", line 1, in MemoryError Of course the result is exactly

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-06 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: > Can I ask how pegen solved this problem? Did you move parsing of f-strings > into the grammar? No, we actually do a very similar thing to what ast.c does. I think there is only one major difference between what pegen does and what ast.c does. If I

[issue37815] 'Make Test' error while trying to install Python 3.7.4 on Linux Mint

2020-02-06 Thread Avery Uslaner
Avery Uslaner added the comment: I'm running into the same error while attempting to compile Python 3.8.1 on Ubuntu 18.04. The actual test failure is this: == FAIL: test_errors_in_command (test.test_pdb.PdbTestCase)

[issue39465] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-02-06 Thread hai shi
hai shi added the comment: > The GIL avoids any risk of race condition, no? Looks like the GIL would affect performance more or less? >_Py_IDENTIFIER() would only be a "key" and _PyUnicode_FromId() would >store >the value somewhere in a hash table stored in PyInterpreterState. +1. IMHO,

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17770 pull_request: https://github.com/python/cpython/pull/18394 ___ Python tracker ___

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-06 Thread Eric V. Smith
Eric V. Smith added the comment: Can I ask how pegen solved this problem? Did you move parsing of f-strings into the grammar? I found my patch and I'm working on resolving merge conflicts. -- ___ Python tracker

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 by Victor Stinner in branch 'master': bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393) https://github.com/python/cpython/commit/daa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 --

[issue39318] NamedTemporaryFile could cause double-close on an fd if _TemporaryFileWrapper throws

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()?

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-29241. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17769 pull_request: https://github.com/python/cpython/pull/18393 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 58ac700fb09497df14d4492b6f820109490b2b88 by Victor Stinner in branch 'master': bpo-39573: Use Py_TYPE() macro in Objects directory (GH-18392) https://github.com/python/cpython/commit/58ac700fb09497df14d4492b6f820109490b2b88 --

[issue39575] `coverage` build target should use --coverage instead of -lgcov

2020-02-06 Thread MaskRay
Change by MaskRay : -- keywords: +patch pull_requests: +17768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18382 ___ Python tracker ___

[issue39575] `coverage` build target should use --coverage instead of -lgcov

2020-02-06 Thread MaskRay
New submission from MaskRay : This allows clang to get rid of the dependency on libgcov. When linking, GCC passes -lgcov while clang passes the path to libclang_rt.profile-$arch.a -- components: Build messages: 361528 nosy: MaskRay priority: normal severity: normal status: open title:

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Make PyObject an opaque structure is also a first step towards the more ambitious project "HPy" project which is fully opaque: https://github.com/pyhandle/hpy This API is written from scratch and currently implemented on top on the existing C API. The

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17767 pull_request: https://github.com/python/cpython/pull/18392 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset a102ed7d2f0e7e05438f14d5fb72ca0358602249 by Victor Stinner in branch 'master': bpo-39573: Use Py_TYPE() macro in Python and Include directories (GH-18391) https://github.com/python/cpython/commit/a102ed7d2f0e7e05438f14d5fb72ca0358602249

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 38ac805fa30870e2d093e52a900e3b34 by Jakub Stasiak in branch 'master': bpo-39491: Mention Annotated in get_origin() docstring (GH-18379) https://github.com/python/cpython/commit/38ac805fa30870e2d093e52a900e3b34 --

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- pull_requests: +17766 pull_request: https://github.com/python/cpython/pull/18379 ___ Python tracker ___

[issue39574] str.__doc__ is misleading

2020-02-06 Thread Zachary Westrick
New submission from Zachary Westrick : The docstring for the str() builtin reads str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Py_TYPE() is commonly used to render the type name in an error message. Example: PyErr_Format(PyExc_TypeError, "cannot convert '%.200s' object to bytearray", Py_TYPE(arg)->tp_name); This code has multiple issues: * It truncates

[issue39574] str.__doc__ is misleading

2020-02-06 Thread Zachary Westrick
Change by Zachary Westrick : -- assignee: docs@python components: Documentation nosy: docs@python, kcirtsew priority: normal severity: normal status: open title: str.__doc__ is misleading type: enhancement versions: Python 3.5 ___ Python tracker

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17765 pull_request: https://github.com/python/cpython/pull/18391 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0d76d2bd28ac815dabae8b07240ed002ac8fce2d by Victor Stinner in branch 'master': bpo-39573: Use Py_TYPE() in abstract.c (GH-18390) https://github.com/python/cpython/commit/0d76d2bd28ac815dabae8b07240ed002ac8fce2d --

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Thanks Sam Gross for the hint, it's now fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset f95cd199b4bc16775c8c48641bd85416b17742e7 by Victor Stinner in branch 'master': bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385) https://github.com/python/cpython/commit/f95cd199b4bc16775c8c48641bd85416b17742e7 --

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17764 pull_request: https://github.com/python/cpython/pull/18390 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +nascheme ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset c86a11221df7e37da389f9c6ce6e47ea22dc44ff by Victor Stinner in branch 'master': bpo-39573: Add Py_SET_REFCNT() function (GH-18389) https://github.com/python/cpython/commit/c86a11221df7e37da389f9c6ce6e47ea22dc44ff --

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: TODO: Add Py_IS_TYPE() macro: #define Py_IS_TYPE(ob, tp) (Py_TYPE(ob) == (tp)) For example, replace: #define PyBool_Check(x) (Py_TYPE(x) == _Type) with: #define PyBool_Check(x) Py_IS_TYPE(x, _Type) IMHO it makes the code more readable.

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: In the limited C API, Py_REFCNT() should be converted to: static inline Py_ssize_t _Py_REFCNT(const PyObject *ob) { return ob->ob_refcnt; } #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST(ob)) It would enforce the usage of newly added Py_SET_REFCNT() (PR

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: > it can prepare CPython to experiment tagged pointers In September 2018, Neil Schemenauer did an experiment: * https://mail.python.org/archives/list/capi-...@python.org/thread/EGAY55ZWMF2WSEMP7VAZSFZCZ4VARU7L/ *

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17763 pull_request: https://github.com/python/cpython/pull/18389 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset a93c51e3a8e15f1a486d11d5b55a64f3381babe0 by Victor Stinner in branch 'master': bpo-39573: Use Py_REFCNT() macro (GH-18388) https://github.com/python/cpython/commit/a93c51e3a8e15f1a486d11d5b55a64f3381babe0 --

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: > Another idea would be to convert some C extensions of the standard library to > the limited C API. It would ensure that the limited C API contains enough > functions to be useful, but would also notify us directly if the API is > broken. First issues

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17762 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18388 ___ Python tracker ___

[issue39573] Make PyObject an opaque structure in the limited C API

2020-02-06 Thread STINNER Victor
New submission from STINNER Victor : Today, CPython is leaking too many implementation through its public C API. We cannot easily change the "default" C API, but we can enhance the "limited" C API (when Py_LIMITED_API macro is defined). Example of leaking implementation details: memory

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Yes, that fixes the warnings for me. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39534] Clarify tutorial on return statement in finally clause.

2020-02-06 Thread miss-islington
miss-islington added the comment: New changeset 97e00b3c52796cb54dd0a50548760579b9cb7b3a by Miss Islington (bot) in branch '3.8': bpo-39534: Doc: Clarify return in finally (GH-18324) https://github.com/python/cpython/commit/97e00b3c52796cb54dd0a50548760579b9cb7b3a --

[issue39534] Clarify tutorial on return statement in finally clause.

2020-02-06 Thread miss-islington
miss-islington added the comment: New changeset 83efed9eba9e50ed2395bd3366c31628b9555b1e by Miss Islington (bot) in branch '3.7': bpo-39534: Doc: Clarify return in finally (GH-18324) https://github.com/python/cpython/commit/83efed9eba9e50ed2395bd3366c31628b9555b1e -- nosy:

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: > Alternatively I think you can just remove the typedef from > Include/cpython/object.h since Include/object.h is always included first. > i.e.: Oh, nice! I proposed PR 18385. Would you mind to confirm that it fix the issue for you? At least, I tested

[issue39534] Clarify tutorial on return statement in finally clause.

2020-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +17761 pull_request: https://github.com/python/cpython/pull/18387 ___ Python tracker ___

[issue39534] Clarify tutorial on return statement in finally clause.

2020-02-06 Thread Julien Palard
Julien Palard added the comment: New changeset 446463f8dbce0556be8020914f37089b63bb8ab6 by Julien Palard in branch 'master': bpo-39534: Doc: Clarify return in finally (GH-18324) https://github.com/python/cpython/commit/446463f8dbce0556be8020914f37089b63bb8ab6 --

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18385 ___ Python tracker ___

[issue39534] Clarify tutorial on return statement in finally clause.

2020-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +17760 pull_request: https://github.com/python/cpython/pull/18386 ___ Python tracker ___

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Alternatively I think you can just remove the typedef from Include/cpython/object.h since Include/object.h is always included first. i.e.: typedef struct _typeobject { ... } PyTypeObject; to simply struct _typeobject { ... }; --

[issue39542] Cleanup object.h header

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17758 pull_request: https://github.com/python/cpython/pull/18384 ___ Python tracker ___

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I only tested GCC and I forgot that clang is more pedantic on duplicated typedef. I looked better with PyTypeObject, but the fix is easy: just revert my change: PR 18384. -- ___ Python tracker

[issue39542] Cleanup object.h header

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 2844336e6bb0dc932d710be5f4d8c126d0768d03 by Victor Stinner in branch 'master': bpo-39542: Document limited C API changes (GH-18378) https://github.com/python/cpython/commit/2844336e6bb0dc932d710be5f4d8c126d0768d03 --

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-06 Thread Dino Viehland
Dino Viehland added the comment: Sorry, publish may not necessarily be the best term. When you do "from foo import bar" and foo is a package Python will set the bar module onto the foo module. That leads to the common mistake of doing "import foo" and then "foo.bar.baz" and later removing

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-06 Thread Brett Cannon
New submission from Brett Cannon : The docs mention __total__, but there's no mention of how to actually set that attribute, nor what it actually represents. P.S. https://github.com/python/cpython/blob/master/Lib/typing.py#L16 says TypedDict "may be added soon"; I think that's outdated. ;)

[issue39537] Change line number table format

2020-02-06 Thread Mark Shannon
Mark Shannon added the comment: Serhiy, How would you handle bytecodes that have no line number? -- nosy: +Mark.Shannon ___ Python tracker ___

[issue39551] mock patch should match behavior of import from when module isn't present in sys.modules

2020-02-06 Thread Chris Withers
Chris Withers added the comment: Apologies, but I'm still not sure what "the modules are published" means? "publish "x" as a child onto the package" also doesn't mean much to me, I'm afraid. Are you aware of any importlib docs or some such which might be able to explain this to me? When "It

[issue39569] Is the return value of pathlib.Path.glob() sorted?

2020-02-06 Thread Brett Cannon
Brett Cannon added the comment: The problem is you would have to say the same thing for all functions that return a list or touch the file system. So it's typically better to just assume unsorted and you can't expect idempotent results when dealing with the OS. -- nosy:

[issue39566] inspect.Signature.__init__ asks for parameters as dict but treats as list

2020-02-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: No problem, closing it as not a bug. Feel free to reopen if needed. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue39565] Modules/signalmodule.c creates handlers for signals bounded by `NSIG`; requires fudging to support realtime signals, etc

2020-02-06 Thread Enji Cooper
Change by Enji Cooper : -- title: Modules/signalmodule.c creates handlers for signals bound by `NSIG`; requires fudging to support realtime signals, etc -> Modules/signalmodule.c creates handlers for signals bounded by `NSIG`; requires fudging to support realtime signals, etc

[issue39565] Modules/signalmodule.c creates handlers for signals bound by `NSIG`; requires fudging to support realtime signals, etc

2020-02-06 Thread Enji Cooper
Change by Enji Cooper : -- title: Modules/signalmodule.c only works with `NSIG` signals; requires fudging to support realtime signals, etc -> Modules/signalmodule.c creates handlers for signals bound by `NSIG`; requires fudging to support realtime signals, etc

[issue39566] inspect.Signature.__init__ asks for parameters as dict but treats as list

2020-02-06 Thread Nicholas Matthews
Nicholas Matthews added the comment: I originally filed an issue believing the documentation for inspect.Signature was incorrect; I now think I misread the documentation. (Apologies, I'm used to a different docstring format) -- ___ Python tracker

[issue1294959] Problems with /usr/lib64 builds.

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17757 pull_request: https://github.com/python/cpython/pull/18381 ___ Python tracker ___

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
New submission from Sam Gross : A recent commit added a typedef for PyTypeObject in Include/object.h https://github.com/python/cpython/commit/0e4e735d06967145b49fd00693627f3624991dbc This duplicates the typedef in Include/cpython/object.h. Building with clang now issues a warning:

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Jakub Stasiak
Change by Jakub Stasiak : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39569] Is the return value of pathlib.Path.glob() sorted?

2020-02-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also discussion at issue38764. I guess it's not sorted as per msg356356. -- nosy: +serhiy.storchaka, xtreak ___ Python tracker

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2020-02-06 Thread Natanael Copa
Change by Natanael Copa : -- pull_requests: +17756 pull_request: https://github.com/python/cpython/pull/18380 ___ Python tracker ___

[issue39570] Python 3.7.3 Crash on msilib actions

2020-02-06 Thread UltraLutra
New submission from UltraLutra : Hello, I'm trying to read MSI files using msilib. Some files make python crash on Record.GetString of a specific cell. Attached is one of the files that causes the crash, and this is the code that is causing it to crash: db =

[issue39542] Cleanup object.h header

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17755 pull_request: https://github.com/python/cpython/pull/18378 ___ Python tracker ___

[issue39569] Is the return value of pathlib.Path.glob() sorted?

2020-02-06 Thread Björn Lindqvist
New submission from Björn Lindqvist : It would be great if the docs were clearer on what you can assume on the ordering of pathlib.Path.glob() calls. Is it sorted? Is it the same in consecutive calls? I'm guessing you can't assume anything at all, which I think should be clarified in the

[issue39568] FORMATTING grouping_option ValueError: Cannot specify ', ' with ...

2020-02-06 Thread Eric V. Smith
Eric V. Smith added the comment: Well, you asked why commas only work with decimals and I told you. Adding "_" would require a PEP. See PEP 378 if you want to write something similar for "_". I think it's a decent idea. You'll have to decide between 4 and 8 bits, and what to do with octal

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread miss-islington
miss-islington added the comment: New changeset 705d271d553b77fd170d27ab8d0f11f638c7f145 by Miss Islington (bot) in branch '3.7': bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017) https://github.com/python/cpython/commit/705d271d553b77fd170d27ab8d0f11f638c7f145 --

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread miss-islington
miss-islington added the comment: New changeset 0d03a1028200646479ef9bb0ad8973d0e73f9525 by Miss Islington (bot) in branch '3.8': bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017) https://github.com/python/cpython/commit/0d03a1028200646479ef9bb0ad8973d0e73f9525 --

[issue39568] FORMATTING grouping_option ValueError: Cannot specify ', ' with ...

2020-02-06 Thread Another One
Another One added the comment: Not for 3 bits, just for 4 bits, like this: >>> print("{:_b}".format(123456)) 1_1110_0010_0100_ And as I already said: "But '_' groups delimiter properly work with any integer representation including decimals, hexadecimals, binaries, octals, etc.." Not

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Thanks Sebastian Berg for the fix, and thanks François Durand for the bug report! This issue is fixed in the master branch, and backports to 3.7 and 3.8 will land soon automatically (once the CI tests pass). -- resolution: -> fixed stage: patch

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +17754 pull_request: https://github.com/python/cpython/pull/18377 ___ Python tracker ___

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +17753 pull_request: https://github.com/python/cpython/pull/18376 ___ Python tracker ___

[issue39274] Conversion from fractions.Fraction to bool

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 427c84f13f7719e6014a21bd1b81efdc02a046fb by Sebastian Berg in branch 'master': bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017) https://github.com/python/cpython/commit/427c84f13f7719e6014a21bd1b81efdc02a046fb --

[issue39245] Public API for Vectorcall (PEP 590)

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3f563cea567fbfed9db539ecbbacfee2d86f7735 by Petr Viktorin in branch 'master': bpo-39245: Make Vectorcall C API public (GH-17893) https://github.com/python/cpython/commit/3f563cea567fbfed9db539ecbbacfee2d86f7735 --

[issue38823] Improve stdlib module initialization error handling.

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset d2f96672642cc51b92f61b951ca1b11d615c12d1 by Brandt Bucher in branch 'master': bpo-38823: Fix refleaks in _ast initialization error path (GH-17276) https://github.com/python/cpython/commit/d2f96672642cc51b92f61b951ca1b11d615c12d1 --

[issue39350] Remove deprecated fractions.gcd()

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: FYI the full numpy test suite pass with PR 18375: (env) vstinner@apu$ python runtests.py -v (...) === 9879 passed, 443 skipped, 180 deselected, 17 xfailed, 3 xpassed in 305.17s (0:05:05) === --

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-06 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Also note that for pegen this is a solved problem. If we decide to change the parser, it may not be worth it to spend too much time on a universal solution. -- ___ Python tracker

[issue39350] Remove deprecated fractions.gcd()

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: I managed to test my PR with numpy: $ env/bin/python >>> import fractions >>> import numpy >>> f=fractions.Fraction(numpy.int64(1*3), numpy.int64(2*3)) >>> f Fraction(1, 2) >>> type(f.numerator) >>> type(f.denominator) So it works as expected: numerator

[issue39568] FORMATTING grouping_option ValueError: Cannot specify ', ' with ...

2020-02-06 Thread Eric V. Smith
Eric V. Smith added the comment: No one thought it made sense to have a comma every 3 bits. Or for octal or hex, either. Do you have some specific use case where it makes sense? -- nosy: +eric.smith ___ Python tracker

[issue39350] Remove deprecated fractions.gcd()

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: I tried but failed to write a test to mimick numpy.int64 type. I tried to build a type which implements numbers.Rational but don't inherit from int, but there are way too many methods that I have to implement :-( Morever, installing numpy on a Python 3.9

[issue39548] Request fails when 'WWW-Authenticate' header for Digest Authentication does not contain 'qop'

2020-02-06 Thread Stephen Balousek
Change by Stephen Balousek : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39568] FORMATTING grouping_option ValueError: Cannot specify ', ' with ...

2020-02-06 Thread Another One
New submission from Another One : Example for binary representation: >>> x = 123456 >>> print("{:,b}".format(x)) Traceback (most recent call last): File "", line 1, in print("{:,b}".format(x)) ValueError: Cannot specify ',' with 'b'. Why? Comma work only with decimals? But '_' groups

[issue38686] WWW-Authenticate qop="auth,auth-int" rejected by urllib

2020-02-06 Thread Stephen Balousek
Change by Stephen Balousek : -- pull_requests: +17752 pull_request: https://github.com/python/cpython/pull/18338 ___ Python tracker ___

[issue39350] Remove deprecated fractions.gcd()

2020-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17751 pull_request: https://github.com/python/cpython/pull/18375 ___ Python tracker ___

[issue39566] inspect.Signature.__init__ asks for parameters as dict but treats as list

2020-02-06 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: It says list in the __init__ doc : https://github.com/python/cpython/blob/54b4f14712b9350f11c983f1c8ac47a3716958a7/Lib/inspect.py#L2759 It says that parameters is a public property that returns a mapping of parameter name to object at :

[issue39549] The reprlib.Repr type should permit the “fillvalue” to be set by the user

2020-02-06 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +rhettinger versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue39541] distutils: Remove bdist_wininst (Windows .exe installers) in favor of bdist_wheel (.whl)

2020-02-06 Thread STINNER Victor
STINNER Victor added the comment: Small update, my setuptools change has been merged: " Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9)." https://github.com/pypa/setuptools/commit/5d17586a56077dfa3109a5861cf0ff579095a42e --

[issue38149] sys.audit() is called multiple times for glob.glob()

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

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-06 Thread Eric V. Smith
Eric V. Smith added the comment: I'll see if I can dig up the patch today. If I can find it, I'll attach it to issue 34364. This is really the first time I've tried to write down all of the issues related to tokenizing f-strings. It does seem a little daunting, but I'm not done noodling it

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2020-02-06 Thread Eryk Sun
Eryk Sun added the comment: That the CRT caches the tzname strings as ANSI multibyte strings is frustrating -- whether or not it's buggy. I would expect there to be a _wtzname cache of the native OS strings that wcsftime uses directly, with no potential for failed encodings (e.g. empty

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

2020-02-06 Thread hai shi
Change by hai shi : -- pull_requests: +17750 pull_request: https://github.com/python/cpython/pull/18374 ___ Python tracker ___

[issue38149] sys.audit() is called multiple times for glob.glob()

2020-02-06 Thread miss-islington
miss-islington added the comment: New changeset 708f472dd92f4f46c27ace710492da65da4a3319 by Miss Islington (bot) in branch '3.8': bpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360) https://github.com/python/cpython/commit/708f472dd92f4f46c27ace710492da65da4a3319

[issue38149] sys.audit() is called multiple times for glob.glob()

2020-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +17749 pull_request: https://github.com/python/cpython/pull/18373 ___ Python tracker ___

[issue38149] sys.audit() is called multiple times for glob.glob()

2020-02-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 54b4f14712b9350f11c983f1c8ac47a3716958a7 by Serhiy Storchaka in branch 'master': bpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360) https://github.com/python/cpython/commit/54b4f14712b9350f11c983f1c8ac47a3716958a7

[issue36792] [Windows] time: crash on formatting time with de_DE locale

2020-02-06 Thread Eryk Sun
Eryk Sun added the comment: > Even some well known locale names still use the utf-8 code page. Most > seem to uncommon, but at least es-BR (Brazil) does and would still > fall victim to these UCRT bugs. es-BR is a custom locale for the Spanish language in Brazil, as opposed to the common

[issue39567] Add audit for os.walk(), os.fwalk(), Path.glob() and Path.rglob()

2020-02-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +17748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18372 ___ Python tracker

  1   2   >