[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 871eb4237b9be95263ca13ba8856e78344eb9eba by Erlend Egeberg 
Aasland in branch 'master':
bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535)
https://github.com/python/cpython/commit/871eb4237b9be95263ca13ba8856e78344eb9eba


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread Lumír Balhar

Lumír Balhar  added the comment:

I'm not an expert nor an author but this might help:

Cloudpickle offers extended possibilities for pickling but uses the standard 
pickle module for unpickling:

>>> import pickle, cloudpickle
>>> cloudpickle.load is pickle.load
True
>>> cloudpickle.loads is pickle.loads
True

So, the question here is why the new Python version cannot handle cloudpickle 
output anymore.

>>> def f():
... return len("")
... 


>>> pickle.dumps(f)
b'\x80\x04\x95\x12\x00\x00\x00\x00\x00\x00\x00\x8c\x08__main__\x94\x8c\x01f\x94\x93\x94.'

>>> cloudpickle.dumps(f)
b'\x80\x05\x95\xa9\x01\x00\x00\x00\x00\x00\x00\x8c\x17cloudpickle.cloudpickle\x94\x8c\r_builtin_type\x94\x93\x94\x8c\nLambdaType\x94\x85\x94R\x94(h\x02\x8c\x08CodeType\x94\x85\x94R\x94(K\x00K\x00K\x00K\x00K\x02KCC\x08t\x00d\x01\x83\x01S\x00\x94N\x8c\x04\x94\x86\x94\x8c\x03len\x94\x85\x94)\x8c\x07\x94\x8c\x01f\x94K\x01C\x02\x00\x01\x94))t\x94R\x94}\x94(\x8c\x0b__package__\x94N\x8c\x08__name__\x94\x8c\x08__main__\x94uNNNt\x94R\x94\x8c\x1ccloudpickle.cloudpickle_fast\x94\x8c\x12_function_setstate\x94\x93\x94h\x18}\x94}\x94(h\x15h\x0f\x8c\x0c__qualname__\x94h\x0f\x8c\x0f__annotations__\x94}\x94\x8c\x0e__kwdefaults__\x94N\x8c\x0c__defaults__\x94N\x8c\n__module__\x94h\x16\x8c\x07__doc__\x94N\x8c\x0b__closure__\x94N\x8c\x17_cloudpickle_submodules\x94]\x94\x8c\x0b__globals__\x94}\x94u\x86\x94\x86R0.'

It seems to me that cloudpickle adds also __globals__ to the final output and 
pickle is no longer able to restore it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43238] python picking garbage values randomly incase running palindrome function

2021-02-15 Thread Raghav Bhandari


New submission from Raghav Bhandari :

temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python3 and 
revtemp value is   3nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39 and 
revtemp value is   93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/ and 
revtemp value is   /93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/p and 
revtemp value is   p/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/py and 
revtemp value is   yp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyt and 
revtemp value is   typ/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & 
   
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyth and 
revtemp value is   htyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C 
&  
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pytho 
and revtemp value is   
ohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python 
and revtemp value is   
nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &  
temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python. 
and revtemp value is   
.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C  value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.e and revtemp 
value is   e.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.ex and revtemp 
value is   xe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp 
value is   exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe  and revtemp 
value isexe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c and revtemp 
value is   c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c: and 
revtemp value is   :c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/ and 
revtemp value is   /:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/U and 
revtemp value is   U/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Us and 
revtemp value is   sU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Use and 
revtemp value is   esU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/User and 
revtemp value is   resU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users and 
revtemp value is   sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/ and 
revtemp value is   /sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/R 
and revtemp value is   R/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ra 
and revtemp value is   aR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Rag 
and revtemp value is   gaR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragh 
and revtemp value is   hgaR/sresU/:c 
exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &
temp value is & 
C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe 
c:/Users/Ragha and revtemp value is   ahgaR/sresU/:c 

[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman


Michael Wayne Goodman  added the comment:

Sorry, typo in my last statement. I did *not* verify if the behavior is the 
same with earlier/later versions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param

2021-02-15 Thread Michael Wayne Goodman


Michael Wayne Goodman  added the comment:

Sorry to resurrect an old bug, but I've also found the docs lacking and I can 
fill in some gaps with some experimental results. Setup:

>>> import sqlite3
>>> conn = sqlite3.connect(':memory:')
>>> conn.execute('CREATE TABLE foo (x INTEGER, y INTEGER, z INTEGER)')


When the parameters is a sequence, the named placeholders can be repeated. 
There should be as many parameters as unique placeholders:

>>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4)]

Using numeric named placeholders is misleading, because they don't correspond 
to the indices in the parameters sequence. The following inserts (6, 7, 6), not 
(7, 6, 7):

>>> conn.execute('INSERT INTO foo VALUES (:2, :1, :2)', (6, 7))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6)]

So it is probably better to stick to non-numeric names:

>>> conn.execute('INSERT INTO foo VALUES (:a, :a, :a)', (8,))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8)]

When the number of parameters is not the same as the number of unique 
placeholders, an sqlite3.ProgrammingError is raised:

>>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5, 6))
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The 
current statement uses 2, and there are 3 supplied.

