[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Stefan Pochmann


Stefan Pochmann  added the comment:

I misinterpreted you then, sorry. I guess also because Elliot shortly after 
retrated from the approach, saying he "rewrote unsafe_tuple_compare to move the 
less-than after the equality testing, to make sure it's 100% consistent".

I'd say the inconsistency the program showed was different. Yes, the xs got 
sorted differently than the ys, but the xs differed from the ys. The proposed 
method would change comparisons of *the same* tuples. You'd for example no 
longer have "sorted(tuples) == [min(tuples), max(tuples)]" for a list of two 
tuples.

Also curious factoid: I recently saw a case where despite the "only <" promise, 
sorting caused an "x > y" comparison (because "y < x" wasn't implemented).

(tiny note: tupsort.py does "range(2", should be "range(1" I think)

--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Tim Peters  added the comment:

Stefan, I looked at that old PR and can't find anywhere I suggested that he 
change the unsafe_tuple_compare() logic. I just _asked_ him "I'm curious about 
what the patched Python prints for this program:".

And, in fact, that program showed that CPython was _already_ inconsistent with 
how NaNs were treated during tuple comparison (object identity overriding 
float.__eq__).

In any case, no, I have no problem at all with inferring "x == y" from "not (x 
< y) and not (y < x)".

Curious factoid: in [x, y].sort(), CPython never asks "x < y?". Because that's 
irrelevant ;-) The list is already sorted if and only if "not (y < x)". Which 
is how "x <= y" is spelled, because the implementation promises to do only "<" 
comparisons.

--

___
Python tracker 

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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-19 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Joe:

I would argue that it should be expected that every object instantiated from a 
class should have a safe __repr__, because you will have logging and if a 
__repr__ is broken in some rare circumstances, it may bring down your 
production system in the worst case. 

Additionally, if you have some logic that handles error conditions and logs 
respective objects, and some of these objects have a broken __repr__, you may 
run into a situation where you have a rare bug, and as you use the logs to 
debug it, you will not be able to tell which object was involved because you 
will only see the traceback from the __repr__. You may have to wait for the 
rare bug to occur again to determine the cause.

To me it seems that this request is more for convenience of interactive 
debugging, which should not be a priority over system functional robustness and 
logging robustness.

In view of this, your example should be changed to something like:

class TriggerTracebackBug:
_repr = None
def __init__(self):
raise RuntimeError("can't build a TriggerTracebackBug object for some 
reason")
self._repr = 'if we reached this line, this object would have a repr 
result'
def __repr__(self):
return f''

--
nosy: +kj

___
Python tracker 

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



[issue38371] Tkinter: deprecate the split() method

2021-10-19 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 085ccb0f177988065dbe9ef4c5cda434560066bc by Zachary Ware in 
branch 'main':
bpo-38371: Remove remaining use of tk.split from bigmem tcl test (GH-29082)
https://github.com/python/cpython/commit/085ccb0f177988065dbe9ef4c5cda434560066bc


--

___
Python tracker 

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



[issue37815] 'Make Test' error while trying to install Python 3.7.4 on Linux Mint

2021-10-19 Thread Zachary Ware


Zachary Ware  added the comment:

I can't reproduce this on Pop_OS! 20.04 with libreadline-gplv2-dev, so I'm 
going to assume it's been fixed somewhere along the way.  If anyone else can 
still reproduce with up-to-date versions of everything involved, please post 
the relevant versions and steps taken to reproduce the test failure.

--
nosy: +zach.ware
resolution:  -> out of date
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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Stefan Pochmann


Stefan Pochmann  added the comment:

> What justifies "shouldn't"?

I based that on your old comments. Looked like tuple comparison results in 
sorting shouldn't differ from tuple comparison results elsewhere. I had 
actually proposed this exact method in a comment under your stackoverflow 
answer, but deleted it when I found that it had been discussed and discarded 
back then. But if it feels ok now, then good :-)

--

___
Python tracker 

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



[issue38371] Tkinter: deprecate the split() method

2021-10-19 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +zach.ware
nosy_count: 2.0 -> 3.0
pull_requests: +27350
pull_request: https://github.com/python/cpython/pull/29082

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27349
pull_request: https://github.com/python/cpython/pull/29081

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 4fe454c6f54b0948af67b53af6c2f35af6377e69 by Zachary Ware in 
branch 'main':
bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)
https://github.com/python/cpython/commit/4fe454c6f54b0948af67b53af6c2f35af6377e69


--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Tim Peters  added the comment:

Stefan, I have scant memory of ever caring, but, if I did, I got over it ;-) 

>>> math.nan == math.nan
False
>>> {math.nan : 5}[math.nan]
5

That is, PyObject_RichCompareBool() takes object identity as overriding __eq__; 
that's why the dict lookup works. But this one doesn't:

