[issue42887] Multiple assignments of attribute "__sizeof__" will cause a segfault

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: I can reproduce the issue. The stack trace is several hundred thousand (!) levels deep. #0 _Py_DECREF (op=, lineno=514, filename=0x6570af "./Include/object.h") at ./Include/object.h:448 #1 _Py_XDECREF (op=) at ./Include/object.h:514 #2 meth_dealloc

[issue42887] Multiple assignments of attribute "__sizeof__" will cause a segfault

2021-01-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is a recursion problem, "mystr" will be equivalent to 'hello123'.__sizeof__.__sizeof__. ...(100K repetition)... .__sizeof__. The dealloc of "mystr" will cause recursive calls to tp_dealloc along the entire chain and that can exhaust the C stack.

[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-11 Thread Mark Dickinson
Mark Dickinson added the comment: @Camion: Can you say more about your use-case? One thing that's on my would-be-nice-to-do-one-day list is 'e', 'f' and 'g'-style decimal formatting for Fraction objects. Without that, it's often hard to get a quick sense of the magnitude of a Fraction withou

[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Xinmeng Xia
Xinmeng Xia added the comment: >>python310 -V Python 3.10.0a2 >>uname -v #73~16.04.1-Ubuntu SMP Fri Sep 13 09:56:18 UTC 2019 Thank you! -- ___ Python tracker ___ ___

[issue42885] Regex performance problem with ^ aka AT_BEGINNING

2021-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm getting similar results in Python 3.9. [steve ~]$ python3.9 -m timeit -s "a = 'A'*1" -s "import re" "re.search('^x', a)" 5000 loops, best of 5: 67.3 usec per loop [steve ~]$ python3.9 -m timeit -s "a = 'A'*10" -s "import re" "re.search('^x', a)"

[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Guido wrote: > it would require the math.log function to recognize rationals I don't think it would. You don't need a type-check, you just need to check for a pair of numerator and denominator attributes. So we could do something like this, except in C:

[issue42890] bug float to int

2021-01-11 Thread Wlodek
New submission from Wlodek : Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> f=0.1234/100 >>> f2= f*10**8 >>> i2= int(f2) >>> print("float=%f, float_2=%f, int(float_2)=%d" % (f, f2, int(f2))) float=0.0

[issue42867] Entry Widget not editable on Windows 10, but is on Linux Ubuntu 16.04

2021-01-11 Thread John McCabe
John McCabe added the comment: Thank you for that information and analysis Terry. As you can see, at the end of the addNew() function in the original example, I'd added: --- if initialLeft is not None: rightBox.insert(tk.END, initialLeft) self.leftRightEntries.appe

[issue42890] bug float to int

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: Rounding errors are to be expected. Python uses IEEE-754 double precision floats. See https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed type: -> beh

[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: Please provide more information. What Linux distribution and distro version are you using? How did you install Python? -- ___ Python tracker _

[issue42874] running configure on Solaris 10 gives grep "illegal option" errors

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: Paul, please take a look. You added the code in commit 62972d9d73e. -- nosy: +christian.heimes, p-ganssle ___ Python tracker ___ __

[issue42327] Add PyModule_Add()

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: Note for myself: I added PyModule_AddObjectRef() to https://github.com/pythoncapi/pythoncapi_compat If it's renamed, pythoncapi_compat must also be updated. -- ___ Python tracker

[issue41771] bdist_wininst doesn't execute postinstall script

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue809846] bdist_wininst doesn't clean up read-only files in build dir

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue13123] bdist_wininst uninstaller does not remove pycache directories

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue13276] bdist_wininst-created installer does not run the postinstallation script when uninstalling

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue9456] Apparent memory leak in PC/bdist_wininst/install.c

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue8171] bdist_wininst builds wrongly for --plat-name=win-amd64

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue26554] PC\bdist_wininst\install.c: Missing call to fclose()

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue4480] bdist_msi and bdist_wininst are missing an uninstaller icon

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue4878] post installer script's message is not shown to user with bdist_wininst

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue13038] bdist_wininst installers should warn if target dir is read-only

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue4636] bdist_wininst installer with install script raises exception

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue17419] bdist_wininst installer should allow install in user directory

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue15321] bdist_wininst installers may terminate with "close failed in file object destructor:\nsys.excepthook is missing\nlost sys.stderr"

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue12200] bdist_wininst install_script not run on uninstall

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue1109963] bdist_wininst ignores build_lib from build command

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802. -- nosy: +vstinner resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue42802] distutils: Remove bdist_wininst command

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: I closed the 19 open issues which contained "wininst" in their title as "wont fix" with the message: "The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802." You can simply search for closed issue which contains "wininst" in the