Question mark placeholders may be mixed with named placeholders. Each question 
mark uses the next "unclaimed" parameter, which then cannot be reused.

>>> conn.execute('INSERT INTO foo VALUES (:a, ?, :a)', (1, 2))

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1)]

As mentioned by R. David Murray and Terry J. Reedy above, when the parameters 
are given as a dict, extra items are ignored and no error is raised:

>>> conn.execute('INSERT INTO foo VALUES (:a, :b, :a)', {'a': 3, 'b': 4, 
'c': 5})

>>> conn.execute('SELECT * FROM foo').fetchall()
[(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1), (3, 4, 3)]

Disclaimer: I tested the above statements on Python 3.8.5. I did verify if the 
behavior is the same with earlier/later versions, and I don't know if this is 
intentional behavior or some undiscovered bug.

--
nosy: +goodmami

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43175] filecmp is not working for UTF-8 BOM file.

2021-02-15 Thread suresh


suresh  added the comment:

Dear Team,

  Any more details are required. Kindly let me know.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43237] datetime.__eq__ returns true when timezones don't match

2021-02-15 Thread Richard Wise


New submission from Richard Wise :

from datetime import datetime, timezone, timedelta

datetime_in_sgt = datetime(2021, 2, 16, 8, 0, 0, 
tzinfo=timezone(timedelta(hours=8)))
datetime_in_utc = datetime(2021, 2, 16, 0, 0, 0, tzinfo=timezone.utc)

print(datetime_in_sgt == datetime_in_utc)

Expected: False
Actual: True

Although these two datetimes represent the same instant on the timeline, they 
are not identical because they use different timezones. This means that when 
unit testing timezone handling, tests will incorrectly pass despite data being 
returned in UTC instead of the requested timezone, so we need to write code 
such as this:

# Timestamp comparison
self.assertEqual(datetime_in_sgt, datetime_in_utc)
# Timezone comparison
self.assertEqual(datetime_in_sgt.tzinfo, datetime_in_utc.tzinfo)

This is confusing and non-intuitive.

For examples of how other languages handle such comparison, can refer to: 
https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html#equals-java.lang.Object-
 and 
https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#equals-java.lang.Object-

--
components: Library (Lib)
messages: 387087
nosy: Woodz
priority: normal
severity: normal
status: open
title: datetime.__eq__ returns true when timezones don't match
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43236] Windows IDLE taskbar icon jump list fails to open recent files

2021-02-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I will just note that the IDLE File menu has a Recent Files list, which is the 
same thing.  (Notepad++ does also, in addition to a working icon jump list.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43236] Windows IDLE taskbar icon jump list fails to open recent files

2021-02-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is a Windows installer code issue rather than an IDLE code issue.  On 
Win10, I do not see jump lists for IDLE icons but do for several others.  
Perhaps the installer was changed to disable the non-functional lists.  I will 
let the installer people comment further.

--
assignee: terry.reedy -> 
components: +Installation, Windows -IDLE
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Windows Taskbar Jump List fails to open Recent files -> Windows IDLE 
taskbar icon jump list fails to open recent files

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43230] typo in Simplified/Traditional Chinese documentation for library argparse

2021-02-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The translation is maintained under GitHub. Please report to 
https://github.com/python/python-docs-zh-cn/issues

--
nosy: +xtreak
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43236] Windows Taskbar Jump List fails to open Recent files

2021-02-15 Thread veganaiZe


New submission from veganaiZe :

OS: Windows 8.1 (x86-64)
Python: 3.8.7

When I right-click on IDLE's rectangle/icon in the Windows taskbar it displays 
a "jump list" which contains recent/pinned filenames.

A program will typically open a file when it's selected from the list.

IDLE doesn't open the file, nor does it switch to the corresponding editor 
window if the file is already open.  It seems to ignore the selection entirely.

If IDLE is going to display a "Recent" list, within the jump list, then it 
would be nice if it actually opened the file(s).

--
assignee: terry.reedy
components: IDLE
files: jumplist.png
messages: 387082
nosy: terry.reedy, veganaiZe
priority: normal
severity: normal
status: open
title: Windows Taskbar Jump List fails to open Recent files
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49812/jumplist.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35026] Winreg's documentation lacks mentioning required permission at some points

2021-02-15 Thread Eryk Sun


Eryk Sun  added the comment:

winreg.DeleteKey[Ex] does not require any particular access on the `key` 
handle. This handle is used only as the native NT API RootDirectory [1] when 
opening `subkey` with DELETE access via NtOpenKeyEx [2].