>>> {math.nan : 5}[float("nan")]
... Traceback (most recent call last):
KeyError: nan

Although that may change too.

I used to care a little, but not at all anymore. There's no sense trying to 
_make_ sense of what sorting could possibly mean in the absence of a total 
ordering.

> If you sort objects that always return True for both `<` and `==`,

A case of "garbage in, garbage out" to me.

> this would also have the opposite problem, considering tuple u smaller
> than v when it shouldn't.

What justifies "shouldn't"? If u[0] < v[0], then by the definition of 
lexicographic ordering, u < v. But if u[0] == v[0], which apparently is _also_ 
the case, then the same definition says the ordering of u and v is inherited 
from the ordering of u[1:] and v[1:]. There's no principled way of declaring 
one of those possibly contradicting definitions "the right one".

> That said, maybe the function could be optimized for
> known "well-behaving" types?

A type is well-behaving to me if and only if it implements a total ordering. If 
a type doesn't, what you get is an implementation accident, and code relying on 
any specific accident is inherently buggy.

--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Stefan Pochmann


Stefan Pochmann  added the comment:

That's how Elliot did it in the original proposal: 
https://bugs.python.org/issue28685

Back then you pointed out that "Else we can assume u[0] == v[0]" isn't true for 
float('nan') values:
https://github.com/python/cpython/pull/582#issuecomment-285838656
https://github.com/python/cpython/pull/582#issuecomment-285841789

If you sort objects that always return True for both `<` and `==`, this would 
also have the opposite problem, considering tuple u smaller than v when it 
shouldn't.

That said, maybe the function could be optimized for known "well-behaving" 
types?

--
nosy: +Stefan Pochmann

___
Python tracker 

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



[issue33277] Deprecate __loader__, __package__, and __cached__ on modules

2021-10-19 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
keywords: +patch
pull_requests: +27347
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29078

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread Zachary Ware

Zachary Ware  added the comment:

AFAICT, this is just a couple of tests that are testing something that's no 
longer an error, though anyone with deeper knowledge is more than welcome to 
disagree with my diagnosis :).  I've posted PR29077 to fix the tests.

Ned and Łukasz, will you want this backported to security branches to fix the 
buildbot(s)?

--
nosy: +lukasz.langa
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



[issue45532] Replace 'default' with 'main' as default in sys.version

2021-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

> youknowone

Do you want to take a look?

--
nosy: +youknowone

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +zach.ware
nosy_count: 6.0 -> 7.0
pull_requests: +27346
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29077

___
Python tracker 

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



[issue45532] Replace 'default' with 'main' as default in sys.version

2021-10-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
keywords: +easy (C)

___
Python tracker 

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



[issue45532] Replace 'default' with 'main' as default in sys.version

2021-10-19 Thread Dong-hee Na


Dong-hee Na  added the comment:

+1

--

___
Python tracker 

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



[issue45532] Replace 'default' with 'main' as default in sys.version

2021-10-19 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Change by Tim Peters :


--
assignee:  -> tim.peters

___
Python tracker 

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



[issue25355] Windows installer does not add py.exe launcher to "App Paths" key

2021-10-19 Thread Steve Dower


Steve Dower  added the comment:

> The store app doesn't add "App Paths" entries for "python.exe" and 
> "python3.exe".

You're right, it's not following the aliases, but the actual executable. For 
3.7, we had them as "python.exe", but from 3.8 they became "python3.8.exe" with 
a "python.exe" alias (python3.exe was always an alias). And since the App Path 
entries refer directly to the executable under "Program Files", you can 
(still!) only actually run them if you've also got the alias enabled.

You can test this by opening "Manage App Execution Aliases", disabling 
"python3.10.exe", and then pressing Win+R and launching "python3.10.exe". 
Re-enable the alias and it will run.

I believe it should follow aliases, since that's the only way the current logic 
works. I've already reported the bug that you can't launch without the global 
alias being enabled, and was told that it's "by design" and "better for users". 
But I'll see if I can find the owner of the feature and encourage them to fix 
it again.

> Python's installer puts the launcher in either the Windows directory or a 
> directory that's in PATH, so there's really no need for an "App Paths" entry.

I believe there are some scenarios that search App Paths for "registered apps", 
but we already handle Open With just fine and I can't think what else matters, 
so you're probably right.

--

___
Python tracker 

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



[issue45531] field "mro" behaves strangely in dataclass

2021-10-19 Thread Eric V. Smith


Eric V. Smith  added the comment:

I agree on your analysis. You'll get the same error on any name that type 
defines (like __class__), but "mro" looks like the only one without dunders.

I'm not sure the best way to fix this. I'll give it some thought.

Another problem is that assigning a default value breaks the .mro() call:

@dataclass
class A:
mro: object = 3

>>> A.mro()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'int' object is not callable

--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Change by Tim Peters :


--
keywords: +patch
pull_requests: +27345
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/29076

