[issue42747] Remove Py_TPFLAGS_HAVE_VERSION_TAG flag?

2020-12-30 Thread Petr Viktorin
Petr Viktorin added the comment: > I'm only aware of PyQt which uses the stable ABI. Is there other projects > using it? Do these projects check for Py_TPFLAGS_HAVE_VERSION_TAG or > Py_TPFLAGS_HAVE_FINALIZE flag? I think there are. Who knows how many; they're not required to register

[issue42764] HTMLParser close() issue

2020-12-30 Thread Anthony Hodson
Anthony Hodson added the comment: Resolved by correct initiation of subclass -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
New submission from Svyatoslav : Was making some typing conversions to string and noticed a different behavior of collections.abc.Callable and typing.Callable here in 3.9.1. Issues issue42195 and issue40494 can be related. >>> import collections, typing >>>

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Ken Jin
Ken Jin added the comment: You're welcome, and yes you're right! You can read the news item for it here https://docs.python.org/3/whatsnew/3.9.html#notable-changes-in-python-3-9-2. The expected release date for Python 3.9.2 is Monday, 2021-02-15 according to PEP 596

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
Svyatoslav added the comment: Thanks a lot! I am closing this issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42791] There is no way to json encode object to str.

2020-12-30 Thread Artyom Kaltovich
New submission from Artyom Kaltovich : Hello. At first I want to say thank you for all your efforts in python development. I really appreciate it. :) I am trying to convert custom object to json. But, I've found a problem. JSONEncoder has ``default`` method for converting custom objects

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Saiyang Gou
Saiyang Gou added the comment: Well, there is actually a bug: root@f1b4a742d8fc:/# python3.9 Python 3.9.1 (default, Dec 8 2020, 03:24:52) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x = [1, 2] >>> y = 3 >>> *x, y (1, 2, 3) >>> (*x), y

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2020-12-30 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41914] test_pdb fails

2020-12-30 Thread Ross Rhodes
Ross Rhodes added the comment: Hi Sumagna, test_pdb appears to be working as expected on my machine. I realise this was posted a few months ago so would you mind trying again and seeing if the issue persists? If so, which OS are you running your tests on? -- nosy: +trrhodes

[issue42773] build.yml workflow not testing on pushes

2020-12-30 Thread Filipe Laíns
Filipe Laíns added the comment: Ammar, could you confirm the issue is now solved? -- ___ Python tracker ___ ___ Python-bugs-list

[issue42773] build.yml workflow not testing on pushes

2020-12-30 Thread Ammar Askar
Ammar Askar added the comment: Thank you Filipe and Mariatta, the fix looks good to me. I think it needs a backport to the 3.9 branch though. -- ___ Python tracker ___

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: Regular division (/) yields a float, so 1 / 1 is 1.0. https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations says that for floor division, the arguments are first converted to a common type, which here would be float. So, your

[issue27820] Possible bug in smtplib when initial_response_ok=False

2020-12-30 Thread Pandu E POLUAN
Pandu E POLUAN added the comment: I tried creating a PR, but for the life of me I couldn't wrap my head around how testAUTH_LOGIN is being performed (it's in Lib/test/test_smtplib.py) All I know is, the test doesn't AT ALL test for situations where initial_response_ok=False. ALL tests are

[issue42789] Do not skip test_curses on non-tty

2020-12-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22851 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24009 ___ Python tracker

[issue42787] email.utils.getaddresses improper parsing of unicode realnames

2020-12-30 Thread Ross Rhodes
Ross Rhodes added the comment: Hi Konstantin, Thanks for raising this issue. It appears the field provided in your example does not conform to RFC 2822 followed by this email library. Square brackets are treated as special characters in [section

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2020-12-30 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, my message collided with rhettinger. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue42773] build.yml workflow not testing on pushes

2020-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +22853 pull_request: https://github.com/python/cpython/pull/24011 ___ Python tracker ___

[issue42773] build.yml workflow not testing on pushes

2020-12-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +22852 pull_request: https://github.com/python/cpython/pull/24010 ___ Python tracker ___