The extra access with winreg.DeleteKeyEx [3] is just to allow explicitly using 
the 32-bit or 64-bit registry view (i.e. KEY_WOW64_32KEY or KEY_WOW64_64KEY) 
when traversing the registry. I think this should be clarified in the docs. For 
example, if you have the predefined handle HKEY_LOCAL_MACHINE as the `key` 
handle, then deleting r"Software\Spam" will default to traversing the process 
32- or 64-bit view of the "Software" key, but you can override the default 
view. (Note that if you start from a handle for the "Software" key, then 
setting an explicit view in the access mode doesn't matter since "Software" 
isn't traversed to reach "Spam" in this case.) 

winreg.DeleteKeyEx uses KEY_WOW64_64KEY as the default `access` mode. I think 
this is a mistake. It should default to 0, and thus implicitly traverse the 
process view from the path of the `key` handle. A 32-bit process should not 
default to traversing the 64-bit registry view.

---
[1] 
https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes
[2] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwopenkeyex
[3] 
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regdeletekeyexw

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread Petr Viktorin


Petr Viktorin  added the comment:

I want to address this in PEP 652.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Any C extension class that implements a new_whatever() method that leaves the 
> class tracked and not ready.

I'm not aware of such C extension but they likely exists. If we have such 
extensions in the stdlib, we can try to fix them.

We cannot fix such GC bugs in third party code, and I don't think that we can 
hack the GC to work around this issue neither.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Dustin for the bug report *and* the fix! I close the issue.

For people who want to support bracketed paste mode in Python, please disuss it 
in bpo-39820.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4 by Miss Islington (bot) 
in branch '3.9':
bpo-42819, readline: Disable bracketed paste (GH-24108) (GH-24545)
https://github.com/python/cpython/commit/85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +pablogsal, petr.viktorin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

The symbol was exported on Unix since Python 3.9.0, but not on Windows. Is it 
ok to export it starting with Python 3.9.2? (backport the fix). IMO yes, it's 
ok.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a by Zackery Spytz in 
branch 'master':
bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500)
https://github.com/python/cpython/commit/8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43155] PyCMethod_New not defined in python3.lib

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Is there a test suite that checks that the limited API functions can all be 
> linked against?

Pablo Galindo wrote a new Tools/scripts/stable_abi.py for Unix, but this tool 
doesn't check PC/python3dll.c yet. The tool uses Doc/data/stable_abi.dat which 
*does* include PyCMethod_New symbol.

I created bpo-43235 "Tools/scripts/stable_abi.py should also check 
PC/python3dll.c (Windows stable ABI)".

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)

2021-02-15 Thread STINNER Victor


New submission from STINNER Victor :

bpo-43155 is just yet another example that we always forget to export symbols 
of the stable ABI on Windows.

It would be great to have a tool to check that all symbols exported on Unix are 
also exported on Windows.

Tools/scripts/stable_abi.py could check PC/python3dll.c (Windows stable ABI). 
For example, currently "PyCMethod_New" symbol is in Doc/data/stable_abi.dat but 
miss in PC/python3dll.c.

--
components: C API
messages: 387073
nosy: vstinner
priority: normal
severity: normal
status: open
title: Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows 
stable ABI)
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e by Miss Islington (bot) 
in branch '3.8':
bpo-42819, readline: Disable bracketed paste (GH-24108)
https://github.com/python/cpython/commit/f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35026] Winreg's documentation lacks mentioning required permission at some points

2021-02-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 7.0 -> 8.0
pull_requests: +23330
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24547

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +23329
pull_request: https://github.com/python/cpython/pull/24546

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +23328
pull_request: https://github.com/python/cpython/pull/24545

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 755f3c1521b422bc2177013d289f5439975fdc4f by Dustin Rodrigues in 
branch 'master':
bpo-42819, readline: Disable bracketed paste (GH-24108)
https://github.com/python/cpython/commit/755f3c1521b422bc2177013d289f5439975fdc4f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy: +erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> PyList_New() is also affected. Do you think about other types?

Any C extension class that implements a new_whatever() method that leaves the 
class tracked and not ready.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

I created 
https://python-security.readthedocs.io/vuln/urllib-query-string-semicolon-separator.html
 to track fixes of this vulnerability.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> That's a lot slower unfortunately

Ah sorry, I forgot PyTuple_Pack(3, item1, item2, item3) which should be very 
efficient. This function is also safe: only track the tuple when it is fully 
initialized.

> This problem also is not unique to tuples, although is mainly prominent in 
> them.

PyList_New() is also affected. Do you think about other types?

PyDict_New() and PySet_New() create empty containers and so are ok.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seems a problem in FreeBSD 14.0 CURRENT. Koobs, could you report this 
upstream?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hu. The last time it succeeded was with platform.platform: 
FreeBSD-13.0-CURRENT-amd64-64bit-ELF:

https://buildbot.python.org/all/#/builders/151/builds/280

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread STINNER Victor

STINNER Victor  added the comment:

> https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio

This is the CURRENT version of FreeBSD (latest kernel and latest libc). 
test.pythoninfo says:

os.uname: posix.uname_result(sysname='FreeBSD', nodename='140-CURRENT-amd64', 
release='14.0-CURRENT', version='FreeBSD 14.0-CURRENT #13 
main-n244626-cb7cc72c546: Fri Feb  5 02:20:29 UTC 2021 
root@130-CURRENT-amd64:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG', 
machine='amd64')

On FreeBSD 12.2 (stable), test_os pass because os.copy_file_range() is missing:

$ grep copy_file_range pyconfig.h -A1
/* Define to 1 if you have the `copy_file_range' function. */
/* #undef HAVE_COPY_FILE_RANGE */

