[issue38820] Make Python compatible with OpenSSL 3.0.0

2021-04-13 Thread Christian Heimes
Change by Christian Heimes : -- dependencies: +OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1, Run GHA CI with multiple OpenSSL versions ___ Python tracker ___ ___

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-13 Thread Christian Heimes
Christian Heimes added the comment: New changeset b71aaa0df0f3a9640b034b4774651cd8c54d2fb9 by Christian Heimes in branch '3.8': [3.8] bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) (GH-25383) https://github.com/python/cpython/commit/b71aaa0df0f3a9640b034b4774651cd8c54d

[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-13 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

2021-04-13 Thread Andrew Ushakov
Andrew Ushakov added the comment: Just tested again: D:\Downloads>py Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 4 2021, 13:27:16) [MSC v.1928 64 bit (AMD64)

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread Christian Heimes
Christian Heimes added the comment: The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it sp

[issue43827] abc conflicts with __init_subclass__

2021-04-13 Thread Vlad Hoi
New submission from Vlad Hoi : from abc import ABC class A: def __init_subclass__(self): pass class B(ABC, A, name="name"): pass After initialising class B, this exception occurs, because multiple "name" arguments where provided: Traceback (most recent call last): File

[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2021-04-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the reminder. You are correct, the mentioned PR should set _SSLProtocolTransport._start_tls_compatible to True -- ___ Python tracker

[issue43828] MappingProxyType accepts string

2021-04-13 Thread Andy Maier
New submission from Andy Maier : MappingProxyType objects can currently be initialized from a string object. Given is purpose, I think this is a bug and should result in TypeError being raised. Example code (on CPython 3.9.1): >>> from types import MappingProxyType >>> mp = MappingProxyType(

[issue43828] MappingProxyType accepts string

2021-04-13 Thread Andy Maier
Change by Andy Maier : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43829] MappingProxyType cannot hash a hashable underlying mapping

2021-04-13 Thread Andy Maier
New submission from Andy Maier : Objects of MappingProxyType do expose a __hash__() method, but if the underlying mapping is hashable, it still does not support hashing it. Example: Content of mp_hash.py: -- #!/usr/bin/env python from nocasedict import NocaseDict, HashableMixin from typ

[issue43824] array.array.__deepcopy__() accepts a parameter of any type

2021-04-13 Thread MingZhe Hu
MingZhe Hu added the comment: copy.deepcopy() takes a memo argument for reason, but this memo object will not be used when passed to array.array.__deepcopy__(), that is, no matter called directly or not, as long as the C implementation of array.array.__deepcopy__() does not use the parameter

[issue43824] array.array.__deepcopy__() accepts a parameter of any type

2021-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I you declare a method as METH_NOARGS, you would not able to pass any argument to it. I concur with Josh. There is nothing wrong here. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Nathan Fallet
New submission from Nathan Fallet : Complex exponentiation doesn't work as expected: ``` >>> (-1) ** 0.5 (6.123233995736766e-17+1j) ``` I think the issue is linked with this part of the code: https://github.com/python/cpython/blob/32bd68c839adb7b42af12366ab0892303115d1d1/Objects/complexobject.

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: FWIW, we have implemented a faster algorithm for divmod for big numbers using Mark's fast_div.py in PyPy. In particular, this speeds up str(long) for large numbers significantly (eg calling str on the result of math.factorial(2**17) is now 15x f

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue43731] PEP 597: logging.fileConfig() uses locale encoding.

2021-04-13 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue43731] PEP 597: logging.fileConfig() uses locale encoding.

2021-04-13 Thread Inada Naoki
Inada Naoki added the comment: New changeset c2b7a66b91cdb96fbfdb160f96797208ddc5e436 by Inada Naoki in branch 'master': bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25273) https://github.com/python/cpython/commit/c2b7a66b91cdb96fbfdb160f96797208ddc5e436 -- __

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- keywords: +patch pull_requests: +24116 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25384 ___ Python tracker ___

[issue43803] ctypes string_at/wstring_at - bad argument name used in docs and in docstring

2021-04-13 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: PR opened for this issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

2021-04-13 Thread Eryk Sun
Eryk Sun added the comment: > P.S. No problems with Python 3.8.5 and Ubuntu 20.04.2 LTS. The issue is that the line length is limited to BUFSIZ, which ends up splitting the UTF-8 sequence b'\xe2\x96\x91'. BUFSIZ is only 512 bytes in Windows. It's 8192 bytes in Linux, in which case you need a