[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Xinmeng Xia
Xinmeng Xia added the comment: >>uname -a Linux xxm-System-Product-Name 4.15.0-64-generic #73~16.04.1-Ubuntu SMP Fri Sep 13 09:56:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux >>uname -r 4.15.0-64-generic >>lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:Ubu

[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: It might be a packaging or documentation issue. I'm assiging the ticket to Matthias. He is the Debian and Ubuntu package maintainer. -- assignee: -> doko nosy: +doko ___ Python tracker

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2021-01-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Tomáš Hrnčiar
Change by Tomáš Hrnčiar : -- keywords: +patch nosy: +hrnciar nosy_count: 5.0 -> 6.0 pull_requests: +23017 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24190 ___ Python tracker _

[issue33972] AttributeError in email.message.iter_attachments()

2021-01-11 Thread Xavier Hausherr
Xavier Hausherr added the comment: The problem still occurs with the _find_body method. The "part.is_attachment()" method can trigger an AttributeError too "AttributeError: 'str' object has no attribute 'is_attachment'" https://github.com/python/cpython/blob/3.9/Lib/email/message.py#L978 -

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
New submission from Amirouche Boubekki : Here is a simple way to reproduce: from lsm import LSM db = LSM('db.sqlite') def app(environ, start_response): """Simplest possible application object""" for (index, (key, value)) in enumerate(db[b'\x00':b'\xFF']): pass start_re

[issue33972] AttributeError in email.message.iter_attachments()

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: Xavier, I think it would be best if you could open a new issue for that, and also include code to reproduce the problem. -- ___ Python tracker ___

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: I put the code in a "bla.p" script and I ran it with Python 3.8 on Fedora 33: python3.8 -m venv env env/bin/python -m pip install lsm-db env/bin/python bla.py It doesn't crash. Please provide a script reproducing the issue. Note: lsm-db cannot be installed

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: You need to run the program with the following: python -X dev -c "from gunicorn.app.wsgiapp import run; run()" --workers=1 foobar:app where foobar.py is the code from the previous message. The crash happen when, the function `app` is executed, hence y

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: I get a crash without any code, just by running gunicorn. It looks like a bug in gunicorn. --- $ python3.8 -m venv env $ env/bin/python -m pip install gunicorn (..) Successfully installed gunicorn-20.0.4 $ ./env/bin/python -X dev -c 'from gunicorn.app.wsgiap

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: I've simplified the format() code in the PR, based on the observation that only one chained exception is ever emitted. I think it's reasonably simple now. -- ___ Python tracker _

[issue31904] Python should support VxWorks RTOS

2021-01-11 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +23018 pull_request: https://github.com/python/cpython/pull/24191 ___ Python tracker ___ _

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: > ModuleNotFoundError: No module named 'foobar' That is not a segfault. The problem I am reporting is a segfault. It can be reproduced with uvicorn as follow: from lsm import LSM db = LSM('db.sqlite') async def app(scope, receive, send): assert s

[issue42880] ctypes: variadic function call still doesn't work on Apple Silicon

2021-01-11 Thread Ned Deily
Ned Deily added the comment: > Seems that we are getting the same libffi.dylib. I suppose it is still possible that another libffi is being found first. To be absolutely sure, you could ask dyld to print the loaded libraries: $ DYLD_PRINT_LIBRARIES=1 python3.9 test_main.py [...] dyld: loaded

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: I tried to reduce the program by replacing gunicorn / uvicorn dependency with threading.Thread and multiprocess.Pool without success. -- ___ Python tracker

[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-01-11 Thread seb
seb added the comment: Thanks for the help! I tried the instructions, without success. I installed xz through homebrew (which needs to be installed on Silicon under /opt/homebrew). I can confirm the existance of: /opt/homebrew/Cellar/xz/5.2.5/include/lzma.h I used CPPFLAGS and also modified

[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Xavier Hausherr
New submission from Xavier Hausherr : Following this issue: https://bugs.python.org/issue33972 Same bug apply to email.message.get_body() with attached email example and the following code: from email.policy import default import email with open('email_bad_formatted.

[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 4.0 -> 5.0 pull_requests: +23019 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24192 ___ Python tracker _

[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Xavier Hausherr
Xavier Hausherr added the comment: Attached PR fix the issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue41433] Logging libraries BufferingHandler flushed twice at shutdown

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: I'm assuming the link solved your issue. If you are still having a problem please create a new issue, and include a code snippet to show what you are doing exactly. -- resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23020 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24193 ___ Python tracker ___ _

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread STINNER Victor
STINNER Victor added the comment: Oh. In _PyUnicode_FromId(), I made the assumption that _PyRuntime is left unchanged when Py_Initialize()Py_Finalize() is called multiple times. But I was wrong, it is always reset to zero. So I wrote PR 24193 to explicitly save/restore _PyRuntime.unicode_ids

[issue42893] Strange XPath search behavior of xml.etree.ElementTree.Element.find

2021-01-11 Thread robpats
New submission from robpats : Python 3.6.8 / 3.7.9 / 3.8.7 >>> import xml.etree.ElementTree >>> e = xml.etree.ElementTree.fromstring('>> class="row"/>') >>> list(e) [, , , , , ] >>> e.find("./div[1]") >>> e.find("./div[2]") >>> e.find("./div[3]") >>> e.find("./hr[1]") >>> e.find("./hr[2]"

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki
Amirouche Boubekki added the comment: The problem is prolly in lsm-db. ref: https://github.com/coleifer/python-lsm-db/issues/20 Sorry for the noise. -- resolution: -> third party status: open -> closed ___ Python tracker

[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain

2021-01-11 Thread Jeff Moguillansky
New submission from Jeff Moguillansky : I have a question regarding debugging native Python modules on Windows, with Visual Studio toolchain: Currently I have a native module (native C code), along with Python API bindings (via Cython), and finally Python code that invokes the native module.

[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread JD-Veiga
New submission from JD-Veiga : I was trying to return the concatenation of several lists from a function but, inadvertently, forgot to surround the multi-line concatenation expression with parentheses. As a result, the function returns just the first operand and does not perform the concate

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread Yannick Jadoul
Yannick Jadoul added the comment: Wow, that was fast! Thanks! I tried this out locally, and all pybind11's tests pass now. We can try again once there's a nightly build or new alpha :-) -- ___ Python tracker _

[issue42896] Solaris 11.4 crle output not handled correctly

2021-01-11 Thread David Murphy
New submission from David Murphy : >From porting Python 3.7.8 to Solaris 11.4 (base open version) found that the >handling of crle output has changed between Solaris 11.3 and 11.4 and >accommodation has not been made for the change. For example: Solaris 11.3 root@sol11:~/sol_build/proto_salt#

[issue42896] Solaris 11.4 crle output not handled correctly

2021-01-11 Thread David Murphy
David Murphy added the comment: Forgive any process/workflow errors first time, submitting to Python -- ___ Python tracker ___ ___

[issue24711] Document getpass.getpass behavior on ^C

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: Works for me on both linux and windows. -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue17243] The changes made for issue 4074 should be documented

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- stage: needs patch -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mai

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-11 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +23021 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24135 ___ Python tracker _

[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-11 Thread Camion
Camion added the comment: @mark.dickinson, I fell on this problem in the reached precision evaluation, of a multiprecision algorithm designed to compute decimals of PI (using "John Machin like" formulas). The fact is that fractions module is really nice to implement this kind of multipreci

[issue42897] Expose a way to determine if a process has been closed or not

2021-01-11 Thread Peter Van Sickel
New submission from Peter Van Sickel : I have been using the multiprocessing Process class a good bit lately. I have a class that is managing the a given list of processes from launch to completion. Recently I started using Process close(). I found myself wanting to determine if a given proc

[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: This is not a bug -- it is how it's supposed to work (for better or for worse). Please see a use forum to help you understand what's going on here. -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Steve, is there a better way? -- components: +Windows -C API nosy: +gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker _

[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate superseder: -> warnings module offers no documented, programmatic way to reset "seen-warning" flag ___ Python tracker __

[issue21865] Improve invalid category exception for warnings.filterwarnings

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Better warnings exception for bad category ___ Python tracker _

[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: As Guido says, a full explanation will have to to a user-forum such as https://discuss.python.org/c/users/7 but consider this example and see if it gives you insight: def demo(): x = 1 return ( x - 1 ) print("This is not executed

[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2021-01-11 Thread William Schwartz
William Schwartz added the comment: > For that, please submit a PR to importlib_resources and it will get synced to > CPython later. Will do once PR 23611 gets in shape. > Can you tell me more about the use-case that exhibited this undesirable > behavior? Using the [PyOxidizer] "freezer".

[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Kale Kundert
New submission from Kale Kundert : I expect `pickle.loads()` to raise `_pickle.UnpicklingError` for any invalid input, but for the specific example shown below, the interpreter crashes after attempting to allocate >16GB of memory. Note that this input does not have the pickle header (b'0x80'

[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Kale Kundert
Change by Kale Kundert : -- type: -> crash versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Christian Heimes
Christian Heimes added the comment: The pickle module is not safe against malicious or faulty data. Invalid data can cause code injects or even segfaults. It's a know and documented behavior, https://docs.python.org/3/library/pickle.html -- nosy: +christian.heimes resolution: -> not

[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-11 Thread Pavel Ditenbir
Change by Pavel Ditenbir : -- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list

[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-11 Thread Pavel Ditenbir
Change by Pavel Ditenbir : -- versions: -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Steve Stagg
New submission from Steve Stagg : This was raised by Mats Wichmann on the python-dev list. Commit : c71581c7a4192e6ba9a79eccc583aaadab300efa bpo-42615: Delete redundant jump instructions that only bypass empty blocks (GH-23733) appears to have changed the behaviour of the following code: c

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Steve Stagg
Steve Stagg added the comment: Apologies, script should have read: class B: def __bool__(self): print("bool(B)") raise AttributeError("don't do that!") b = B() try: if b: pass except AttributeError: print("GOT ERROR") raise IndexError("Should GET THIS")

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue16081] Fix compile warnings in thread_pthread.h

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: This was resolved here: https://github.com/python/cpython/commit/56379c0d8fc17e717ac1ad73353b5991adae6832 -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracke

[issue39690] Compiler warnings in unicodeobject.c

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PyUnicode_IsIdentifier has two if/thens that can be combined ___ Python tracker ___

[issue16845] warnings.simplefilter should validate input

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy -patch versions: +Python 3.10 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list ma

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this is a bug, unless you can show an example where the bytecode compiler or the interpreter actually crashes. Basically you can change AST nodes in lots of ways that don't correspond to valid programs, and as long as you can't make CPython c

[issue42812] @overload-ing method of parent class without actual implementation

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I hesitate to add anything because you are exposing so much confusion. May I suggest that you ask about this on a user group first before proposing a new feature? One place that makes sense given that this is a type system feature would be this Gitter chan

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset fb35fa49d192368e94ffec09c092260ed0fea2e1 by Tomáš Hrnčiar in branch 'master': bpo-42870: Document change in argparse help output. (GH-24190) https://github.com/python/cpython/commit/fb35fa49d192368e94ffec09c092260ed0fea2e1 -- ___

[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for your fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Gregory P. Smith
Change by Gregory P. Smith : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue42900] Ternary operator precedence relative to bitwise or

2021-01-11 Thread Peter
New submission from Peter : Hello, I expect the following code to run fine, but the assertion fails. dbg1 is 1, while dbg2 is 3. I thought they would both be 3. Note that the only difference between the expressions for dbg1 and dbg2 are the parentheses. Please accept my apologies if this is

[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__

2021-01-11 Thread Ethan Furman
New submission from Ethan Furman : In discussions about moving the calls to `__set_name__` and `__init_subclass__`, Nick Coughlan made an observation: Nick Coghlan: > Both EnumMeta and ABCMeta should probably be relying on `__set_name__` > for their per-member set up work these days, rather th

[issue42775] __init_subclass__ should be called in __init__

2021-01-11 Thread Ethan Furman
Ethan Furman added the comment: Nick Coghlan made the observation that `__set_name__` should be doing what is currently the after-new work. Tracking in #42901. -- keywords: -patch resolution: -> rejected stage: patch review -> resolved status: open -> closed superseder: -> [Enum]

[issue42775] __init_subclass__ should be called in __init__

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, that's great! And thanks, Nick! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42900] Ternary operator precedence relative to bitwise or

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: You may be surprised, but it's not a bug -- '|' binds tighter than 'if'/'else'. If you need more help, please contact a user forum. -- nosy: +gvanrossum resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: high -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Xinmeng Xia
Xinmeng Xia added the comment: Sorry, my description is a little confusing. My points lie on function 'compile' and 'exec'. Yes, I agree. AST can be modified and don't correspond to valid programs. But I don't think this invaild program can be compiled and exec without any check. It's dange

[issue42880] ctypes: variadic function call still doesn't work on Apple Silicon

2021-01-11 Thread Ziqiao Kong
Ziqiao Kong added the comment: Sorry that our test machine failed to boot due to some firmware problem when upgrading to 11.1 yesterday. I will re-run my tests after the upgrade gets done. Also, I'm sure the last output is "3" in my first message. --

[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, if your argument is just that you can make invalid identifiers this way, I still don't see why that's a big deal. You can do `x.__dict__["1"] = 1` and now you've given x an attribute that's not a valid identifier. You could also call the code object co

  1   2   >