$ ./python -m test test_os -v -m test_copy_file_range_offset
== CPython 3.9.1+ (heads/3.9:c9f07813ab, Feb 15 2021, 22:00:04) [Clang 10.0.1 
(g...@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a
== FreeBSD-12.2-RELEASE-p3-amd64-64bit-ELF little-endian
== cwd: /usr/home/vstinner/python/3.9/build/test_python_5324æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 11.77 Run tests sequentially
0:00:00 load avg: 11.77 [1/1] test_os
test_copy_file_range_offset (test.test_os.FileTests) ... skipped 'test needs 
os.copy_file_range()'

--

Ran 1 test in 0.002s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 674 ms
Tests result: SUCCESS

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset d0204963ec87beb9732e924e464b8a6a1ef4d341 by Pablo Galindo in 
branch 'master':
bpo-43231: Correctly calculate the curses color pair limit when checking for it 
(GH-24541)
https://github.com/python/cpython/commit/d0204963ec87beb9732e924e464b8a6a1ef4d341


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +23327
pull_request: https://github.com/python/cpython/pull/24541

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ab2d48163901c9635401db0f6d784c45482d17ec by Pablo Galindo in 
branch 'master':
bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R 
(GH-24539)
https://github.com/python/cpython/commit/ab2d48163901c9635401db0f6d784c45482d17ec


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Instead of enabling it by default, why not just keep it but emulate the old 
> behavior by splitting and buffering the input lines?

PR 24108 change can and should be backported to 3.8 and 3.9 branches.

REPL enhancements can only land in the master branch and should be done in 
bpo-39820.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42819] readline 8.1 enables the bracketed paste mode by default

2021-02-15 Thread Aaron Meurer


Aaron Meurer  added the comment:

Instead of enabling it by default, why not just keep it but emulate the old 
behavior by splitting and buffering the input lines? That way you still get 
some of the benefits of bracketed paste, i.e., faster pasting, but without the 
hard work of fixing the REPL to actually support native multiline editing + 
execing multiline statements (the broken "simple" design).

--
nosy: +asmeurer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43108] test_curses is leaking references

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

The funny part is that the bug was there for 4 years. It's good that Serhiy 
added new tests to allow to catch this old bug!

commit f7eae0adfcd4c50034281b2c69f461b43b68db84
Author: Serhiy Storchaka 
Date:   Wed Jun 28 08:30:06 2017 +0300

[security] bpo-13617: Reject embedded null characters in wchar* strings. 
(#2302)

Based on patch by Victor Stinner.

Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters.

It wasn't me! Ok, maybejust a little bit :-D

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Should we strive to fix the cases in Include/internal as well?

No. The internal C API access directly to structure members on purpose, for 
best performances.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21309] Confusing "see also" for generic C-level __init__ methods in help output

2021-02-15 Thread Larry Hastings


Change by Larry Hastings :


--
nosy:  -larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41028] Move docs.python.org language and version switcher out of cpython

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:

@mdk, This seems to be working great for the the python.org doc builds. What do 
you think about backporting this to the current active branches so that the doc 
builds for individual releases and those included with binary installers show 
the new generic links rather than the out-of-date old links?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-02-15 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left.
$ grep -r "\->tp_" Include/:

Include/internal/pycore_abstract.h:PyNumberMethods *tp_as_number = 
Py_TYPE(obj)->tp_as_number;
Include/internal/pycore_interp.h:unsigned int version;  // initialized from 
type->tp_version_tag
Include/internal/pycore_object.h:return ((type->tp_flags & feature) != 0);
Include/internal/pycore_object.h:Py_ssize_t offset = 
Py_TYPE(op)->tp_weaklistoffset;
Include/internal/pycore_object.h:&& (Py_TYPE(obj)->tp_is_gc == NULL
Include/internal/pycore_object.h:|| 
Py_TYPE(obj)->tp_is_gc(obj)));
Include/cpython/pyerrors.h:#define PyExceptionClass_Name(x)  
(((PyTypeObject*)(x))->tp_name)
Include/cpython/abstract.h:offset = tp->tp_vectorcall_offset;
Include/cpython/abstract.h:( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
Include/cpython/object.h:((PyMemberDef *)(((char *)etype) + 
Py_TYPE(etype)->tp_basicsize))
Include/cpython/objimpl.h:#define _PyObject_SIZE(typeobj) ( 
(typeobj)->tp_basicsize )
Include/cpython/objimpl.h:_Py_SIZE_ROUND_UP((typeobj)->tp_basicsize + \
Include/cpython/objimpl.h:(nitems)*(typeobj)->tp_itemsize,\
Include/cpython/objimpl.h:#define PyType_SUPPORTS_WEAKREFS(t) 
((t)->tp_weaklistoffset > 0)
Include/object.h:flags = type->tp_flags;

Should we strive to fix the cases in Include/internal as well?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows

2021-02-15 Thread Steve Dower


Steve Dower  added the comment:

> since they're allowed, I think importlib at least could try to resolve 
> relative paths in a copy of sys.path before searching. 

I agree with this fix. They can be resolved for each new import, if we think 
that's an important behaviour to preserve (might mess with the cache... but 
probably necessary if it's to be backported). But at some point sys.path 
entries need to be made absolute, and it definitely needs to happen before we 
try to load any DLLs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21309] Confusing "see also" for generic C-level __init__ methods in help output

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

