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

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: To make PyObject opaque, we would have to convert Py_INCREF() and Py_DECREF() to opaque function calls. Example: #define Py_XINCREF(op) Py_IncRef(op) #define Py_XDECREF(op) Py_DecRef(op) Benchmarks should be run to measure to overhead and balance the

[issue36843] AIX build fails with failure to get random numbers

2020-02-07 Thread Michael Felt
Michael Felt added the comment: FYI: I was contacted this week by someone with this problem. The problem was resolved after they updated AIX (was 7100-04-00-). Please note: any oslevel -s reporting six zeros at the end needs the SP that is released in parallel with the base.

[issue39577] venv --prompt argument is ignored

2020-02-07 Thread Andrea
New submission from Andrea : In creating a new virtual environment, the help suggest a --prompt argument to specify a different name by the time the environment is active. https://docs.python.org/3/library/venv.html The argument is apparently ignored as the folder name always appears instead

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-07 Thread Vedran Čačić
Vedran Čačić added the comment: Yeah, I should have said "represent" instead of "write". :-) -- ___ Python tracker ___ ___

[issue39574] str.__doc__ is misleading

2020-02-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: The docs are correct, you are just misinterpreting them. Which could, I guess, suggest the docs could do with improvement. With *one* argument, `str(obj)` returns a string via `object.__str__(obj)` or `repr(obj)`, whichever is defined. That includes the

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: > It's probably worth at least a post to python-dev to expand the audience, but > unless someone speaks up with some really good reason why they must update to > Python 3.10 without updating their own code then let's deprecate it. I don't think that it

[issue39576] Surprising MemoryError in `decimal` with MAX_PREC

2020-02-07 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed that this seems surprising. @Vedran: Trailing zeros in a Decimal object are significant, so `Decimal("2.0")` and `Decimal("2.00")` are different (equal, but different). The rules about the "ideal exponent" of the result of an arithmetic operation

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: Ah, I also found the idea of immortal None in an old discussion on tagged pointer: https://mail.python.org/archives/list/capi-...@python.org/thread/JPUNPN3AILGXOA3C2TTSLMOFNSWJE3QX/ Stefan Behnel proposed the idea: "All negative refcounts would have special

[issue39500] Document PyUnicode_IsIdentifier() function

2020-02-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17773 pull_request: https://github.com/python/cpython/pull/18397 ___ Python tracker ___

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

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset bec4186c67345f1e6cd3f8a531bc228f14d7ed7b by Victor Stinner in branch 'master': bpo-35134: Create Include/cpython/listobject.h (GH-18395) https://github.com/python/cpython/commit/bec4186c67345f1e6cd3f8a531bc228f14d7ed7b --

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()?

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: See also draft PEP 597 which proposes to use UTF-8 by default on Windows in Python 3.10: https://www.python.org/dev/peps/pep-0597/ -- ___ Python tracker

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()

2020-02-07 Thread STINNER Victor
Change by STINNER Victor : -- title: Deprecate sys._enablelegacywindowsfsencoding()? -> Deprecate sys._enablelegacywindowsfsencoding() ___ Python tracker ___

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

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

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()?

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

[issue37413] Deprecate sys._enablelegacywindowsfsencoding()?

2020-02-07 Thread STINNER Victor
STINNER Victor added the comment: One of sys._enablelegacywindowsfsencoding() issue is that os.fsdecode() and os.fsencode() are not updated, they continue to use UTF-8. Example on Windows: >>> import sys, os >>> sys.getfilesystemencoding() 'utf-8' >>> os.fsencode('\xe9') b'\xc3\xa9' >>>

<    1   2