[issue44619] Bug in Python 3.7.10
New submission from Prakash : Hello - I wish to bring to your kind notice a bug in Python. Given any matrix X. While trying to compute the CoVariance matrix of that matrix X, Python does NOT compute the CoVarianceof the given matrix X. Instead, Python comptes the CoVariance of the Transpose of the given matrix X. This appears to be a bug in Python. Please refer to the below website for a given matrix and what the result should be after the computation of it's CoVariance. And I have provided a screenshot of what Python is returning. https://www.itl.nist.gov/div898/handbook/pmc/section5/pmc541.htm Please let me know if you have any questions. Regards, Prakash -- files: Bug in Python.pdf messages: 397390 nosy: prakashvm priority: normal severity: normal status: open title: Bug in Python 3.7.10 type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file50146/Bug in Python.pdf ___ Python tracker <https://bugs.python.org/issue44619> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong
Saaket Prakash added the comment: I tried the same stuff as nedbat on WSL2, and I see similar change in the path of sys._base_executable (though I get a different "base" path on a3, so the path exists even there). $ ~/.pyenv/versions/3.11.0a2/bin/python -m venv venv_a2 $ ~/.pyenv/versions/3.11.0a3/bin/python -m venv venv_a3 $ venv_a2/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /home/ss/venv_a2/bin/python True $ venv_a3/bin/python -c "import sys,os.path; print(e := sys._base_executable); print(os.path.exists(e))" /home/ss/.pyenv/versions/3.11.0a3/bin/python True $ cat venv_a2/pyvenv.cfg home = /home/ss/.pyenv/versions/3.11.0a2/bin include-system-site-packages = false version = 3.11.0 $ cat venv_a3/pyvenv.cfg home = /home/ss/.pyenv/versions/3.11.0a3/bin include-system-site-packages = false version = 3.11.0 -- nosy: +saaketp ___ Python tracker <https://bugs.python.org/issue46028> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46028] 3.11.0a3: under tox, sys._base_executable is wrong
Saaket Prakash added the comment: But on windows with the python.org installer, the behavior is same for both both a2 and a3. # With a3 installed > py -m venv venv_a3 > venv_a3/Scripts/python -c "import sys,os.path; print(e := > sys._base_executable); print(os.path.exists(e))" C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe True > cat venv_a3/pyvenv.cfg home = C:\Users\ss\AppData\Local\Programs\Python\Python311 include-system-site-packages = false version = 3.11.0 # With a2 installed > py -m venv venv_a2 > venv_a2/Scripts/python -c "import sys,os.path; print(e := > sys._base_executable); print(os.path.exists(e))" C:\Users\ss\AppData\Local\Programs\Python\Python311\python.exe True > cat venv_a2/pyvenv.cfg home = C:\Users\ss\AppData\Local\Programs\Python\Python311 include-system-site-packages = false version = 3.11.0 -- ___ Python tracker <https://bugs.python.org/issue46028> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9631] Python 2.7 installation issue for Linux Red Hat 4.1
New submission from Prakash Palanivel : Server on Linux:gcc version 4.1.0 20060304 (Red Hat 4.1.0-3) Which "sunaudiodev" library i need to install on linux. Kindly help me how to install or configure or avoid this issue. Error: Python build finished, but the necessary bits to build these modules were not found: _tkinter bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. -- components: Installation messages: 114196 nosy: spprakash priority: normal severity: normal status: open title: Python 2.7 installation issue for Linux Red Hat 4.1 versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue9631> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9631] Python 2.7 installation issue for Linux Red Hat 4.1
Changes by Prakash Palanivel : -- type: -> compile error ___ Python tracker <http://bugs.python.org/issue9631> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9631] Python 2.7 installation issue for Linux Red Hat 4.1
Prakash Palanivel added the comment: After complete the installation the below error message was displayed.Kindly check and revert. ./python -E ./setup.py install \ --prefix=/usr/local/python-2.7 \ --install-scripts=/usr/local/python-2.7/bin \ --install-platlib=/usr/local/python-2.7/lib/python2.7/lib-dynload \ --root=/ make: execvp: ./python: Text file busy make: *** [sharedinstall] Error 127 -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue9631> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9631] Python 2.7 installation issue for Linux Red Hat 4.1
Prakash Palanivel added the comment: After Installed the following error was through: PYTHONPATH=/usr/local/Python-2.7/lib/python2.7 \ ./python -Wi -tt /usr/local/Python-2.7/lib/python2.7/compileall.py \ -d /usr/local/Python-2.7/lib/python2.7 -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ /usr/local/Python-2.7/lib/python2.7 Traceback (most recent call last): File "/usr/local/Python-2.7/lib/python2.7/compileall.py", line 17, in import struct File "/usr/local/Python-2.7/lib/python2.7/struct.py", line 1, in from _struct import * ImportError: No module named _struct make: *** [libinstall] Error 1 -- ___ Python tracker <http://bugs.python.org/issue9631> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45384] Accept Final as indicating ClassVar for dataclass
Saaket Prakash added the comment: Treating Final as ClassVar by default may be fine, but it should not throw when using default_factory like ClassVar does. There are valid uses of Final with instance variable when one would want the value to be unchanged after the `__init__` runs but different instances can be initialized with different values that are generated by a default_factory. A quick search on github for this pattern gives this https://github.com/166MMX/hiro-python-library/blob/fb29e3247a8fe1b0f7dc4e68141cf7340a8dd0a5/src/arago/hiro/model/ws.py#L120 which will break if Final throws when using default_factory. PEP 591 says: Type checkers should infer a final attribute _that is initialized in a class body_ as being a class variable. When using default_factory the attribute is not initialized inside the class body but when the instance is initialized. So allowing instance level Final with default_factory will not be going against the PEP. -- nosy: +saaketp ___ Python tracker <https://bugs.python.org/issue45384> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily
Danish Prakash added the comment: I would like to work on this if you have not already started, Steve. > We should check whether people read from > SimpleHTTPRequestHandler.extensions_map directly before calling guess_type(), > and decide how quickly we can make the change. Are you implying we make the change based on whether someone use SimpleHTTPRequestHandler.extensions_map before calling guess_type()? Could you please elaborate that a bit, thanks. -- nosy: +danishprakash ___ Python tracker <https://bugs.python.org/issue35292> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20582] socket.getnameinfo() does not document flags
Danish Prakash added the comment: I would like to work on this if nobody else has. -- nosy: +danishprakash ___ Python tracker <https://bugs.python.org/issue20582> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: Sorry for bumping this thread but Victor, could you please share your inputs on this if you have the time for it, thanks. -- ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31823] Opaque default value for close_fds argument in Popen.__init__
Danish Prakash added the comment: I'd like to work on this. I get that the 3.7+ doc still has the irrelevant change from 3.6 which needs to be removed but I'm not sure what's wrong with the 3.6 doc. > The signature is indeed awkward for 3.6, -- nosy: +danishprakash ___ Python tracker <https://bugs.python.org/issue31823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31823] Opaque default value for close_fds argument in Popen.__init__
Change by Danish Prakash : -- keywords: +patch pull_requests: +10276 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31823> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24459] Mention PYTHONFAULTHANDLER in the man page
Anant Prakash added the comment: I am going to take the patch, edit and make a github PR for this. Any updates on this issue are welcome. Thank you -- nosy: +Anant Prakash ___ Python tracker <https://bugs.python.org/issue24459> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24459] Mention PYTHONFAULTHANDLER in the man page
Anant Prakash added the comment: Ignore my previous comment. My bad. -- ___ Python tracker <https://bugs.python.org/issue24459> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"
Danish Prakash added the comment: > But in 3.x, comparison no longer falls back to comparing object addresses. What is the default fallback in 3.x? -- nosy: +prakashdanish ___ Python tracker <https://bugs.python.org/issue34365> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"
Change by Danish Prakash : -- keywords: +patch pull_requests: +8292 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34365> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt
Danish Prakash added the comment: > however it seems to be wrong, "__ltrace__" is correct just curious how did you figure it out? -- nosy: +prakashdanish ___ Python tracker <https://bugs.python.org/issue34426> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt
Danish Prakash added the comment: @pablogsal I would love to fix this up -- ___ Python tracker <https://bugs.python.org/issue34426> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt
Change by Danish Prakash : -- keywords: +patch pull_requests: +8301 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34426> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34334] QueueHandler logs exc_info twice
Danish Prakash added the comment: I would like to work on this, just making sure you are not. -- nosy: +prakashdanish ___ Python tracker <https://bugs.python.org/issue34334> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34443] enum repr should use __qualname__
Change by Danish Prakash : -- keywords: +patch pull_requests: +8462 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34443> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34443] enum repr should use __qualname__
Danish Prakash added the comment: Serhiy, why should __qualname__ always be used together with __module__? I can't seem to find a valid reason, I've been through the pep. -- nosy: +prakashdanish ___ Python tracker <https://bugs.python.org/issue34443> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: > With respect to documentation I was talking about '-I' not being documented > in the table at https://docs.python.org/3.7/library/sys.html#sys.flags though > it's present in the C code and in sys.flags.isolated. Thanks for bringing this up Karthikeyan, however, could there be another reason why -I would be left out. Also, have you filed an issue for this? Also, Victor and Karthikeyan, since this issue has been categorized as an easy issue, I would like to fix this if none of you have started working on this. -- nosy: +danishprakash ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: Thank you Karthikeyan, I'm going to take care of both of these issues. -- ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34901] Missing isolated (-I) flag in sys.flags table
Change by Danish Prakash : -- assignee: docs@python components: Documentation nosy: danishprakash, docs@python priority: normal severity: normal status: open title: Missing isolated (-I) flag in sys.flags table versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: Linking this[1] here in case someone else stumbles upon this thread. I've created an issue and a PR for the documentation issue regarding the absence of -I flag from the sys.flags table which came into picture from the discussions in this thread. [1]: https://bugs.python.org/issue34901 -- ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34901] Missing isolated (-I) flag in sys.flags table
Danish Prakash added the comment: thank you for for making the corrections, however, what's with a version being in security fixes mode? I would like to read more about that. -- ___ Python tracker <https://bugs.python.org/issue34901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34901] Missing isolated (-I) flag in sys.flags table
Danish Prakash added the comment: Thanks for the concise explanation, that makes sense. > Also there will be no binary releases and only source releases for security > only branches. Is there any particular reason as to why this happens? IS it just to make it easier for the team to focus on the development of current versions or something else? -- ___ Python tracker <https://bugs.python.org/issue34901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: > I expect to get: ['-I'] instead of ['-s', '-E', '-I'] >From what I understand, this can be done in one of two ways. First, we could >edit >https://github.com/python/cpython/blob/ad73a9cf97770023665a1bb1c6390a3c99478139/Modules/main.c#L430 > and not incrementing -s and -E. But I believe this would have consequences >that I'm unable to think of right now, so I'd like some inputs on this. Secondly, we could handle this condition in `_args_from_interpreted_flags()` itself but that might be looked upon as bad practice. -- ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34812] [EASY] support.args_from_interpreter_flags() doesn't inherit -I (isolated) flag
Danish Prakash added the comment: You're right Karthikeyan, although I personally think that returning ['-s', '-E', '-I'] should be a plausible solution here since it has been stated explicitly that it implies '-s' and '-E' but I'm still waiting for what Victor has to say on this. > The only thing here is that '-I' returns '-s -E -I' unlike other options > where args can be used for comparison logic in check_options. Karthikeyan, do you happen to have a use case where this might come into action? -- ___ Python tracker <https://bugs.python.org/issue34812> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12345] Add math.tau
Change by Danish Prakash : -- pull_requests: +9150 ___ Python tracker <https://bugs.python.org/issue12345> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34901] Missing isolated (-I) flag in sys.flags table
Change by Danish Prakash : -- pull_requests: +9283 ___ Python tracker <https://bugs.python.org/issue34901> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12833] raw_input misbehaves when readline is imported
Dhanam Prakash added the comment: Hi, submitting a patch for the documentation. Thanks -- hgrepos: +254 keywords: +patch nosy: +dhanamp Added file: http://bugs.python.org/file35519/issue12833.patch ___ Python tracker <http://bugs.python.org/issue12833> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34045] DoS due to null pointer dereference in marshal.dumps()
New submission from Krishna Ram Prakash R : By passing a malformed string as input to marshal.loads() an attacker can trigger a null pointer dereference resulting in DoS. This happens because when a Python object is unmarshalled by reference, it is assumed that the target object is fully constructed. We can construct a marshal string such that it can reference partially constructed Python objects. Example --- tuple(FrozenSet(REF(0))) Tuple -> FrozenSet -> REF(0) When unmarshalling of the tuple object starts, a new PyTuple_New() object is created and its address is added to p->refs array before starting to parse and load all its children elements in a loop. A FrozenSet can be added as 0th element of this tuple. And then add the 0th element of this FrozenSet as p->refs[0]. After an element is added to FrozenSet, it tries to hash it believing that it is a completely constructed Python object. While it tries to hash the original tuple, it does not have any valid addresses in ob_item array. This results in a null pointer dereference throwing a SIGSEGV and crashing of interpreter. Running the below script results in a segmentation fault. ``` #!/usr/bin/env python3 import marshal marshal.loads(b"\xa9\x01\xbe\x01\x00\x00\x00r\x00\x00\x00\x00") ``` -- components: Interpreter Core, Library (Lib) messages: 321050 nosy: benjamin.peterson, rkrp priority: normal severity: normal status: open title: DoS due to null pointer dereference in marshal.dumps() type: security versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue34045> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com