Still the same in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> help(ImportError.__init__)
Help on wrapper_descriptor:

__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

--
nosy: +iritkatriel
versions: +Python 3.10 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16608] immutable subclass constructor call error does not show subclass name

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

The issue still exists in 3.10:

Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class c(tuple):
...  def __init__(s,a,b):
...tuple.__init__(s,a)
...self.b = b
...
>>> c(tuple(),666)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: tuple expected at most 1 argument, got 2
>>>

--
nosy: +iritkatriel
versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation

2021-02-15 Thread Illia Volochii


Change by Illia Volochii :


--
keywords: +patch
pull_requests: +23326
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24540

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16718] Mysterious atexit fail

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

Since this was fixed since 3.3, is there a reason why this issue is still open?


I don't get the error anymore:

C:\Users\User\src\cpython-dev>python.bat wow.py
Running Release|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\User\src\cpython-dev\wow.py", line 12, in 
import fail
ModuleNotFoundError: No module named 'fail'

C:\Users\User\src\cpython-dev>python.bat wy.py
Running Release|x64 interpreter...
Traceback (most recent call last):
  File "C:\Users\User\src\cpython-dev\wy.py", line 1, in 
import wow
  File "C:\Users\User\src\cpython-dev\wow.py", line 12, in 
import fail
ModuleNotFoundError: No module named 'fail'

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation

2021-02-15 Thread Illia Volochii


New submission from Illia Volochii :

https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/base_events.py#L816-L821

Setting non-ThreadPoolExecutor executors was supposed to be prohibited in 
Python 3.9.

--
components: asyncio
messages: 387052
nosy: asvetlov, illia-v, yselivanov
priority: normal
severity: normal
status: open
title: Prohibit passing non-ThreadPoolExecutor executors to 
loop.set_default_executor following a deprecation
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19073] Inability to specific __qualname__ as a property on a class instance.

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19984] Add new format of fixed length string for PyErr_Format

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +23325
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24539

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

>From the curses docs:

   init_pair
   The init_pair routine changes the definition of a color-pair.  It
   takes three arguments: the number of the color-pair to be
   changed, the foreground color number, and the background color
   number.  For portable applications:

   •   The first argument must be a legal color pair value.  If
   default colors are used (see use_default_colors(3X)) the
   upper limit is adjusted to allow for extra pairs which use a
   default color in foreground and/or background.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hu, commenting out test_use_default_colors fixes the issue, so something is 
going on there

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This is resolved in all version of Python now. 
Thank you all for your contributions!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a 
query args separator -> [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache 
poisoning - `; ` as a query args separator

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The logic in _curses_init_pair_impl is quite odd. Seems that 
_CURSES_INIT_PAIR_FUNC succeeds the first run of (-R) even if pair_number >= 
COLOR_PAIRS but fails the second. Serhiy, do you know what's going on here?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

koobs, can you give us access to the buildbot? The latest IP you provided do 
not work anymore

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9

2021-02-15 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

==
FAIL: test_copy_file_range_offset (test.test_os.FileTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_os.py", 
line 365, in test_copy_file_range_offset
self.assertIn(i, range(0, bytes_to_copy+1));
AssertionError: 7 not found in range(0, 7)
--

https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio

--
messages: 387046
nosy: koobs, lukasz.langa, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-02-15 Thread Illia Volochii


Change by Illia Volochii :


--
keywords: +patch
pull_requests: +23324
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24538

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5c17dfc5d70ce88be99bc5769b91ce79d7a90d61 by Senthil Kumaran in 
branch '3.6':
[3.6] bpo-42967: only use '&' as a query string separator (GH-24297)  (GH-24532)
https://github.com/python/cpython/commit/5c17dfc5d70ce88be99bc5769b91ce79d7a90d61


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket

2021-02-15 Thread Illia Volochii


New submission from Illia Volochii :

https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/trsock.py#L19-L24

Using of the operations was supposed to be prohibited in Python 3.9, but that 
was missed.

--
components: asyncio
messages: 387044
nosy: asvetlov, illia-v, yselivanov
priority: normal
severity: normal
status: open
title: Prohibit previously deprecated operations on 
asyncio.trsock.TransportSocket
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This seems to happen only when running with -R

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
versions: +Python 3.10, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

2021-02-15 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/433/builds/181/steps/5/logs/stdio


==
ERROR: test_init_pair (test.test_curses.TestCurses)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py",
 line 47, in wrapped
test(self, *args, **kwargs)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py",
 line 959, in test_init_pair
curses.init_pair(maxpair, 0, 0)
ValueError: Color pair is greater than COLOR_PAIRS-1 (65535).
--

--
messages: 387042
nosy: pablogsal, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test.test_curses.TestCurses.test_init_pair fails in s390x Fedora

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43108] test_curses is leaking references

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ede1ff226c9ef4efd053109c69b4e33f75b2b17b by Miss Islington (bot) 
in branch '3.8':
bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429)
https://github.com/python/cpython/commit/ede1ff226c9ef4efd053109c69b4e33f75b2b17b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset d0d4d30882fe3ab9b1badbecf5d15d94326fd13e by Senthil Kumaran in 
branch '3.7':
[3.7] bpo-42967: only use '&' as a query string separator (GH-24297)  (GH-24531)
https://github.com/python/cpython/commit/d0d4d30882fe3ab9b1badbecf5d15d94326fd13e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e3110c3cfbb7daa690d54d0eff6c264c870a71bf by Senthil Kumaran in 
branch '3.8':
[3.8] bpo-42967: only use '&' as a query string separator (GH-24297)  (#24529)
https://github.com/python/cpython/commit/e3110c3cfbb7daa690d54d0eff6c264c870a71bf


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43222] Regular expression split fails on 3.6 and not 2.7 or 3.7+