___
Python tracker 

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



[issue45532] Replace 'default' with 'main' as default in sys.version

2021-10-19 Thread Ezio Melotti


New submission from Ezio Melotti :

sys.version returns '3.10.0 (default, Oct  5 2021, 23:49:26) [GCC 10.2.1 
20210110]'

'default' is supposed to represent the name of the branch, and it's been there 
since the HG days: 
https://github.com/python/cpython/blob/fc64c351c7757f0ebdb7da65cb74871e494a2add/Modules/getbuildinfo.c#L44

When the code was updated for Git in #27593, the default remained the same: 
https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Modules/getbuildinfo.c#L44

The default should be updated to 'main'.

Note that _Py_gitidentifier is supposed to return meaningful values while 
building from within a git checkout -- when it fails to do so the default value 
is used.  This can also be tested through sys._git (which returns ('CPython', 
'', '')), but at the moment I can't build from a git checkout and verify that 
_Py_gitidentifier returns the correct branch.  If not, a separate issue should 
be created.

--
components: Interpreter Core
messages: 404380
nosy: ezio.melotti
priority: normal
severity: normal
stage: test needed
status: open
title: Replace 'default' with 'main' as default in sys.version
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue45531] field "mro" behaves strangely in dataclass

2021-10-19 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith
nosy: +eric.smith

___
Python tracker 

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



[issue25355] Windows installer does not add py.exe launcher to "App Paths" key

2021-10-19 Thread Eryk Sun


Eryk Sun  added the comment:

> IMO, this makes it the 'system' Python.

"App Paths" entries can be used like versioned symlinks in POSIX. For example, 
an "App Paths" entry for "python3.exe" can refer to a particular installation's 
"python.exe". That said, "App Paths" is only used by the shell API, not 
CreateProcessW(). The potential for inconsistency and confusion is a 
significant downside. 

> the py.exe launcher could be added there instead

Python's installer puts the launcher in either the Windows directory or a 
directory that's in PATH, so there's really no need for an "App Paths" entry. 

> Windows Store package manages this correctly in line with its 
> PATH management

The store app adds a user "App Paths" entry for the versioned executable name, 
such as "python3.10.exe". Unfortunately, when searching PATH and "App Paths", 
the shell API only tries to append ".exe" if the name doesn't already have an 
extension. Thus running "python3.10" from the Win+R dialog fails, but running 
"python3.10.exe" succeeds. To work around this, one can add a second "App 
Paths" entry for the name without ".exe", e.g. "python3.10".

The store app doesn't add "App Paths" entries for "python.exe" and 
"python3.exe". It's probably for the best, particularly for "python.exe". 
Entries in "App Paths" take precedence over PATH in the Win+R dialog, but CMD's 
`start` and PowerShell's `start-process` always search PATH first.

--
nosy: +eryksun

___
Python tracker 

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



[issue21969] WindowsPath constructor does not check for invalid characters

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> enhancement
versions: +Python 3.11 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue45531] field "mro" behaves strangely in dataclass

2021-10-19 Thread Finite State Machine


New submission from Finite State Machine :

The following Python script:

from dataclasses import dataclass

@dataclass
class A:
mro: object
x: object

Results in the following unexpected exception:

Traceback (most recent call last):
  File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", 
line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/runpy.py", 
line 86, in _run_code
exec(code, run_globals)
  File "/Users/dsuffling/names/junk.py", line 6, in 
class A:
  File 
"/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 
1178, in dataclass
return wrap(cls)
  File 
"/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 
1169, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
  File 