[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

2021-04-13 Thread Eryk Sun
Change by Eryk Sun : -- stage: test needed -> needs patch versions: -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43731] PEP 597: logging.fileConfig() uses locale encoding.

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: > fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None) If "locale" is the intended default, why not being more explicit and use encoding="locale"? -- nosy: +vstinner ___ Python tracker <

[issue42904] get_type_hints does not provide localns for classes

2021-04-13 Thread Ken Jin
Ken Jin added the comment: Yup I can! BTW, I agree with keeping the change in 3.10 only. I suspect it _may_ be backwards-incompatible in small edge cases (re: the long comment on the PR about suspicions with local and global scope). -- resolution: -> fixed stage: patch review -> res

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: What do you mean? It works as I expected. Can you explain what you expected, and why? -- nosy: +steven.daprano ___ Python tracker ___

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: Before replying please read: https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate https://duckduckgo.com/?q=python+why+are+floating+point+so+inaccurate -- ___ Python tracker

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: Sorry Nathan, I worded my first response awkwardly, of course mathematically we should expect a result of 1j, by why do you expect it in a floating point calculation? Do you have an alternative? (I promise this is my last comment until you have had a chance

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread Stefan Behnel
Stefan Behnel added the comment: The macros were moved to "Includes/cpython/", not to "Includes/internal/". That suggests to me that they should use "extern C", so that C++ code that wants to make use of CPython internals can use them. Basically, the way I see it, *all* header files in "Incl

[issue43646] ForwardRef name conflict during evaluation

2021-04-13 Thread Ken Jin
Ken Jin added the comment: @tefra, now that issue42904 has been solved, can you test your code again with 3.10.0a8? (it's not out yet, so you may have to pull the code from CPython's GitHub master branch and build CPython) Running your code again, it seems to be fixed: Python 3.10.0a7+ >>>

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-13 Thread Mark Shannon
Mark Shannon added the comment: New changeset 9e7b2076fb4380987ad0262c4c0ca900b06475ad by Mark Shannon in branch 'master': bpo-43760: Speed up check for tracing in interpreter dispatch (#25276) https://github.com/python/cpython/commit/9e7b2076fb4380987ad0262c4c0ca900b06475ad -- ___

[issue43731] PEP 597: logging.fileConfig() uses locale encoding.

2021-04-13 Thread Inada Naoki
Inada Naoki added the comment: If we use `encoding="locale"` by default, EncodingWarning will be not be emitted even when user omit `encoding` option. -- ___ Python tracker

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread Eryk Sun
Change by Eryk Sun : -- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ __

[issue42722] Add --debug command line option to unittest to enable post-mortem debugging

2021-04-13 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43827] abc conflicts with __init_subclass__

2021-04-13 Thread Vlad Hoi
Change by Vlad Hoi : -- keywords: +patch pull_requests: +24117 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25385 ___ Python tracker ___ ___

[issue43831] sqlite: convert_timestamp raises ValueError for empty columns

2021-04-13 Thread Lumír Balhar
New submission from Lumír Balhar : Hello. I've discovered this issue when I was debugging a test failure in IPython. See this issue for more details (not needed): https://github.com/ipython/ipython/issues/12906 I'm testing this on Fedora Linux with Python 3.10.0a7 from our RPM package with S

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 54db51c9114ac49030832f5134979ca866ffd21c by Andrew V. Jones in branch 'master': bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365) https://github.com/python/cpython/commit/54db51c9114ac49030832f5134979ca866ffd21c -- ___

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +24119 pull_request: https://github.com/python/cpython/pull/25386 ___ Python tracker _

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +24120 pull_request: https://github.com/python/cpython/pull/25387 ___ Python tracker ___ __

[issue43770] Rework C types initialization

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 65f058eb081c9e1fe44115d1ac7966067e3650c7 by Victor Stinner in branch 'master': bpo-43770: Reorder type_ready() (GH-25373) https://github.com/python/cpython/commit/65f058eb081c9e1fe44115d1ac7966067e3650c7 -- ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-13 Thread Florian Bruhin
Florian Bruhin added the comment: I'm probably a bit late to the party as well, but as some additional datapoints: - This broke the tests for my project and I ended up adding a wrapper to stringify enums (since I actually prefer having the enum type in debug logs and such): https://github.c

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread miss-islington
miss-islington added the comment: New changeset 47a894d338f436ea8f513f1ad2cc7e1b086e99cc by Miss Islington (bot) in branch '3.8': bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365) https://github.com/python/cpython/commit/47a894d338f436ea8f513f1ad2cc7e1b086e99cc -- _

[issue2824] zipfile to handle duplicate files in archive

2021-04-13 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- nosy: +obfusk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 15ad30d88fead718b7eeff8c54454b82753d520e by Miss Islington (bot) in branch '3.9': bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365) (GH-25387) https://github.com/python/cpython/commit/15ad30d88fead718b7eeff8c54454b82753d520e --

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: It's now fixed. Thanks Andrew V. Jones for the fix. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: The workaround for this issue is to put extern "C" around #include , or around the header file which includes . -- ___ Python tracker ___ __

[issue43770] Rework C types initialization

2021-04-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24121 pull_request: https://github.com/python/cpython/pull/25388 ___ Python tracker ___ __

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is the same "gotcha" as >>> math.cos(math.pi/2) 6.123233995736766e-17 You can expect that cos(π/2) is exactly 0, but floating point value math.pi is only an approximation of the π number. The difference between math.pi and exact value of π leads to non-

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue43770] Rework C types initialization

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset a328d73843cfd42d2aee1434c78df1ef2845931a by Victor Stinner in branch 'master': bpo-43770: Cleanup type_ready() (GH-25388) https://github.com/python/cpython/commit/a328d73843cfd42d2aee1434c78df1ef2845931a -- ___

[issue43816] Missing 'extern "C"' for _Py_ctype_table

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: Stéphane Wirtel: "In fact, _Py_ctype_table is limited to the internal parts of the interpreter. So in this case, this one could not be used in an external tool. You can read: https://docs.python.org/3/c-api/stable.html"; You're right that pyctype.h is exclude

[issue43770] Rework C types initialization

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: If I modify type_ready() to call type_ready_inherit() before type_ready_fill_dict(), some types create a between between their C slot (tp_init) and the Python API in tp_dict (tp_dict["__init__"]). Example with importlib: class FileLoader(...): def __ini

[issue43817] Add typing.get_annotations()

2021-04-13 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mail

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, if you're specifically interested in complex square roots rather than powers in general, I'd recommend using `cmath.sqrt(value)` rather than `value**0.5` - there are fewer intermediate steps involved in computing `cmath.sqrt`, and the returned value wi

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: > we have implemented a faster algorithm for divmod for big numbers using > Mark's fast_div.py in PyPy Urk! I hope your implementation included a healthy dose of validation, testing and cleanup. :-) (I have no doubts that it did.) I'd consider fast_div.py t

[issue43731] PEP 597: logging.fileConfig() uses locale encoding.

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: Ah, so you want to emit an EncodingWarning when fileConfig(filename) is called without specifying an encoding, right? -- ___ Python tracker

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +BTaskaya, lys.nikolaou, pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, I think we should close this; the same comments as in issue 26256 apply. See msg259408 onwards in that discussion. -- ___ Python tracker __

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I don't get any error executing the t33a.py script -- ___ Python tracker ___ ___ Python-bu

[issue40432] Pegen regenerate project for Windows not working

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Seems that the regeneration script is not detecting correctly that needs Python3.8+ for regenerating pegen. Check for instance: https://buildbot.python.org/all/#/builders/596/builds/2/steps/2/logs/stdio -- resolution: fixed -> status: closed

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue40432] Pegen regenerate project for Windows not working

2021-04-13 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +24122 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25389 ___ Python tracker

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: yes, that sounds fair. In PyPy we improve things occasionally if somebody feels like working on it, but in general competing against GMP is a fools errand. -- ___ Python tracker

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: Python has a reasonable efficiency up to 1000 decimal digits (according to benchmark) which is already really great! Operations with more than 1000 decimal digits is an uncommon. IMO you should use a dedicated library like GMP for that. I would prefer to ke

[issue43832] asyncio + multiprocessing = core dump in sem_trywait

2021-04-13 Thread Andrei Pozolotin
New submission from Andrei Pozolotin : every attempt to touch multiprocessing.Event.is_set() from asyncio.run() results in reproducible core dump in sem_trywait system: Linux 5.11.8 Linux work3 5.11.8-arch1-1 #1 SMP PREEMPT Sun, 21 Mar 2021 01:55:51 + x86_64 GNU/Linux Python: 3.9.2 http

[issue43832] asyncio + multiprocessing = core dump in sem_trywait

2021-04-13 Thread Andrei Pozolotin
Change by Andrei Pozolotin : Added file: https://bugs.python.org/file49957/dump_core.txt ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43797] Improve syntax error for invalid comparisons

2021-04-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24123 pull_request: https://github.com/python/cpython/pull/25390 ___ Python tracker ___ ___

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread Eryk Sun
Eryk Sun added the comment: > I don't get any error executing the t33a.py script The second line in t33a.py is 1618 bytes. The standard I/O BUFSIZ in Linux is 8192 bytes, but it's only 512 bytes in Windows. The latest alpha release, 3.10a7, includes your rewrite of the tokenizer, and in that

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > no longer fails in Windows. So that means we can close the issue, no? -- ___ Python tracker ___ ___

[issue40066] Enum: modify __repr__, __str__; update docs

2021-04-13 Thread Ethan Furman
Ethan Furman added the comment: Thank you for the feedback. The new str() and repr() make more sense for Flag-based enumerations, and I'm hesitant to have different formats for Enum- vs Flag-based enums. Would it be helpful to have another base Enum class to derive from that maintained th

[issue43797] Improve syntax error for invalid comparisons

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 30ed93bfec5dfa7ee05982e2df8fd810f3f49305 by Pablo Galindo in branch 'master': bpo-43797: Handle correctly invalid assignments inside function calls and generators (GH-25390) https://github.com/python/cpython/commit/30ed93bfec5dfa7ee05982

[issue14811] decoding_fgets() truncates long lines and fails with a SyntaxError("Non-UTF-8 code starting with...")

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: With https://bugs.python.org/issue14811#msg160706 I get a SyntaxError on Python 3.7, 3.8, 3.9 and 3.10.0a6. But I don't get an error on the master branch (Python 3.10.0a7+). Eryk: > The latest alpha release, 3.10a7, includes your rewrite of the tokenizer, an

[issue41515] typing.get_type_hints generates KeyError

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: I see that all PRs are merged, and the CI issue is fixed as well. I close the issue. commit eb77133564d74eb09ed63872a69b9827d4841b49 Author: Karthikeyan Singaravelan Date: Tue Apr 13 19:24:23 2021 +0530 bpo41515: Fix assert in test which throws Syntax

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread miss-islington
miss-islington added the comment: New changeset 8fa1489365e7af8b90286c97db55a2dc60a05cde by Christian Heimes in branch 'master': bpo-43811: Test multiple OpenSSL versions on GHA (GH-25360) https://github.com/python/cpython/commit/8fa1489365e7af8b90286c97db55a2dc60a05cde -- nosy: +mi

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +24124 pull_request: https://github.com/python/cpython/pull/25391 ___ Python tracker ___ __

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +24125 pull_request: https://github.com/python/cpython/pull/25392 ___ Python tracker ___ __

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread sco1
New submission from sco1 : Came across this riddle today: >>> [0x_for x in (1, 2, 3)] [15] Initially I thought this was related to PEP 515 but the unexpected behavior extends to simpler examples as well, such as: >>> x = 5 >>> 123or x 123 >>> 123and x 5 I'm not familiar enough with C to und

[issue43810] os.path.abspath returns invalid path (resolves symbolic link)

2021-04-13 Thread Rene Visser
Rene Visser added the comment: Thanks Eryk for your fast response. Apparently I somehow skipped the remark about symbolic links in combination with abspath. Thank you for pointing this out and apologies for wasting some of your time!! Best wishes, Rene Visser On Mon, Apr 12, 2021 at 7:40 AM Ery

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Ned Batchelder
Change by Ned Batchelder : -- nosy: +nedbat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue43831] sqlite: convert_timestamp raises ValueError for empty columns

2021-04-13 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Hi Lumír, thank you for your report. This is a duplicate of bpo-43752. The bugfix currently is awaiting review, and will be included in python3.10b1 (expected in approx. three weeks). -- nosy: +berker.peksag, erlendaasland __

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Rich rauenzahn
Change by Rich rauenzahn : -- nosy: +rrauenza ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread sco1
sco1 added the comment: Sorry, the bonus, while fun, I don't think is related -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue39232] asyncio crashes when tearing down the proactor event loop

2021-04-13 Thread Michael Hall
Change by Michael Hall : -- versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43725] Create a release branch ABI stability regression test

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: > Oh wow, that's terrible... yet another good reason not to export data values. _Py_M__importlib_bootstrap_external symbol doesn't seem to be exported. Why is it seen as a public symbol? $ objdump -T /lib64/libpython3.10.so.1.0|grep _Py_M__importlib_bootstr

[issue43725] Create a release branch ABI stability regression test

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: > We could ignore all functions that start with _Py. Some symbols starting with _Py are indirectly part of the ABI. Example of Include/cpython/pyctype.h: #define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER) PyAPI_DATA(const unsigned int) _

[issue43725] Create a release branch ABI stability regression test

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: In a Python stable version, I would suggest to only ignore an ABI change after a manual validation .Otherwise, we can miss real issues. Well, I expect that at the beginning, we will discover many issues like _Py_M__importlib_bootstrap_external ;-) -

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Alistair Muldal
Alistair Muldal added the comment: Several other keywords seem to be affected, including `if`, `else`, `is`, and `in` -- nosy: +alimuldal ___ Python tracker ___ _

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread miss-islington
miss-islington added the comment: New changeset 5ce227f3a767e6e44e7c41e0c845a83cfca4 by Miss Islington (bot) in branch '3.9': [3.9] bpo-43811: Test multiple OpenSSL versions on GHA (GH-25360) (GH-25391) https://github.com/python/cpython/commit/5ce227f3a767e6e44e7c41e0c845a83cfca4 --

[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2021-04-13 Thread Jordan Borean
Jordan Borean added the comment: Fantastic thanks, I'll keep watching the issue in the background as it sounds like it's under control. -- ___ Python tracker ___

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: It's not just about keywords. Eg '1x' tokenizes too but then produces a syntax error in the parser. Keywords are only special in that they can be used to write syntactically meaningful things with these concatenated numbers. -- nosy: +Ca

[issue43811] Run GHA CI with multiple OpenSSL versions

2021-04-13 Thread miss-islington
miss-islington added the comment: New changeset a607815eb07582deb3c5818be881a98abe25a100 by Miss Islington (bot) in branch '3.8': [3.8] bpo-43811: Test multiple OpenSSL versions on GHA (GH-25360) (GH-25392) https://github.com/python/cpython/commit/a607815eb07582deb3c5818be881a98abe25a100 --

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is know behaviour unfortunately and cannot be changed because of backwards compatibility. -- nosy: +pablogsal ___ Python tracker ___

[issue43725] Create a release branch ABI stability regression test

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Ok, then we need to revert by latest 2 PRs and add a new label or something to skip -- ___ Python tracker ___ ___

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good example! Similar issue was discussed on the mailing list 3 years ago (https://mail.python.org/archives/list/python-...@python.org/thread/D2WPCITHG2LBQAP7DBTC6CY26WQUBAKP/#D2WPCITHG2LBQAP7DBTC6CY26WQUBAKP). Now with new example it perhaps should be recon

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Hi. I'm totally confused about other keywords but I'm a little concerned about the "and", "or" operator when used on, not only "int" (also known as "long") but also most Python objects other then bool type. Mostly when used on Python built-in objects "and",

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: We tried changing this IIRC and it broke code in the stdlib (now reformatted) so it will break code in the wild. I am not sure the gains are worth it. -- ___ Python tracker

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Better example: >>> [0x1for x in (1,2)] [31] The code is parsed as [0x1f or x in (1,2)] instead of [0x1 for x in (1,2)] as you may expect. -- ___ Python tracker ___

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Precisely because examples like that changing this is a breaking change. Don't get me wrong: I would love to change it, but I don't know if is worth the risk -- ___ Python tracker

[issue43834] Use context manager in StringIO example

2021-04-13 Thread John Hagen
New submission from John Hagen : The example for StringIO currently manually closes the object rather than using a context manager. Since this is likely the first code that a new user encounters and context managers reduce error-prone situations, I think it would be helpful to show usage as a

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread sco1
sco1 added the comment: Appreciate the additional historical context, I also was pointed to this in the documentation: https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens If a parsing change is undesired from a backwards compatibility standpoint, would it be

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Anthony Sottile
Anthony Sottile added the comment: here's quite a few other cases as well -- I'd love for this to be clarified in PEP8 such that I can rationalize crafting a rule for it in `pycodestyle` -- https://github.com/PyCQA/pycodestyle/issues/371 -- nosy: +Anthony Sottile ___

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-04-13 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: One thing we could consider as Serhiy proposed on the mailing list is to emit a Syntax Warning. The ambiguous cases are specially scary so I think that makes sense -- ___ Python tracker

  1   2   >