2021-02-15 Thread Philip


Change by Philip :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

And to dig a bit further with a semi-official answer.

RHEL4 had standalone support for s390, while since RHEL5+ we've had only 
multilib support (64 bits kernel and possibility of s390 userspace packages).

RHEL7 that is the oldest currently supported RHEL OS, does have multilib 
support, meaning that 32 bit (s390) userspace packages are available for s390x 
booting on 64 bit kernel.

Although a later base python version for RHEL7 will not be shipped as we 
already have python2.7.5 and python3.8.6 supported there, which already builds 
for s390 for the aforementioned multilib support.

On Software Collections where we actually sometimes ship later Python versions, 
we compile only for 64 bits so the removal of the s390 pieces wouldn't pose an 
issue here.

Hence the only problem I can figure out from my analysis would be for users on 
s390x who would download the necessary 32bit libraries and dependencies from 
the repos and use the -m32 CFLAGS and LDFLAGS to get a 32 bits build.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset c9f07813ab8e664d8c34413c4fc2d4f86c061a92 by Senthil Kumaran in 
branch '3.9':
[3.9] bpo-42967: only use '&' as a query string separator (GH-24297) (#24528)
https://github.com/python/cpython/commit/c9f07813ab8e664d8c34413c4fc2d4f86c061a92


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread Mark Shannon


Mark Shannon  added the comment:

You need to define __builtins__ in the globals dictionary.

def func(s):
return len(s)

text = "abc"
print(func(text))

FuncType = type(func)
func_globals = {"__builtins__":__builtins__.__dict__}
code = func.__code__
func2 = FuncType(code, func_globals)

print(func2(text))


works for both 3.9 and 3.10.

Cloudpickle needs to initialize the globals dict *before* creating the function.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>  If the GIL is released before the tuple is fully populated and something 
> access to this tuple via the GC (ex: gc.get_objects()), accessing the tuple 
> can crash, especially in the Python land (for example, repr(the_tuple) is 
> likely to crash).

It can happen even without releasing the GIL: A new tuple is created, then some 
other object is created using the CAPI, the gc runs, the callback triggers (or 
the tuplevisit method is invoked) and then kaboom

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> There are other safe alternatives like Py_BuildValue("(OOO)", item1, item2, 
> item3).


That's a lot slower unfortunately

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> IMO the unsafe PyTuple_New() API should be avoided.

Is not that simple, there are other APIs that track the tuple as 
_PyTuple_Resize. This problem also is not unique to tuples, although is mainly 
prominent in them.

We have this warning in the docs:

>> Care must be taken when using objects returned by get_referrers() because 
>> some of them could still be under construction and hence in a temporarily 
>> invalid state. Avoid using get_referrers() for any purpose other than 
>> debugging.

That's because *by thesign* these APIs can potentially access half-initialized 
objects. 

I don't know if is worth to add a new API just for tuples, given that this 
problem happens with many other objects

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly

2021-02-15 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

func_builtins.py: reproducer which has no import.

func2 builtins is {'None': None} on Python 3.10.

Oh. This script also fails on Python 3.9. I'm not sure why  cloudpickle_bug.py 
works on Python 3.9.

--
Added file: https://bugs.python.org/file49811/func_builtins.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43230] typo in Simplified/Traditional Chinese documentation for library argparse

2021-02-15 Thread NKID00

New submission from NKID00 :

For Simplified 
Chinese(https://docs.python.org/zh-cn/3/library/argparse.html#description):

"程度" should probably be replaced by "程序".

这个参数简要描述这个程度做什么以及怎么做。 -> 这个参数简要描述这个程序做什么以及怎么做。

For Traditional 
Chinese(https://docs.python.org/zh-tw/3/library/argparse.html#description):

"程度" should probably be replaced by "程序".

这个参数简要描述这个程度做什么以及怎么做。 -> 这个参数简要描述这个程序做什么以及怎么做。

--
assignee: docs@python
components: Documentation
messages: 387031
nosy: NKID00, docs@python
priority: normal
severity: normal
status: open
title: typo in Simplified/Traditional Chinese documentation for library argparse
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> How is cloudpickle supposed to work? 

It creates a CodeType object and then create a function with this code object. 
It serializes the bytecode.

pickle is not affected since it doesn't create function objects, but retrieve 
them from imported modules.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

The general issue here is a the PyTuple_New() is unsafe: it immediately tracks 
the newly created tuple in the GC, whereas the tuple is not initialized yet. If 
the GIL is released before the tuple is fully populated and something access to 
this tuple via the GC (ex: gc.get_objects()), accessing the tuple can crash, 
especially in the Python land (for example, repr(the_tuple) is likely to crash).

IMO the unsafe PyTuple_New() API should be avoided. For example, allocate an 
array of PyObject* on the stack memory, and then call _PyTuple_FromArray(). 
This API is safe because it only tracks the tuple once it's fully initialized, 
and it calls INCREF on items. Problem: this safe and efficient API is currently 
private.

There are other safe alternatives like Py_BuildValue("(OOO)", item1, item2, 
item3).

_pysqlite_fetch_one_row() calls PyTuple_New() and releases the GIL at each 
sqlite3_column_type() call, so yeah, it has this exact bug. By the way, it 
doesn't check for PyTuple_SetItem() failure, whereas it's currently possible 
that there is more than one strong reference to the tuple which is being 
populated (because of the GC issue).

PyTuple_New() is ok-ish if there is no way to trigger a GC collection and if 
the GIL cannot be released until the tuple is fully initialized.

Maybe we need a private _PyTuple_NewUntracked() API to create a tuple which is 
not tracked by the GC, and also a _PyTuple_ResizeUntracked() API. By the way, 
_PyTuple_Resize() sounds like a nonsense since a tuple is supposed to be 
immutable ;-)

--
nosy: +vstinner
title: ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to 
internal function -> Incomplete tuple created by PyTuple_New() and accessed via 
the GC can trigged a crash

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset a2f0654b0a5b4c4f726155620002cc1f5f2d206a by Ken Jin in branch 
'master':
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)
https://github.com/python/cpython/commit/a2f0654b0a5b4c4f726155620002cc1f5f2d206a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> It looks like the globals dict passed to FunctionType(...) lacks a 
> __builtins__.

Right. But it worked in Python 3.9 :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken

2021-02-15 Thread Julian Berman


Julian Berman  added the comment:

Thanks Victor. Yes likely happy to send a PR (have to clear a few things
off the yak stack first)

On Tue, Feb 9, 2021 at 5:38 AM STINNER Victor 
wrote:

>
> STINNER Victor  added the comment:
>
> It makes sense to call _PyErr_WriteUnraisableMsg() when sys.excepthook
> raise a new exception. Do you want to propose a PR for that?
>
> sys.excepthook documentation mentions sys.unraisablehook:
> https://docs.python.org/dev/library/sys.html#sys.excepthook
>
> threading._make_invoke_excepthook logs threading.excepthook failure using
> sys.excepthook.
>
> Note: Carl also suggested to add a way to invoke sys.unraisablehook
> explicitly, not only for testing purpose. It would help in some cases.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
nosy: +Julian2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42861] ipaddress - add ability to get next closest network of any prefix size