"/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 
1019, in _process_class
_init_fn(all_init_fields,
  File 
"/Users/dsuffling/.pyenv/versions/3.10.0/lib/python3.10/dataclasses.py", line 
540, in _init_fn
raise TypeError(f'non-default argument {f.name!r} '
TypeError: non-default argument 'x' follows default argument


The name of the first attribute ('mro') is critical; without it the problem 
does not occur.

It appears that 'mro' is somehow interacting with the 'mro' attribute of the 
'type' object.

This issue has been verified to occur with CPython 3.10.0.

--
components: Library (Lib)
messages: 404378
nosy: finite-state-machine
priority: normal
severity: normal
status: open
title: field "mro" behaves strangely in dataclass
type: behavior
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



[issue45459] Limited API support for Py_buffer

2021-10-19 Thread STINNER Victor


STINNER Victor  added the comment:

Maybe a PEP is needed to collect usages of the Py_buffer API and check if the 
ABI is future proof. A PEP may help to discuss with other projects which 
currently consume this API.

I suggest to start with the smallest possible API and then slowly extend it. 
It's too easy to make mistakes :-( Once it's added to the stable ABI, it will 
be really hard to change it.

For example, PyBuffer.format is a "char*", but who owns the string? For a 
stable ABI, I would suggest to duplicate the string.

For shape, stripes and suboffsets arrays, I would also suggest to allocate 
these arrays on the heap people to ensure that it cannot be modified from the 
outside.

In your PR, PyBuffer_GetLayout() gives indirectly access to the internal 
Py_buffer structure members and allows to modify them. One way is to avoid this 
issue is to return a *copy* of these arrays.

I would prefer to require to call "Set" functions to modify a Py_buffer to 
ensure that a buffer always remains consistency.


> PyBuffer_NewEx(PyObject *obj, void *buf,  Py_ssize_t len, Py_ssize_t 
> itemsize, int readonly, int ndim, char *format, Py_ssize_t *shape, Py_ssize_t 
> *strides, Py_ssize_t *suboffsets, void *internal)

This API looks like PyCode_New() which was broken *often* so it looks like a 
bad pattern for a stable ABI.

Maybe PyBuffer_New() + many Set() functions would be more future proof.

But I don't know which Py_buffer members are mandatory to have a "valid" buffer.

What if tomorrow we add new members. Will it be possible to initalize them to a 
reasonable default value?

--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-10-19 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 3163e68c342434db37c69669017f96a4bb2d5f13 by Ken Jin in branch 
'main':
bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)
https://github.com/python/cpython/commit/3163e68c342434db37c69669017f96a4bb2d5f13


--

___
Python tracker 

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



[issue34737] Python upgrade with SYSTEM account uninstalls python

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue39490] Python Uninstaller fails to clean up the old path variables when uninstalling

2021-10-19 Thread Irit Katriel


Irit Katriel  added the comment:

Actually I don't know if this is a windows issue, the report doesn't say.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue39490] Python Uninstaller fails to clean up the old path variables when uninstalling

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue38704] Prevent installation on unsupported Windows versions

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -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



[issue34036] ModuleNotFoundError: No module named '_ctypes' when install Python 3.7 on Linux

2021-10-19 Thread Irit Katriel


Irit Katriel  added the comment:

3.7 is no longer maintained. Please create a new issue if you are still having 
this problem with a current version of python (3.9+).

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue45523] Python3 ThreadingHTTPServer fails to send chunked encoded response

2021-10-19 Thread Martin Panter


Martin Panter  added the comment:

Looks like you forgot to encode the length of ten in hexadecimal.

I don't think the HTTP server module has any special handling for chunked 
responses, so this up to the user and isn't a bug in Python.

--
nosy: +martin.panter
resolution:  -> not a bug
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



[issue31011] Users (except from the one who installed) not able to see python in add remove programs.

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue37274] Scripts folder is empty in python 3.7.3 for windows.

2021-10-19 Thread Irit Katriel


Irit Katriel  added the comment:

There was no reply to followup questions so we can't do anything about this. 
Also 3.7 is no longer in maintenance.

Please create a new issue if you are having problems with a current (>= 3.9) 
version of Python.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue11173] Undocumented public APIs in Python 3.2

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
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



[issue11173] Undocumented public APIs in Python 3.2

2021-10-19 Thread STINNER Victor


STINNER Victor  added the comment:

> I think this is complete, so I'll close this if nobody will object.

I concur, please close it ;-)

--
status: pending -> open

___
Python tracker 

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



[issue24873] Add "full cleanup" checkbox to uninstaller

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue31875] Error 0x80070642: Failed to install MSI package.

2021-10-19 Thread Steve Dower


Steve Dower  added the comment:

We'd also need the other log files from %TEMP% in this case, but I suspect 
we're not going to get them now.

The associated PR is not related to this bug.

--
resolution:  -> out of date
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



[issue28576] Uninstalling Py352 x86 with /uninstall option does not remove prepended paths

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue41603] Compilation issue 3.8.5 with Redhat 7.8 and gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

2021-10-19 Thread STINNER Victor


STINNER Victor  added the comment:

Python 3.8 is no longer supported. Can you reproduce the issue with Python 
3.11? I fixed bugs like this one in the meanwhile.

--

___
Python tracker 

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



[issue37981] Can't install Python 3.7.4 x64 on Win 8.1

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> works for me
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



[issue41603] Compilation issue 3.8.5 with Redhat 7.8 and gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +vstinner

___
Python tracker 

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



[issue31875] Error 0x80070642: Failed to install MSI package.

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue39293] Windows 10 64-bit needs reboot after install

2021-10-19 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> works for me
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



[issue28584] ICC compiler check is too permissive

2021-10-19 Thread Zachary Ware


Change by Zachary Ware :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

___
Python tracker 

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



[issue25625] "chdir" Contex manager for pathlib

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for perservering, Filipe! ✨  ✨ 

Per Steering Council decision, the context manager is approved: 
https://github.com/python/steering-council/issues/77

--
resolution: rejected -> fixed
versions: +Python 3.11 -Python 3.9

___
Python tracker 

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



[issue20983] Python 3.4 'repair' Windows installation does not install pip & setuptools packages

2021-10-19 Thread Zachary Ware


Zachary Ware  added the comment:

The installer system for v3.4 and before has long since been retired.

--
resolution:  -> out of date
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



[issue25625] "chdir" Contex manager for pathlib

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 3592980f9122ab0d9ed93711347742d110b749c2 by Filipe Laíns in 
branch 'main':
bpo-25625: add contextlib.chdir (GH-28271)
https://github.com/python/cpython/commit/3592980f9122ab0d9ed93711347742d110b749c2


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
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



[issue24343] Installing 3.4.3 gives error codes 2503 and 2502 on windows 8

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue28983] Windows: Python 3.5.2 won't install on my computer

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue35673] Loader for namespace packages

2021-10-19 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I don't know.  What benefit would be gained?  That should probably be a 
separate issue/PR in either case.

--

___
Python tracker 

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



[issue26155] 3.5.1 installer issue on Win 7 32 bit

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Tim Peters  added the comment:

The attached tupsort.py gives a simple. focused example. Typical output on my 
box:

float   3.10
(float,)   11.75
[float]25.68

It's sorting a large list of floats. In the first line the list contains plain 
floats. In the second line, each float was wrapped in a 1-tuple. In the last 
line, wrapped in a singleton list.

Essentially any overhead of any kind is more expensive than merely comparing 
two floats in HW, so overhead is approximately everything here.  The tuple and 
list comparison functions are very similar, and the large advantage of 
"(float,)" over "[float]" is mostly due to that unsafe_tuple_compare() uses one 
less PyObject_RichCompareBool() call to resolve each compare (assuming that all 
floats in the list are distinct, which I didn't check, but is almost certainly 
the case).

Getting rid of its other PyObject_RichCompareBool() should yield another nice 
speed boost.

The pattern is worth addressing because tuples are routinely used as key= 
arguments to achieve multi-key sorting.

--
Added file: https://bugs.python.org/file50372/tupsort.py

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for the new tests, Alex. Not closing this just yet because maybe we find 
a way to fix it in 3.9.8+.

--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset c15ba304f35362470e29ea5626fed28366bc9571 by Miss Islington (bot) 
in branch '3.10':
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods 
(GH-29034) (GH-29072)
https://github.com/python/cpython/commit/c15ba304f35362470e29ea5626fed28366bc9571


--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


Tim Peters  added the comment:

FYI, this is fallout from a StackOverflow mystery:

https://stackoverflow.com/questions/69468552/efficiency-of-sorting-by-multiple-keys-in-python/69610671#

--

___
Python tracker 

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



[issue45530] Improve listobject.c's unsafe_tuple_compare()

2021-10-19 Thread Tim Peters


New submission from Tim Peters :

The code could typically be faster if it did what its comments imply it does: 
skip the expense of PyObject_RichCompareBool() entirely for the first pair of 
tuple elements. It actually always calls PyObject_RichCompareBool() on the 
first pair, and only if that says "not equal" does it use the faster 
ms->tuple_elem_compare to resolve "ok, so it's less than?".

Instead it could do the first pair before, and entirely apart from, the loop, 
along the lines of:

- Use ms->tuple_elem_compare to see whether u[0] < v[0]. If so, or if an error, 
we're done.

- Use ms->tuple_elem_compare to see whether v[0] < u[0]. If so, or if an error, 
we're done.

Else we can assume u[0] == v[0], and go on to compare u[1:] to v[1:] via a 
trivial variation of the current code.

In cases where the first pair does resolve it (common!), replacing a 
PyObject_RichCompareBool() with a ms->tuple_elem_compare can be significantly 
faster overall.

--
components: Interpreter Core
messages: 404360
nosy: tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve listobject.c's unsafe_tuple_compare()
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

Note: this *does* fail on 3.9, too. Even if it doesn't crash the production 
build, it does fail an assertion in a pydebug build:


test_error_offset_continuation_characters (test.test_exceptions.ExceptionTests) 
... Assertion failed: (!_PyErr_Occurred(tstate)), function _PyObject_Call, file 
Objects/call.c, line 261.
Fatal Python error: Aborted

Current thread 0x0001184d1dc0 (most recent call first):
  File "/private/tmp/cpy/Lib/test/test_exceptions.py", line 187 in check
  File "/private/tmp/cpy/Lib/test/test_exceptions.py", line 198 in 
test_error_offset_continuation_characters

--

___
Python tracker 

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



[issue45528] mmap: constants not listed in the documentation

2021-10-19 Thread Michael Wayne Goodman


Michael Wayne Goodman  added the comment:

I have added a draft PR on GitHub that adds the lists of constants. As 
mentioned in the PR, there are a few things that I think could be added before 
merging:

1. Update descriptions in mmap.mmap, and maybe the intro, to link to relevant 
sections.

2. Verify the availability of some constants. I only have access to a Unix 
system, so I cannot easily check if, e.g., the PROT_* constants are unavailable 
on Windows, or just unused.

3. Provide descriptions for ALLOCATIONGRANULARITY and PAGESIZE. As I 
understand, allocations occur in chunks at the size of ALLOCATIONGRANULARITY on 
Windows and PAGESIZE on Unix, although (presumably for portability) 
mmap.ALLOCATIONGRANULARITY is set to be equal to mmap.PAGESIZE on Unix systems. 
So does mmap.PAGESIZE have any use on Windows?

I'm not an expert of the low-level implementation of mmap, so I appreciate any 
help with the above (particularly (2) and (3)).

--

___
Python tracker 

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



[issue11173] Undocumented public APIs in Python 3.2

2021-10-19 Thread Irit Katriel


Irit Katriel  added the comment:

PyAST_CompileEx was removed in 3.10 and PyType_FromSpec, PyStructSequence_* are 
documented now.

PyThread_acquire_lock_timed is not, but I understand this is deliberate.

I think this is complete, so I'll close this if nobody will object.

--
nosy: +iritkatriel
resolution:  -> fixed
status: open -> pending

___
Python tracker 

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



[issue45529] checking any object for attr "get" always returns True with `hasattr`

2021-10-19 Thread Ned Deily


Ned Deily  added the comment:

That is expected behavior. "get" is a method of "dict".

>>> payload = {}
>>> dir(payload)
['__class__', '__class_getitem__', '__contains__', '__delattr__', 
'__delitem__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', 
'__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', 
'__init_subclass__', '__ior__', '__iter__', '__le__', '__len__', '__lt__', 
'__ne__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', 
'__reversed__', '__ror__', '__setattr__', '__setitem__', '__sizeof__', 
'__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 
'keys', 'pop', 'popitem', 'setdefault', 'update', 'values']
>>> hasattr(payload, "keys")
True


https://docs.python.org/3/library/stdtypes.html#dict.get

--
resolution:  -> not a bug
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



[issue45520] Frozen dataclass deep copy doesn't work with __slots__

2021-10-19 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

You're right that in non-dataclass scenarios, you'd just use __slots__.

The slots=True thing was necessary for any case where any of the dataclass's 
attributes have default values (my_int: int = 0), or are defined with fields 
(my_list: list = field(default_factory=list)). The problem is that __slots__ is 
implemented by, after the class definition ends, creating descriptors on the 
class to access the data stored at known offsets in the underlying PyObject 
structure. Those descriptors themselves being class attributes means that when 
the type definition machinery tries to use __slots__ to create them, it finds 
conflicting class attributes (the defaults/fields) that already exist and 
explodes.

Adding support for slots=True means it does two things:

1. It completely defines the class without slots, extracts the stuff it needs 
to make the dataclass separately, then deletes it from the class definition 
namespace and makes a *new* class with __slots__ defined (so no conflict occurs)
2. It checks if the dataclass is also frozen, and applies alternate 
__getstate__/__setstate__ methods that are compatible with a frozen, slotted 
dataclass

#2 is what fixes this bug (while #1 makes it possible to use the full range of 
dataclass features without sacrificing the ability to use __slots__). If you 
need this to work in 3.9, you could borrow the 3.10 implementations that make 
this work for frozen dataclasses to explicitly define __getstate__/__setstate__ 
for your frozen slotted dataclasses:

def __getstate__(self):
return [getattr(self, f.name) for f in fields(self)]


def __setstate__(self, state):
for field, value in zip(fields(self), state):
# use setattr because dataclass may be frozen
object.__setattr__(self, field.name, value)

I'm not closing this since backporting just the fix for frozen slotted 
dataclasses (without backporting the full slots=True functionality that's a new 
feature) is possibly within scope for a bugfix release of 3.9 (it wouldn't 
change the behavior of working code, and fixes broken code that might 
reasonably be expected to work).

--

___
Python tracker 

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



[issue45529] checking any object for attr "get" always returns True with `hasattr`

2021-10-19 Thread Clay Massok


New submission from Clay Massok :

Any time you use `hasattr` to check if a dict has the attr "get", it returns 
true.

Uploaded `.py` file has bug example.

--
components: macOS
files: bug.py
messages: 404353
nosy: m.c.massok, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: checking any object for attr "get" always returns True with `hasattr`
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50371/bug.py

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x 
with Tcl/Tk 8.6.11 -> test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

___
Python tracker 

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



[issue45528] mmap: constants not listed in the documentation

2021-10-19 Thread Michael Wayne Goodman


Change by Michael Wayne Goodman :


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

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11

2021-10-19 Thread Ned Deily


Ned Deily  added the comment:

There are similar test failures on macOS with the current Tk 8.6.11.1 on both 
3.10 and 3.11.

--
nosy: +ned.deily
stage: patch review -> needs patch
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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11

2021-10-19 Thread Ned Deily


Change by Ned Deily :


--
pull_requests:  -27336

___
Python tracker 

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



[issue45521] obmalloc radix tree typo in code

2021-10-19 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

I have not yet been able to reproduce methane's crash.  My guess it it's not 
related.

An explanation of what I think the impact of this bug is:

The radix tree is used to determine if memory is from obmalloc or from the 
system malloc (i.e return value from address_in_range()).  WIth ADDRESS_BITS 
set to 48, we ignore the top 16 bits of addresses.  The next 10 bits are 
supposed to be the index into the top level node array for the radix tree.  Due 
to the bug, we mask those and only use the bottom 8 of those 10.  So, if you 
have virtual addresses that span more than that 8 bit range, we will index into 
the wrong node.  That means address_in_range() could give the wrong answer.  
Which means you might try to free memory with the wrong malloc.

I think this is likely to be triggered only if you allocate a massive amount of 
memory, like 70 TB.  However, triggering it would depend on how the kernel maps 
virtual memory to the Python process.  I.e. there might be a wierd OS that 
gives pages at 0x7f00 and then right after pages at 0x3f00.

--

___
Python tracker 

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



[issue45500] Rewrite test_dbm

2021-10-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27342
pull_request: https://github.com/python/cpython/pull/29074

___
Python tracker 

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



[issue25355] Windows installer does not add py.exe launcher to "App Paths" key

2021-10-19 Thread Steve Dower


Steve Dower  added the comment:

Somewhat deliberate. We moved to properly support side-by-side installs, which 
can't be done with this key - App Paths would end up out of sync with PATH... 
almost instantly, really. (However, the Windows Store package manages this 
correctly in line with its PATH management, so they won't get out of sync.)

However, the py.exe launcher could be added there instead, as it is managed 
separately from the Python install so there's only ever one. It also handles 
the file association and drop handler, so it would make sense to set it here 
too.

The registry key would have to be added to the launcher MSI, somewhere under 
Tools/msi. Probably also needs a keypath registry key under its own location to 
be able to manage this properly - there should be other examples available.

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: Windows 3.5 installer does not add python to "App Paths" key -> Windows 
installer does not add py.exe launcher to "App Paths" key
type:  -> enhancement
versions: +Python 3.11 -Python 3.5

___
Python tracker 

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



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-10-19 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27341
pull_request: https://github.com/python/cpython/pull/29073

___
Python tracker 

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



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5c9cab595e56aeb118bff77ece784dbac30b4338 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-45494: Fix parser crash when reporting errors involving invalid 
continuation characters (GH-28993) (GH-29070)
https://github.com/python/cpython/commit/5c9cab595e56aeb118bff77ece784dbac30b4338


--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ad6d162e518963711d24c80f1b7d6079bd437584 by Alex Waygood in 
branch 'main':
bpo-39679: Add tests for classmethod/staticmethod singledispatchmethods 
(GH-29034)
https://github.com/python/cpython/commit/ad6d162e518963711d24c80f1b7d6079bd437584


--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2021-10-19 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 12.0 -> 13.0
pull_requests: +27340
pull_request: https://github.com/python/cpython/pull/29072

___
Python tracker 

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



[issue25222] 3.5.0 regression - Fatal Python error: Cannot recover from stack overflow

2021-10-19 Thread Irit Katriel


Irit Katriel  added the comment:

There was work on recursion in recent versions and the Fatal Error is less 
likely now. We will not investigate recursion issues on 3.5, so I will close 
this and request that you create a new issue if you have problem with a current 
Python version.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue45500] Rewrite test_dbm

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 325b2c223453203b2fa9ce7b9bcebdbef03adf70 by Łukasz Langa in 
branch '3.10':
[3.10] bpo-45500: Rewrite test_dbm (GH-29002) (GH-29069)
https://github.com/python/cpython/commit/325b2c223453203b2fa9ce7b9bcebdbef03adf70


--

___
Python tracker 

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



[issue25116] It failed to install Py3.5 on win2008R2

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
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



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27339
pull_request: https://github.com/python/cpython/pull/29071

___
Python tracker 

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



[issue25327] Python 3.5 Windows 10 Installation Fails With Corrupt Directory Error

2021-10-19 Thread Irit Katriel


Change by Irit Katriel :


--
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



[issue45506] Out of source tree builds failing on main - test_importlib others unreliable

2021-10-19 Thread Eric Snow


Eric Snow  added the comment:


New changeset f4b12440cf24d7636755aac5b2645e47713557c7 by Eric Snow in branch 
'main':
bpo-45506: Go back to not running most of test_embed in out-of-tree builds. 
(gh-29063)
https://github.com/python/cpython/commit/f4b12440cf24d7636755aac5b2645e47713557c7


--

___
Python tracker 

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



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27338
pull_request: https://github.com/python/cpython/pull/29070

___
Python tracker 

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



[issue45500] Rewrite test_dbm

2021-10-19 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +27337
pull_request: https://github.com/python/cpython/pull/29069

___
Python tracker 

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



[issue45020] Freeze all modules imported during startup.

2021-10-19 Thread Eric Snow


Eric Snow  added the comment:

On Mon, Oct 18, 2021 at 7:14 PM Guido van Rossum  wrote:
> Is gh-28940 only for UNIX?

It wasn't meant to be. :(

> I built on Windows with default options (PCbuild\build.bat) and it looks like 
> the frozen modules are used by default even though I am running in the source 
> directory. (I put a printf() call in unmarshal_frozen_code().)

I'll look into this.

--

___
Python tracker 

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



[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-19 Thread Eric Snow


Eric Snow  added the comment:

On Tue, Oct 19, 2021 at 10:47 AM Marc-Andre Lemburg
 wrote:
> Ok, I'll start looking into this and post updates here.

Thanks!

--

___
Python tracker 

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



[issue45528] mmap: constants not listed in the documentation

2021-10-19 Thread Michael Wayne Goodman


New submission from Michael Wayne Goodman :

Some constants mentioned in the mmap module documentation are not listed as 
module contents (i.e., with permalinks), so the mentions do not appear as links 
and it's not explicit that they are in the mmap module namespace. For instance, 
ACCESS_READ is referenced but does not link to anything, whereas MAP_PRIVATE 
links to the MAP_* constants section below showing that it is available as 
mmap.MAP_PRIVATE.

Constants available but not listed:

* ACCESS_* constants
  - ACCESS_READ
  - ACCESS_WRITE
  - ACCESS_COPY
  - ACCESS_DEFAULT
* PROT_* constants
  - PROT_READ
  - PROT_WRITE
  - PROT_EXEC (this one isn't even mentioned in the docs)
* ALLOCATIONGRANULARITY
* PAGESIZE

These constants are available and unlisted in the documentation for all active 
versions of Python (except ACCESS_DEFAULT, which is available from 3.7). In 
addition, none of the MAP_* constants are listed for Python 3.9 and prior, 
although they all (except MAP_POPULATE) have been available since at least 3.6.

Since these are valid and available constants in the mmap module, can we list 
them in the documentation for the appropriate versions?

--
assignee: docs@python
components: Documentation
messages: 404342
nosy: docs@python, goodmami
priority: normal
severity: normal
status: open
title: mmap: constants not listed in the documentation
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, 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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11

2021-10-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x 
-> test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with 
Tcl/Tk 8.6.11

___
Python tracker 

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



[issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset a106343f632a99c8ebb0136fa140cf189b4a6a57 by Pablo Galindo Salgado 
in branch 'main':
bpo-45494: Fix parser crash when reporting errors involving invalid 
continuation characters (GH-28993)
https://github.com/python/cpython/commit/a106343f632a99c8ebb0136fa140cf189b4a6a57


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue44849] test_os: test_get_set_inheritable_o_path() failed on AMD64 FreeBSD Shared 3.x

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 67e10be3fee7c69d4ece26e75a0b7a84dab68ce5 by Miss Islington (bot) 
in branch '3.8':
bpo-44849: Fix os.set_inheritable() on FreeBSD 14 with O_PATH (GH-27623) 
(GH-28978)
https://github.com/python/cpython/commit/67e10be3fee7c69d4ece26e75a0b7a84dab68ce5


--

___
Python tracker 

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



[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 7f70ba36706219181546c05363097f732827a081 by Victor Stinner in 
branch '3.8':
bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28979)
https://github.com/python/cpython/commit/7f70ba36706219181546c05363097f732827a081


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

EP, do you have any insight into these issues?  Why does 8.6.11 result in test 
failures?  Bug in our test or in tk?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue45195] test_readline: test_nonascii() failed on aarch64 RHEL8 Refleaks 3.x

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1d8cb01e23ab5fc626d4deda216f9a9a19a644a2 by Miss Islington (bot) 
in branch '3.8':
bpo-45195: Fix test_readline.test_nonascii() (GH-28329) (GH-28984)
https://github.com/python/cpython/commit/1d8cb01e23ab5fc626d4deda216f9a9a19a644a2


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45500] Rewrite test_dbm

2021-10-19 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 975b94b9de969777218e96a9950c1dab2dab65a0 by Serhiy Storchaka in 
branch 'main':
bpo-45500: Rewrite test_dbm (GH-29002)
https://github.com/python/cpython/commit/975b94b9de969777218e96a9950c1dab2dab65a0


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +epaine

___
Python tracker 

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



  1   2   >