[issue42790] test.regrtest outputs to stdout instead of stderr

2020-12-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : unittest outputs progress and summary to stderr, but test.regrtest outputs it to stdout. Except that it outputs progress to stderr if option -W is used. It caused some problems with test_curses, because curses uses stdout, and when re-attach it to other

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: not a bug -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Ken Jin
Ken Jin added the comment: This was addressed in issue42195 and issue40494 as you pointed out :). It has been fixed in Python 3.10. Unfortunately the backport didn't make it in time for Python 3.9.1, and will come in Python 3.9.2 instead. Sadly there's not much to do about that. On 3.10:

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: The current behavior was specified in PEP 238: int / int -> float float // int -> float See: https://www.python.org/dev/peps/pep-0238/#semantics-of-floor-division -- nosy: +rhettinger resolution: -> not a bug stage: ->

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Svyatoslav
Svyatoslav added the comment: Ok, thanks for the answer. Did I understand correctly that the issue will be fixed in 3.9.2 as well? -- ___ Python tracker ___

[issue42789] Do not skip test_curses on non-tty

2020-12-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently many tests in test_curses are skipped if sys.__stdout__ is not attached to terminal. All tests are ran only when run them manually, and without using pager. This leads to passing bugs, like in issue42694. The proposed PR makes tests always

[issue42093] Add opcode cache for LOAD_ATTR

2020-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >Wow, this is amazing. I just found that this is now faster than slots. Not only that: is even faster than the highly-tuned namedtuple access descriptors that used to be the faster access to an attribute: 3.9 results --- 17.6 ns

[issue42787] email.utils.getaddresses improper parsing of unicode realnames

2020-12-30 Thread Konstantin Ryabitsev
New submission from Konstantin Ryabitsev : What it currently does: >>> import email.utils >>> email.utils.getaddresses(['Shuming [范書銘] ']) [('', 'Shuming'), ('', ''), ('', '范書銘'), ('', ''), ('', 'shumi...@realtek.com')] What it should do: >>> import email.utils >>>

[issue42788] Issue with Python’s Floor Division

2020-12-30 Thread yao_way
New submission from yao_way : There might be an issue with Python’s floor division: Experienced Behavior: >>> (1 / 1) // 1 --> 1.0; >>> (0 / 1) // 1 --> 0.0 Expected Behavior: >>> (1 / 1) // 1 --> 1; >>> (0 / 1) // 1 --> 0 -- components: Interpreter Core messages: 384073 nosy: yao_way

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2020-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset c56387f80c5aabf8100ceaffe365cc004ce0d7e0 by Yurii Karabas in branch 'master': bpo-27794: Add `name` attribute to `property` class (GH-23967) https://github.com/python/cpython/commit/c56387f80c5aabf8100ceaffe365cc004ce0d7e0 --

[issue40956] Use Argument Clinic in sqlite3

2020-12-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22849 pull_request: https://github.com/python/cpython/pull/24007 ___ Python tracker ___

[issue40633] json.dumps() should encode float number NaN to null

2020-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: @Luca: you might want to open a new feature request issue; it's not clear to me what exact behaviour change you're proposing for Python. What was rejected in this issue was the proposal to *automatically* convert NaNs and infinities to nulls by default, but

[issue30459] PyList_SET_ITEM could be safer

2020-12-30 Thread Christian Tismer
Christian Tismer added the comment: Congrats to that change! -- nosy: +Christian.Tismer ___ Python tracker ___ ___

[issue42760] inspect.iscoroutine returns False for asynchronous generator methods

2020-12-30 Thread Paolo Lammens
Change by Paolo Lammens : -- title: inspect.iscoroutine returns False for asynchronous generator functions -> inspect.iscoroutine returns False for asynchronous generator methods ___ Python tracker

[issue27640] add the '--disable-test-suite' option to configure

2020-12-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset 277ce3060becc120f1c877346562bd6880f4be71 by pxinwr in branch 'master': bpo-27640: Add --disable-test-modules configure option (GH-23886) https://github.com/python/cpython/commit/277ce3060becc120f1c877346562bd6880f4be71 --

[issue29708] support reproducible Python builds

2020-12-30 Thread Frederik Rietdijk
Frederik Rietdijk added the comment: Building Python packages reproducibly has now basically been resolved with the reproducible bytecode as well as changes in tools such as pip. Unfortunately, the interpreters do not yet seem to be reproducible. After certain changes, a Nixpkgs build of

[issue29708] support reproducible Python builds

2020-12-30 Thread STINNER Victor
STINNER Victor added the comment: > tiny bytecode differences bpo-37596 "Reproducible pyc: frozenset is not serialized in a deterministic order" is not fixed yet. -- ___ Python tracker

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2020-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PR :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.7 ___ Python tracker

[issue40633] json.dumps() should encode float number NaN to null

2020-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: > RFC 8259 (current RFC for JSON): https://tools.ietf.org/html/rfc7159 Argh; copy-and-paste fail. That link should have been https://tools.ietf.org/html/rfc8259, of course. -- ___ Python tracker

[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2020-12-30 Thread STINNER Victor
STINNER Victor added the comment: One GIL per interpreter requires to store the tstate per thread. I don't see any other option. We need to replace the global _PyRuntime atomic variable with a TLS variable. I'm trying to reduce the overhead, but it's heard to beat the performance of an

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

2020-12-30 Thread STINNER Victor
STINNER Victor added the comment: > _abc: abc_invalidation_counter is shared by all module instances. For the record, this one has been fixed by: commit 77c614624b6bf2145bef69830d0f499d8b55ec0c Author: Dong-hee Na Date: Sat May 9 17:31:40 2020 +0900 bpo-40566: Apply PEP 573 to abc

[issue40633] json.dumps() should encode float number NaN to null

2020-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: For the record, some helpful resources: ECMA-404 (the ECMA standardization of JSON): http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf RFC 8259 (current RFC for JSON): https://tools.ietf.org/html/rfc7159. (I mistakenly referred to

[issue42785] Support operator module callables in inspect.signature

2020-12-30 Thread Paolo Lammens
Paolo Lammens added the comment: Correction: ``` ValueError: callable operator.attrgetter('spam') is not supported by signature ``` -- ___ Python tracker ___

[issue42785] Support operator module callables in inspect.signature

2020-12-30 Thread Paolo Lammens
New submission from Paolo Lammens : Currently, `inspect.signature` doesn't support all callables from the `operator` module, e.g. `operator.attrgetter`: ```python >>> import inspect >>> import operator >>> inspect.signature(operator.attrgetter("spam")) ValueError: callable

[issue42760] inspect.iscoroutine returns False for asynchronous generator functions

2020-12-30 Thread Paolo Lammens
Change by Paolo Lammens : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2020-12-30 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +22850 pull_request: https://github.com/python/cpython/pull/24008 ___ Python tracker ___

[issue27640] Add --disable-test-modules configure option to not build nor install tests

2020-12-30 Thread STINNER Victor
Change by STINNER Victor : -- title: add the '--disable-test-suite' option to configure -> Add --disable-test-modules configure option to not build nor install tests ___ Python tracker

[issue27640] add the '--disable-test-suite' option to configure

2020-12-30 Thread STINNER Victor
STINNER Victor added the comment: Thanks all, it's now fixed in the master branch, the future Python 3.10. Thanks Xavier de Gaye for the initial patch and reported the issue. Thanks Peixing Xin for the final change which is now even better! Thanks also Thomas Petazzoni who maintained the

[issue42773] build.yml workflow not testing on pushes

2020-12-30 Thread miss-islington
miss-islington added the comment: New changeset 4ac923f2756f835f512339ee181348cc535ab07f by Filipe Laíns in branch 'master': bpo-42773: fix tests not being run on pushes (GH-24004) https://github.com/python/cpython/commit/4ac923f2756f835f512339ee181348cc535ab07f -- nosy:

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly this seems like a bug in 3.8 to me (if it indeed behaves like this): >>> (*x), y (1, 2, 3) Every time I mistakenly tried (*x) I really meant (*x,), so it's surprising that (*x), y would be interpreted as (*x, y) rather than flagging (*x) as an

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2020-12-30 Thread Mark Dickinson
Mark Dickinson added the comment: Your test file has the line: f = open("lol.txt", "r", "utf-8") But the third positional argument to the 'open' built-in function is "buffering", which expects an integer. Pass the "utf-8" argument by name instead: f = open("lol.txt", "r",

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: It makes sense to me to be able to do `(*a), b` if I can do `*a, b`, but I don't really have a strong opinion on it. -- ___ Python tracker

[issue41224] Document is_annotate() in symtable and update doc strings

2020-12-30 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +22857 pull_request: https://github.com/python/cpython/pull/24017 ___ Python tracker ___

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Saiyang Gou
Saiyang Gou added the comment: Also the current behavior allows `(*x), y = 1` assignment. If `(*x)` is to be totally disallowed, `(*x), y = 1` should also be rejected. -- ___ Python tracker

[issue29708] support reproducible Python builds

2020-12-30 Thread Inada Naoki
Inada Naoki added the comment: See bpo-34093 too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22855 pull_request: https://github.com/python/cpython/pull/24015 ___ Python tracker ___

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Guido van Rossum
Guido van Rossum added the comment: > It makes sense to me to be able to do `(*a), b` if I can do `*a, b`, but I > don't really have a strong opinion on it. I disagree. *a is not an expression, so the normal rules for parenthesizing those don't apply. I've always thought of *a as a feature

[issue42772] randrange() mishandles step when stop is None

2020-12-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +22858 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24018 ___ Python tracker

[issue42772] randrange() mishandles step when stop is None

2020-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Upon further reflection, I think these cases should raise a TypeError because the meaning is ambiguous: randrange(1000, step=10) # Could only mean start=0 stop=1000 step=10 but that conflicts with: randrange(1000, None, 100) # Has no reasonable

[issue42772] randrange() mishandles step when stop is None

2020-12-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +22854 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24014 ___ Python tracker

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2020-12-30 Thread Jah-On
Change by Jah-On : Added file: https://bugs.python.org/file49710/lol.txt ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Parenthesis can be added around expression. But `*a` is not an expression (as well as `+`, `or`, `1:5`, you cannot surround them with parenthesis). -- nosy: +serhiy.storchaka ___ Python tracker

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: Yup, this all sounds much more reasonable. Thanks for the explanation, Guido. > Also the current behavior allows `(*x), y = 1` assignment. If `(*x)` is to be > totally disallowed, `(*x), y = 1` should also be rejected. This is allowed in 3.9.1 and

[issue42792] [MacOS] Can't open file in a separate (threading.Thread) thread

2020-12-30 Thread Jah-On
New submission from Jah-On : Tested on MacOS Big Sur... Most recent version as of posting. -- components: macOS files: test.py messages: 384088 nosy: Jah-On, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: [MacOS] Can't open file in a separate

[issue41224] Document is_annotate() in symtable and update doc strings

2020-12-30 Thread Andrés Delfino
Change by Andrés Delfino : -- pull_requests: +22856 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24016 ___ Python tracker ___

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2020-12-30 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Using SQLite 3.35.0 nightly build, building Python using PCbuild/build.bat and PCBuild\pcbuild.sln with VS 2017 (does this reflect how the Windows team build the installers?), I can confirm that math functions are _not_ included by default. I added

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I'll work on finding out when this got messed up and fix it. Apparently is commit bca701403253379409dece03053dbd739c0bd059 (HEAD) Author: Lysandros Nikolaou Date: Tue Oct 27 00:42:04 2020 +0200 bpo-42123: Run the parser two times and only

[issue40631] PEG Parser: Cannot used starred expression in parenthesised expr

2020-12-30 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +22859 pull_request: https://github.com/python/cpython/pull/24019 ___ Python tracker ___

[issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument

2020-12-30 Thread Raymond Sit
Change by Raymond Sit : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___