2021-02-15 Thread Éric Araujo

Change by Éric Araujo :


--
nosy: +pmoody
title: ipaddress - add ability to get next closet network of any prefix size -> 
ipaddress - add ability to get next closest network of any prefix size

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

For RHEL7 which is the older OS that buildbots are still running, only the 
System Z architecture is supported. From the release notes [0]:

Note that Red Hat Enterprise Linux 7 supports IBM zEnterprise 196 hardware or 
later; IBM System z10 mainframe systems are no longer supported and will not 
boot Red Hat Enterprise Linux 7.

Also 32 (31 bits) in this case are only supported through virtualization with 
older OS's. So IMO it's fine to remove the support.

[0] 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.0_release_notes/chap-red_hat_enterprise_linux-7.0_release_notes-architectures

--
nosy: +cstratak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43181] Python macros don’t shield arguments

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Vitaliy for the bug report and Erlend for the fix ;-)

For Python 3.9 and older, a workaround is to wrap the call to 
PyObject_TypeCheck() with your own static inline function.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43181] Python macros don’t shield arguments

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4bb2a1ebc569eee6f1b46ecef1965a26ae8cb76d by Erlend Egeberg 
Aasland in branch 'master':
bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533)
https://github.com/python/cpython/commit/4bb2a1ebc569eee6f1b46ecef1965a26ae8cb76d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread STINNER Victor

STINNER Victor  added the comment:

Łukasz Langa:
> +1 from me. Whatever few users s390 still has, they can keep using Python 3.9 
> which is 5 years newer than the latest kernel they can use.

Nowadays, it became trivial to maintain downstream patches. It is easy to fork 
the Python Git repository and put your patches on top of it. Here it's only a 
matter of doing the maintenance upstream or not.


> Moving forward, s390 will be unambiguously unsupported as we cannot test 
> against this platform.  Unless we get a buildbot provided for this purpose, 
> as well as somebody willing to fix broken builds on that buildbot long-term, 
> it is what it is.

Wait. I would prefer to not have a buildbot worker unless there is a volunteer 
to fix all s390 specific issues. Otherwise, setting a buildbot worker will not 
solve any problem. I'm talking about build failures, test failures and issues 
on the worker directly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

> s390 is a 31-bit platform, not a 32-bit platform.

ARM64 only uses 48 bits for the address, but it uses 64-bit CPU words. Usually, 
we refer to an architecture by its CPU word, 32 or 64 bits. s390 uses 32-bit 
CPU words, no?

The Wikipedia article says:

"ESA/390 is arguably a 32-bit architecture; as with System/360, System/370, 
370-XA, and ESA/370, the general-purpose registers are 32 bits long, and the 
arithmetic instructions support 32-bit arithmetic. Only byte-addressable real 
memory (Central Storage) and Virtual Storage addressing is limited to 31 bits."

> s390 packages are still being built for SUSE Linux Enterprise 12 which is 
> still actively supported. I assume the same applies to RHEL LTS releases but 
> I can't verify that as I have no insight into RedHat's internal build system.

Red Hat maintains Fedora and RHEL, none is supporting s390, but both support 
s390x:

* https://fedoraproject.org/wiki/Architectures
* 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/considerations_in_adopting_rhel_8/architectures_considerations-in-adopting-rhel-8

Note: The correct name is Red Hat ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6253] optparse.OptionParser.get_usage uses wrong formatter

2021-02-15 Thread Irit Katriel


Irit Katriel  added the comment:

optparse is deprecated an no longer in development, so unless someone objects I 
will close this issue.

--
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet)

2021-02-15 Thread David Edelsohn


David Edelsohn  added the comment:

This has nothing to do with AIX.

This conversation should include Charalampos Stratakis, but I don't see him as 
an option for Nosy.

It probably is easy to add a s390 31-bit build to one of the buildbots.

--
nosy:  -aixto...@gmail.com

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43228] Regression in function builtins

2021-02-15 Thread Mark Shannon


Mark Shannon  added the comment:

Do you have a reproducer that does not use cloudpickle?

Pickling functions seems to work correctly.

>>> import pickle
>>> def func():
... return len([])
... 
>>> func2 = pickle.loads(pickle.dumps(func))
>>> 
>>> func2()
0

How is cloudpickle supposed to work? It looks like the globals dict passed to 
FunctionType(...) lacks a __builtins__.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2021-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

FYI the unbound project was fixed by calling Py_CompileString() on Python 3.9 
and newer:
https://github.com/NLnetLabs/unbound/commit/e0d426ebb10653a78bf5c4053198f6ac19bfcd3e

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43220] Argparse: Explicit default required arguments with add_mutually_exclusive_group are rejected

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
title: Explicit default required arguments with add_mutually_exclusive_group 
are rejected -> Argparse: Explicit default required arguments with 
add_mutually_exclusive_group are rejected
versions:  -Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py

2021-02-15 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +3.10regression

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +23323
pull_request: https://github.com/python/cpython/pull/24536

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu

2021-02-15 Thread Christian Bachmaier


Christian Bachmaier  added the comment:

Sorry, my Ubuntu version I mentioned above is the development version of 21.04 
and not 20.04.

I you would like or this would be a comfortable option for you, I can show this 
live/interactively in a shell of my test system to track down the error, say 
via a skype session.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu

2021-02-15 Thread Christian Bachmaier


New submission from Christian Bachmaier :

Now that the patch from issue 42591 (https://bugs.python.org/issue42591), i.e., 
msg383154 from 12/16/20  has made it to Ubuntu 20.04 with packet version 
python3.9.1-1, there show some problems with that.

I did:
> freeze/freeze.py -o frozen helloworld.py
> cd frozen
> make

This delivers a linker error
...xml__parsers.o M_xml__parsers__expat.o M_xml__sax.o 
M_xml__sax___exceptions.o M_xml__sax__expatreader.o M_xml__sax__handler.o 
M_xml__sax__saxutils.o M_xml__sax__xmlreader.o M_xmlrpc.o M_xmlrpc__client.o 
M_zipfile.o M_zipimport.o /usr/lib/libpython3.9.so -lexpat  
 -L/usr/lib -lz-lexpat  -lcrypt -lpthread -ldl  -lutil 
-lm -lm  -o helloworld
x86_64-linux-gnu-gcc: error: /usr/lib/libpython3.9.so: No such file or directory
make: *** [Makefile:1234: helloworld] Error 1

The linker searches libpython3.9 in /usr/lib instead in 
/usr/lib/x86_64-linux-gnu . The "hot-fix"
> ln -s /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/libpython3.9.so
fixes that, but brings another error:

> freeze/freeze.py -o frozen helloworld.py
> cd frozen
> make
 
...xml__parsers.o M_xml__parsers__expat.o M_xml__sax.o 
M_xml__sax___exceptions.o M_xml__sax__expatreader.o M_xml__sax__handler.o 
M_xml__sax__saxutils.o M_xml__sax__xmlreader.o M_xmlrpc.o M_xmlrpc__client.o 
M_zipfile.o M_zipimport.o /usr/lib/libpython3.9.so -lexpat  
 -L/usr/lib -lz-lexpat  -lcrypt -lpthread -ldl  -lutil 
-lm -lm  -o helloworld
/usr/bin/ld: config.o:(.data.rel+0x278): undefined reference to `PyInit_lazr'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1234: helloworld] Error 1

@Victor: I know there are alternatives to freeze, however, I have to keep a 
larger legacy project running, and I am not that expert. Maybe you could have a 
look on the above.

--
components: Library (Lib)
messages: 387015
nosy: chba
priority: normal
severity: normal
status: open
title: freeze searches libpython3.9.so in /usr/lib instead 
/usr/lib/x86_64-linux-gnu
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >