[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue47190] Integrating tkinter and asyncio event loops

2022-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is a duplicate of issue27546.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +30357
pull_request: https://github.com/python/cpython/pull/32298

___
Python tracker 

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



[issue47210] './configure --help' causes infinite loop

2022-04-04 Thread ripspin


ripspin  added the comment:

GNU bash, version 4.3.42(1)-release (x86_64-unknown-linux-gnu)
uname -a
Linux xenial64-sda1 4.9.58 #1 SMP PREEMPT Mon Nov 13 15:54:01 GMT 2017 x86_64 
x86_64 x86_64 GNU/Linux

--

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1578f06c1c69fbbb942b90bfbacd512784b599fa by Serhiy Storchaka in 
branch 'main':
bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)
https://github.com/python/cpython/commit/1578f06c1c69fbbb942b90bfbacd512784b599fa


--

___
Python tracker 

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



[issue45763] Detect compression libraries in configure

2022-04-04 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
nosy: +arhadthedev
nosy_count: 1.0 -> 2.0
pull_requests: +30360
pull_request: https://github.com/python/cpython/pull/32299

___
Python tracker 

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



[issue45747] Detect dbm and gdbm dependencies in configure.ac

2022-04-04 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
nosy: +arhadthedev
nosy_count: 4.0 -> 5.0
pull_requests: +30359
pull_request: https://github.com/python/cpython/pull/32299

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
nosy: +arhadthedev
nosy_count: 5.0 -> 6.0
pull_requests: +30358
pull_request: https://github.com/python/cpython/pull/32299

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
pull_requests:  -30358

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
pull_requests: +30361
pull_request: https://github.com/python/cpython/pull/32299

___
Python tracker 

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



[issue47211] Remove re.template() and re.TEMPLATE

2022-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

They were added in 436c3d58a2570f3b599e59b4071f944f774ec441 (between 1.6a2 and 
2.0), but the purpose is not known. See also 
https://mail.python.org/archives/list/python-...@python.org/message/DVSQGM5LO4TK63C63H6KQ6XBTBQGFLEN/.
 The feature was not fully implemented, and it was disabled short time later in 
29c4ba9ada44d62988c62c85c8046985f10a1c85. Currently the only effect of this 
flag is that repetition operators (+, *, ?, {}) do not work. A comment was 
added in 3562f1176403653ebfbef6275d449ad42d1b843a:

SRE_FLAG_TEMPLATE = 1 # template mode (disable backtracking)

It's all. I guess it could have some relation to possessive repetition 
operators, except that it is a global flag.

I think it should be removed without deprecation because it never really worked 
and never was documented.

--
components: Library (Lib), Regular Expressions
messages: 416658
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Remove re.template() and re.TEMPLATE
type: enhancement
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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ff2cf1d7d5fb25224f3ff2e0c678d36f78e1f3cb by Serhiy Storchaka in 
branch 'main':
bpo-47152: Remove unused import in re (GH-32298)
https://github.com/python/cpython/commit/ff2cf1d7d5fb25224f3ff2e0c678d36f78e1f3cb


--

___
Python tracker 

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



[issue47211] Remove re.template() and re.TEMPLATE

2022-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-04 Thread Steve Dower


Steve Dower  added the comment:

It could also be something on your PATH interfering, as that particular 
ImportError could be pretty deep in the load chain.

If none of the built-in options narrow it down enough, try 
https://pypi.org/project/dlltracer/ as well. Its output takes a bit of 
interpretation, but it'll definitely get us closer.

--

___
Python tracker 

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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-04 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +30363
pull_request: https://github.com/python/cpython/pull/32301

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-04 Thread Éric Araujo

Éric Araujo  added the comment:

The new PR uses new constants*, so could not be backported as is (see my 
previous message).


(*side question: should the constants use an enum?)

--

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-04 Thread Éric Araujo

Change by Éric Araujo :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue47212] Minor issues in reported Syntax errors

2022-04-04 Thread Matthieu Dartiailh


New submission from Matthieu Dartiailh :

Hi,
While working on Pegen I noticed that:
- the invalid_arguments rule would non point to the full generator expression 
in its second and fifth alternatives
- when reporting an indentation error after a bare except, the error is 
actually a SyntaxError

I will open a PR shortly to address both since the changes are quite minimal 
IMO.

--
components: Parser
messages: 416662
nosy: lys.nikolaou, mdartiailh, pablogsal
priority: normal
severity: normal
status: open
title: Minor issues in reported Syntax errors
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue47213] arrow at wrong place

2022-04-04 Thread apostofes


New submission from apostofes :

arrow should be after `a`

--
components: Library (Lib)
files: Screenshot (1044).png
messages: 416663
nosy: apostofes
priority: normal
severity: normal
status: open
title: arrow at wrong place
type: enhancement
versions: Python 3.7
Added file: https://bugs.python.org/file50718/Screenshot (1044).png

___
Python tracker 

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



[issue47212] Minor issues in reported Syntax errors

2022-04-04 Thread Matthieu Dartiailh


Change by Matthieu Dartiailh :


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

___
Python tracker 

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



[issue47213] Incorrect location of caret in SyntaxError

2022-04-04 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +pablogsal
title: arrow at wrong place -> Incorrect location of caret in SyntaxError
type: enhancement -> behavior

___
Python tracker 

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



[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Ravi Jain


New submission from Ravi Jain :

the.
```
import inspect
inspect.isfunction
```
does not consider a
```
builtin_function_or_method
```
as a function.
for example,
```
inspect.isfunction(abs)
```
gives,
```
False
```
in the background even the builtin `abs` is a function, so shouldn't it return 
True?

the way this check is implemented is by matching the type of a 
builtin_function_or_method with,
```
type(len)
```
and since, `type(len)` is `builtin_function_or_method`, so, the 
`inspect.isfunction` check gives False.
But in my opinion, it should return True, even for builtin functions or methods.

--
components: Build
messages: 416664
nosy: apostofes
priority: normal
severity: normal
status: open
title: builtin_function_or_method is also either a function or a method
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



[issue47215] Add "unstable" frame stack api

2022-04-04 Thread Mark Shannon


New submission from Mark Shannon :

We need to provide an API to create, swap and free frame stacks for greenlets.

Since this is primarily for greenlets (and any other stackful coroutines 
libraries that want to use it) it will be "unstable".

In this case, by "unstable" I mean:
1. Starts with an underscore
2. Gets PyAPI_FUNC annotations, so we don't strip the symbols from the 
executable
3. Undocumented, except for comments that say it is unstable.

The API will be:

```
typedef struct _frame_stack {
_PyStackChunk *current_chunk;
PyObject **top;
PyObject **limit;
int chunk_size;
} _PyFrameStack;

PyAPI_FUNC(void) _PyFrameStack_Init(_PyFrameStack *fs, int chunk_size);
PyAPI_FUNC(void) _PyFrameStack_Swap(_PyFrameStack *fs);
PyAPI_FUNC(void) _PyFrameStack_Free(_PyFrameStack *fs);

```

--
assignee: Mark.Shannon
components: C API
messages: 416665
nosy: Mark.Shannon, brandtbucher
priority: normal
severity: normal
stage: needs patch
status: open
title: Add "unstable" frame stack api
type: enhancement
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



[issue47213] Incorrect location of caret in SyntaxError

2022-04-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

No, the location is correct, the string for 'a' is actually closed after the a. 
This makes a list with the following elements:

'a ,'

b',  '

c',  '

As "b" is a valid prefix for string (bytes) it doesn't fail there, but 'c' 
isn't so you get the syntax error.

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



[issue47215] Add "unstable" frame stack api

2022-04-04 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Ma Lin


Ma Lin  added the comment:

Match.regs is an undocumented attribute, it seems it has existed since 1991. 
Can it be removed?

https://github.com/python/cpython/blob/ff2cf1d7d5fb25224f3ff2e0c678d36f78e1f3cb/Modules/_sre/sre.c#L2871

--

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2022-04-04 Thread Barney Gale


Barney Gale  added the comment:

The docs for PurePath.is_absolute() say:

> A path is considered absolute if it has both a root and (if the flavour 
> allows) a drive

This does not preclude it from having ".." segments.

PurePath.absolute() is documented as of bpo-29688 / 3.11, see: 
https://docs.python.org/3.11/library/pathlib.html#pathlib.Path.absolute

The documentation for the absolute() method is deliberately placed alongside 
resolve() for ease of comparison. Both methods make a path absolute, but 
resolve() also follows symlinks, and consequently is able to safely elide ".." 
segments.

--

___
Python tracker 

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



[issue47190] Integrating tkinter and asyncio event loops

2022-04-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

That's fine. My brief search didn't turn up

https://bugs.python.org/issue27546

I'm happy to close this.

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



[issue27546] Integrate tkinter and asyncio (and async)

2022-04-04 Thread Skip Montanaro


Skip Montanaro  added the comment:

See also (perhaps)

https://bugs.python.org/issue47190

--
nosy: +skip.montanaro

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2022-04-04 Thread Skip Montanaro


Change by Skip Montanaro :


--
nosy:  -skip.montanaro

___
Python tracker 

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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-04 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 8a349eb30b54bab9a7146fc10e3379c3cacaa19e by Mark Shannon in 
branch 'main':
Revert "bpo-44800: Document internal frame naming conventions (GH-32281)" 
(#32301)
https://github.com/python/cpython/commit/8a349eb30b54bab9a7146fc10e3379c3cacaa19e


--

___
Python tracker 

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



[issue45317] Document the removal the usage of the C stack in Python to Python calls

2022-04-04 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-04 Thread Sam Ezeh


Sam Ezeh  added the comment:

I don't know what the best course of action would be but if preserving 
permissions needs to be back-ported, could the default permission preservation 
flag in 3.11+ be the one to preserve safe permissions and then make it so that 
the previous versions (<3.11, without the constants) always take this course of 
action? Maintaining the different options for preserving permissions while 
still allowing for this functionality to be back-ported.

I don't have a strong opinion on backporting permission preservation but to me, 
it seems like it would be a change in behaviour instead of a bug fix. The 
current default in the PR is to not preserve any permissions but if necessary, 
I'll change it to whatever is agreed upon.

I'll move the constants into an enum, but right now I'm not sure how I'd name 
the class.

As an aside, while writing this comment I realised that the reason tests aren't 
passing on my end might very well be due to the fact I do CPython work on an 
NTFS partition instead of on my main EXT4 partition.

--

___
Python tracker 

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



[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

https://docs.python.org/3/library/inspect.html#inspect.isfunction says this:

"""
inspect.isfunction(object)
Return True if the object is a Python function, which includes functions 
created by a lambda expression.
"""

Emphasis on the "Python function", as in, something written in Python using a 
`def` statement or a `lambda` expression. If isfunction returns True, you can 
presumably access function-specific implementation details like the functions's 
f.__code__ attribute. If you need to check for "anything that works as a 
function", you can use `callable()`:

>>> callable(lambda: 2)
True
>>> callable(abs)
True
>>> def f(x): return x
>>> callable(f)
True

I'm not an expert on the inspect module, but I'm guessing it's not worth 
breaking backwards-compatibility to change this behavior.

Would extra emphasis in the documentation have been helpful for you, or were 
you mostly attempting to rely on the function's name?

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-04 Thread Éric Araujo

Éric Araujo  added the comment:

On second thought, maybe no fix should be backported.
Changing behaviour silently might break things, changing with a new option puts 
the change in a grey fix/enhancement area, so maybe better to let current 
versions as they are, with the bug/limitation noted in the documentation, and 
give control in 3.11 only.

--

___
Python tracker 

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



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-04 Thread Jim Wygralak


Jim Wygralak  added the comment:

DATA:
Just chiming in to report that I'm seeing this issue with the following freshly 
installed:
Python 3.10.4
tkinter 8.6.12
PySimpleGUI 4.57.0
OS is Windows 10

As others have report it is related to the cursor entering the tool tip box 
before clicking the button.

OBSERVATIONS:
I've noticed that the tool tip always seems to appear up and to the right of 
the cursor. If I approach the button by moving the cursor down & left, the tool 
tip appears when the cursor enters the button, then as I continue to move the 
cursor to the center of the button I'm moving AWAY FROM the tool tip, and the 
issue doesn't appear.

However, if I approach the button by moving the cursor up and to the right, the 
tool tip appears as the cursor enters the button, and it overlaps the button. 
As I continue to move the cursor to the center of the button, it enters the 
tool tip box and triggers this fault.

The only 100% effective workaround appears to be not using tooltips. That is a 
loss of function, and not an acceptable long term solution.

--
nosy: +jim.wygralak

___
Python tracker 

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



[issue47206] pickle docs are wrong about nested classes

2022-04-04 Thread Géry

Change by Géry :


--
nosy: +maggyero

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Matthew Barnett


Matthew Barnett  added the comment:

For reference, I also implemented .regs in the regex module for compatibility, 
but I've never used it myself. I had to do some investigating to find out what 
it did!

It returns a tuple of the spans of the groups.

Perhaps I might have used it if it didn't have such a cryptic name and/or was 
documented.

--

___
Python tracker 

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



[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset d1b1c885d8f276a0b1ff2e327270916396a8b842 by Christian Heimes in 
branch 'main':
bpo-47208: Allow vendors to override CTYPES_MAX_ARGCOUNT (GH-32297)
https://github.com/python/cpython/commit/d1b1c885d8f276a0b1ff2e327270916396a8b842


--

___
Python tracker 

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



[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Christian Heimes


Christian Heimes  added the comment:

GH-32297 adds #ifndef CTYPES_MAX_ARGCOUNT and exposes the constant in the 
_ctypes extension module, so the test case can use the constant. It allows you 
to override CTYPES_MAX_ARGCOUNT until libffi upstream agrees on 
FFI_MAX_CLOSURE_ARGS.

--

___
Python tracker 

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



[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Christian Heimes


Change by Christian Heimes :


--
components: +Tests
type:  -> behavior
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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 48269ea9fdbc5804f80962364f95e69097c417ba by 180909 in branch 
'main':
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)
https://github.com/python/cpython/commit/48269ea9fdbc5804f80962364f95e69097c417ba


--
nosy: +iritkatriel

___
Python tracker 

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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +30368
pull_request: https://github.com/python/cpython/pull/32307

___
Python tracker 

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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30369
pull_request: https://github.com/python/cpython/pull/32308

___
Python tracker 

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



[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Ravi Jain


Ravi Jain  added the comment:

but `callable` returns `True` for classes with `__call__` also, it does not 
check whether the argument passed to it is a function or not.

I want some way to return `True` for both builtin functions and Python 
functions, but not for classes.

And similarly, some way to return `True` for both builtin methods and Python 
methods.

Should the documentation for `inspect.isfunction` include, `this does not 
include builtin functions.`, and similarly for `inspect.ismethod`?

Should I create a PR to add these two sentences to the documentation?

--

___
Python tracker 

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-04 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset c9844cb8aa9615cdc8770d1e43ce6e2ac3efd836 by Christian Heimes in 
branch 'main':
bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253)
https://github.com/python/cpython/commit/c9844cb8aa9615cdc8770d1e43ce6e2ac3efd836


--

___
Python tracker 

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



[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Perhaps what you want is inspect.isroutine ?

https://docs.python.org/3/library/inspect.html#inspect.isroutine

I agree with Dennis that the isfunction test is for **Python** (def or lambda) 
functions, not builtins. The docstring for the inspect.is* methods make 
promises about what attributes an object will have:

def isbuiltin(object):
"""Return true if the object is a built-in function or method.
Built-in functions and methods provide these attributes:
__doc__ documentation string
__name__original name of this function or method
__self__instance to which a method is bound, or None"""


def isfunction(object):
"""Return true if the object is a user-defined function.
Function objects provide these attributes:
__doc__ documentation string
__name__name with which this function was defined
__code__code object containing compiled function bytecode
__defaults__tuple of any default values for arguments
__globals__ global namespace in which this function was defined
__annotations__ dict of parameter annotations
__kwdefaults__  dict of keyword only parameters with defaults"""


def (and lambda) functions have a different API from builtin_function_or_method 
objects. They should be kept separate.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue47186] split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump

2022-04-04 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +30370
pull_request: https://github.com/python/cpython/pull/32309

___
Python tracker 

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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread miss-islington


miss-islington  added the comment:


New changeset 6b4b892e0962a7050c5064133c59955691f9776c by Miss Islington (bot) 
in branch '3.10':
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)
https://github.com/python/cpython/commit/6b4b892e0962a7050c5064133c59955691f9776c


--

___
Python tracker 

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



[issue47216] adding mtime option to gzip open()

2022-04-04 Thread Marin M


New submission from Marin M :

init of class GzipFile has mtime as an optional argument, but open() function 
does not.

When using open(), mtime will always be set to the current time and so far 
there was no way of fixing it to a specific timestamp.

In case two people would tar.gz the same file and take its sha, the shas would 
be different. With an option to fix the mtime, they could have a unique sha.

PR containing code change and the tests is already ready.

--
components: Library (Lib)
messages: 416685
nosy: ellaellela
priority: normal
severity: normal
status: open
title: adding mtime option to gzip open()
type: enhancement
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



[issue47216] adding mtime option to gzip open()

2022-04-04 Thread Marin M


Change by Marin M :


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

___
Python tracker 

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



[issue47214] builtin_function_or_method is also either a function or a method

2022-04-04 Thread Ravi Jain


Ravi Jain  added the comment:

yes, I think `inspect.isroutine` does the required functionality.
sorry, I did not know about it, and could not think of the word `routine` when 
checking for functions.

--

___
Python tracker 

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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread miss-islington


miss-islington  added the comment:


New changeset 5b4bc61d897c956c245a907807d0073aaa35f1c3 by Miss Islington (bot) 
in branch '3.9':
bpo-46484:Add test for Calendar.iterweekdays (GH-30825)
https://github.com/python/cpython/commit/5b4bc61d897c956c245a907807d0073aaa35f1c3


--

___
Python tracker 

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



[issue46484] Add test for Calendar().iterweekdays()

2022-04-04 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you Jiahua!

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



[issue42012] typing support in wsgiref

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

This seems useful to me but I don't have experience with wsgiref. pje is listed 
as the maintainer in the devguide but appears to be inactive.

I'd suggest you open a PR and if anyone feels strongly against it, they can 
complain.

--
nosy: +JelleZijlstra, pje

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-04-04 Thread Matthew Rahtz


Matthew Rahtz  added the comment:

> 1. Finish writing docs

Done once https://github.com/python/cpython/pull/32103 is merged.

> 2. Implement support for pickling of unpacked native tuples

Done once https://github.com/python/cpython/pull/32159 is merged.

4. Resolve the issue of how we implement type substitution 
(https://bugs.python.org/issue47006)

Will re-visit this now.

--

___
Python tracker 

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



[issue47217] adding name to BZ2File

2022-04-04 Thread Marin M


New submission from Marin M :

BZ2File doesn't have attribute name, unlike GzipFile which has it. Trying to 
access that attribute results in error.

PR is ready with code changes and tests which mimics what is already available 
for GzipFile (e.g. we do not take name from BytesIO() objects because they do 
not have it).
A similar PR is ready for LZMAFile as well (a different enhancement).

--
components: Library (Lib)
messages: 416690
nosy: ellaellela
priority: normal
severity: normal
status: open
title: adding name to BZ2File
type: enhancement
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



[issue47217] adding name to BZ2File

2022-04-04 Thread Marin M


Change by Marin M :


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

___
Python tracker 

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



[issue47218] adding name to lzmafile

2022-04-04 Thread Marin M


New submission from Marin M :

LZMAFile doesn't have attribute name, unlike GzipFile which has it. Trying to 
access that attribute results in error.

PR is ready with code changes and tests which mimics what is already available 
for GzipFile (e.g. we do not take name from BytesIO() objects because they do 
not have it).
A similar PR is ready for BZ2File as well (a different enhancement).

--
components: Library (Lib)
messages: 416691
nosy: ellaellela
priority: normal
severity: normal
status: open
title: adding name to lzmafile
type: enhancement
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



[issue47218] adding name to lzmafile

2022-04-04 Thread Marin M


Change by Marin M :


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

___
Python tracker 

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



[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-04 Thread Hood Chatham


Hood Chatham  added the comment:

Ideally the library should be able to define a different macro, e.g., 
CTYPES_CUSTOM_MAX_ARGCOUNT. This way the libffi port can define 
CTYPES_CUSTOM_MAX_ARGCOUNT and it will be compatible with older Python versions 
without causing Warning: "CTYPES_MAX_ARGCOUNT redefined`.

--

___
Python tracker 

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



[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer

2022-04-04 Thread neonene


Change by neonene :


--
nosy: +neonene
nosy_count: 5.0 -> 6.0
pull_requests: +30375
pull_request: https://github.com/python/cpython/pull/32313

___
Python tracker 

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



[issue47152] Reorganize the re module sources

2022-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Match.regs is an undocumented attribute, it seems it has existed since 1991. 
Can it be removed?

It was kept for compatibility with the pre-SRE implementation of the re module. 
It was an implementation detail in the original Python code, but I am sure that 
somebody still uses it. I am sure some code still use it. If we are going to 
remove it, it needs to be deprecated first.

--

___
Python tracker 

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



[issue47219] asyncio with two interpreter instances

2022-04-04 Thread Matthias Badaire


New submission from Matthias Badaire :

Hi,
I have an issue when using asyncio and two interpreter instances each launched 
and used in a seperated thread. 
I am getting a asyncio loop for each thread .However asyncio is getting me the 
same loop because of this code in get_running_loop. Indeed when I have two 
interpreter, the ts_id would be the same for both my threads and therefore I 
will get the cached value of the first thread. cached_running_holder being 
static, it is the same value for all instances of interpreter.
Maybe we should check if we are in the same interpreter or same thread ,.. I am 
not sure how it could be fixed. 

_asynciomodule.c:
get_running_loop(PyObject **loop)
{
PyObject *rl;

PyThreadState *ts = _PyThreadState_GET();
uint64_t ts_id = PyThreadState_GetID(ts);
if (ts_id == cached_running_holder_tsid && cached_running_holder != NULL) {

If it does not make sense, I have some sample code but it is not just 10 lines.

--
components: asyncio
messages: 416694
nosy: asvetlov, mbadaire, yselivanov
priority: normal
severity: normal
status: open
title: asyncio with two interpreter instances
type: behavior

___
Python tracker 

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



[issue47219] asyncio with two interpreter instances

2022-04-04 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
nosy: +eric.snow

___
Python tracker 

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



[issue21314] Document '/' in signatures

2022-04-04 Thread Petr Viktorin


Petr Viktorin  added the comment:

- PEP 570 (Python Positional-Only Parameters) is final
- The language spec was updated to mention it
- the FAQ entry was revised to not link to the PEP and be a self-contained 
explanation

IMO the only thing left is to make searching for `/` yield the right results, 
but that is bpo-15871.
Closing this issue.

--
nosy: +petr.viktorin
resolution:  -> fixed
stage: commit 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



[issue47190] Integrating tkinter and asyncio event loops

2022-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

That issue has my previous experiments.  Thank you Serhiy for finding it ;-).

--
resolution:  -> duplicate
superseder:  -> Integrate tkinter and asyncio (and async)

___
Python tracker 

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



[issue47220] Document the optional callback parameter of weakref.WeakMethod

2022-04-04 Thread Géry

New submission from Géry :

- Document the optional *callback* parameter of `weakref.WeakMethod`.
- Fix a few spelling mistakes.
- Improve wording.

--
components: Library (Lib)
messages: 416697
nosy: maggyero
priority: normal
pull_requests: 30376
severity: normal
status: open
title: Document the optional callback parameter of weakref.WeakMethod
type: enhancement
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



[issue38299] build errors - latest "git pull"

2022-04-04 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks for the report.

We run AddressSanitizer on the buildbots now, so I'm going to assume that we 
know about these issues when they come up.

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



[issue47221] Bug or bad performance

2022-04-04 Thread Cezary Wagner


New submission from Cezary Wagner :

I am experienced programmer 10y+ - that is very very strange performance 
problem when I play Python timeit with my son :)

three way operator a <= x <= b is slower than a <= x and x <= b.

It looks like wrong implementation since it is impossible that two separate 
check is faster that one check (with two low level check in C).




import timeit

REPEATS = 100


def test1():
selected = []
for i in range(REPEATS):
if i >= 25 and i <= 75:
selected.append(i)
return selected


def test2():
selected = []
for i in range(REPEATS):
if 25 <= i <= 75:
selected.append(i)
return selected


print(timeit.timeit(test1))
print(timeit.timeit(test2))


Result is on Windows 10.
4.42894768389
4.906247778

--
components: Interpreter Core
messages: 416699
nosy: Cezary.Wagner
priority: normal
severity: normal
status: open
title: Bug or bad performance
type: performance
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



[issue47049] Incorrect shutil.copytree() behaviour with symlinks

2022-04-04 Thread Zoltan Vajda


Zoltan Vajda  added the comment:

Because I am a first contributor, the automatic quality checks on GitHub have 
to be manually started by somebody. How can I reqest this and by whom?

--
type:  -> behavior

___
Python tracker 

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



[issue47221] Bug or bad performance

2022-04-04 Thread Cezary Wagner


Cezary Wagner  added the comment:

Some more experiments:

import dis
import timeit

REPEATS = 100


def test1():
selected = []
for i in range(REPEATS):
if i >= 25 and i <= 75:
selected.append(i)
return selected


def test2():
selected = []
for i in range(REPEATS):
if 25 <= i <= 75:
selected.append(i)
return selected


def test3():
return [x for x in range(REPEATS) if x >= 25 and x <= 75]


def test4():
return [x for x in range(REPEATS) if 25 <= x <= 75]


def test(f):
print(dis.dis(f.__code__.co_code))
print(timeit.timeit(f))


test(test1)
test(test2)
test(test3)
test(test4)

Result:

  0 BUILD_LIST   0
  2 STORE_FAST   0 (0)
  4 LOAD_GLOBAL  0 (0)
  6 LOAD_GLOBAL  1 (1)
  8 CALL_FUNCTION1
 10 GET_ITER
>>   12 FOR_ITER15 (to 44)
 14 STORE_FAST   1 (1)
 16 LOAD_FAST1 (1)
 18 LOAD_CONST   1 (1)
 20 COMPARE_OP   5 (>=)
 22 POP_JUMP_IF_FALSE   21 (to 42)
 24 LOAD_FAST1 (1)
 26 LOAD_CONST   2 (2)
 28 COMPARE_OP   1 (<=)
 30 POP_JUMP_IF_FALSE   21 (to 42)
 32 LOAD_FAST0 (0)
 34 LOAD_METHOD  2 (2)
 36 LOAD_FAST1 (1)
 38 CALL_METHOD  1
 40 POP_TOP
>>   42 JUMP_ABSOLUTE6 (to 12)
>>   44 LOAD_FAST0 (0)
 46 RETURN_VALUE
None
4.56567799025
  0 BUILD_LIST   0
  2 STORE_FAST   0 (0)
  4 LOAD_GLOBAL  0 (0)
  6 LOAD_GLOBAL  1 (1)
  8 CALL_FUNCTION1
 10 GET_ITER
>>   12 FOR_ITER19 (to 52)
 14 STORE_FAST   1 (1)
 16 LOAD_CONST   1 (1)
 18 LOAD_FAST1 (1)
 20 DUP_TOP
 22 ROT_THREE
 24 COMPARE_OP   1 (<=)
 26 POP_JUMP_IF_FALSE   18 (to 36)
 28 LOAD_CONST   2 (2)
 30 COMPARE_OP   1 (<=)
 32 POP_JUMP_IF_FALSE   25 (to 50)
 34 JUMP_FORWARD 2 (to 40)
>>   36 POP_TOP
 38 JUMP_ABSOLUTE6 (to 12)
>>   40 LOAD_FAST0 (0)
 42 LOAD_METHOD  2 (2)
 44 LOAD_FAST1 (1)
 46 CALL_METHOD  1
 48 POP_TOP
>>   50 JUMP_ABSOLUTE6 (to 12)
>>   52 LOAD_FAST0 (0)
 54 RETURN_VALUE
None
5.639823407506
  0 LOAD_CONST   1 (1)
  2 LOAD_CONST   2 (2)
  4 MAKE_FUNCTION0
  6 LOAD_GLOBAL  0 (0)
  8 LOAD_GLOBAL  1 (1)
 10 CALL_FUNCTION1
 12 GET_ITER
 14 CALL_FUNCTION1
 16 RETURN_VALUE
None
3.879290759425
  0 LOAD_CONST   1 (1)
  2 LOAD_CONST   2 (2)
  4 MAKE_FUNCTION0
  6 LOAD_GLOBAL  0 (0)
  8 LOAD_GLOBAL  1 (1)
 10 CALL_FUNCTION1
 12 GET_ITER
 14 CALL_FUNCTION1
 16 RETURN_VALUE
None
3.859126637943

--

___
Python tracker 

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



[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-04 Thread Matthew


Matthew  added the comment:

Hello,

Thanks for all the help people have given me! I've found the solution to my 
problem. The Environment Variable was set below every other, leading to a 
different Python interpreter to being used, which was probably bundled with a 
different software. I moved the Env. Variable up to the top, and the issue was 
fixed.

Thanks again!

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



[issue47222] subprocess.Popen() should allow capturing output and sending it to stdout and stderr

2022-04-04 Thread Philip Prindeville


New submission from Philip Prindeville :

I'd like to see handlers exposes for the stdout and stderr pipe-reading threads 
so that I could customize what's done with the data as it's read.

I might, for instance, want to:

(1) accumulate it into a buffer;
(2) copy it onto sys.stdout or sys.stderr, respectively;
(3) send it to a logging object;

or some combination of the above, possibly all of them.

--
components: Library (Lib)
messages: 416703
nosy: pprindeville
priority: normal
severity: normal
status: open
title: subprocess.Popen() should allow capturing output and sending it to 
stdout and stderr
type: enhancement
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



[issue47221] Bug or bad performance

2022-04-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

I believe this is a duplicate of this issue: https://bugs.python.org/issue45542

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue47221] chained comparisons slower than using `and`

2022-04-04 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
title: Bug or bad performance -> chained comparisons slower than using `and`

___
Python tracker 

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



[issue47221] chained comparisons slower than using `and`

2022-04-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Feel free to comment on that issue if you have any ideas about how to address 
the concerns there.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using multiple comparison operators can cause performance issues

___
Python tracker 

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



[issue45542] Using multiple comparison operators can cause performance issues

2022-04-04 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

https://bugs.python.org/issue47221 was opened as a duplicate of this.

Unless there are any new ideas for getting around the concerns here, I think 
this can be closed.

--
status: open -> pending

___
Python tracker 

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



[issue47006] PEP 646: Decide on substitution behavior

2022-04-04 Thread Matthew Rahtz


Matthew Rahtz  added the comment:

Apologies for the slow reply - coming back to this now that the docs and 
pickling issues are mostly sorted.

[Serhiy]

> > Alias = C[T, *Ts]
> > Alias2 = Alias[*tuple[int, ...]]
> > # Alias2 should be C[int, *tuple[int, ...]]
>
> tuple[int, ...] includes also an empty tuple, and in this case there is no 
> value for T.

This was my initial intuition too, but Pradeep pointed out to me in 
https://github.com/python/cpython/pull/31021#discussion_r815853784 that for 
tuple[int, ...], Python has chosen the opposite mindset: instead of assuming 
the worst-case scenario, we assume the best-case scenario. Thus, the following 
type-checks correctly with mypy 
(https://mypy-play.net/?mypy=latest&python=3.10&gist=b9ca66fb7d172f939951a741388836a6):

def return_first(tup: tuple[int, ...]) -> int:
return tup[0]
tup: tuple[()] = ()
return_first(tup)

> > We actually deliberately chose not to unpack concrete tuple types - see the 
> > description of https://github.com/python/cpython/pull/30398, under the 
> > heading 'Starred tuple types'. (If you see another way around it, though, 
> > let me know.)
> 
> You assumed that *tuple[str, bool] in def foo(*args: *tuple[str, bool]) 
> should give foo.__annotations__['args'] = tuple[str, bool], but it should 
> rather give (str, bool). No confusion with tuple[str, bool].

Fair point, we could *technically* distinguish between tuple[str, bool] and 
(str, bool). But if I was a naive user and I saw `foo.__annotations__['args'] 
== (str, bool)`, I don't think it'd be immediately obvious to me that the type 
of `args` was `*tuple[str, bool]`.

Also though, there's a second reason mentioned in 
https://github.com/python/cpython/pull/30398 why `(str, bool)` wouldn't be the 
best choice. We decided that the runtime behaviour of `*args: *something` 
should be that we essentially do `(*something,)[0]`. If we made `tuple[int, 
str]` unpack to `(int, str)`, then we'd end up with `__annotations__['args'] == 
(int,)`.

> And one of PEP 646 options is to implement star-syntax only in subscription, 
> not in var-parameter type annotations.

As in, we would allow `Generic[*Ts]`, but not `*args: *Ts`? That'd be a *major* 
change to the PEP - not an option I'm willing to consider at this stage in the 
process.

> > I'm also not sure about this one; disallowing unpacked TypeVarTuples in 
> > argument lists to generic aliases completely (if I've understood right?)
>
> No, it will only be disallowed in substitution of a VarType. Tuple[T][*Ts] -- 
> error. Tuple[*Ts][*Ts2] -- ok.

Ah, gotcha. My mistake.

[Guido]

I ran out of time this evening :) Will reply properly soon.

--

___
Python tracker 

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



[issue47097] Document PEP 646

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 38ae5b8c0c0b64ae6100b0dee8707d5ab769e381 by Matthew Rahtz in 
branch 'main':
bpo-47097: Add documentation for TypeVarTuple (#32103)
https://github.com/python/cpython/commit/38ae5b8c0c0b64ae6100b0dee8707d5ab769e381


--

___
Python tracker 

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



[issue47097] Document PEP 646

2022-04-04 Thread Alex Waygood


Change by Alex Waygood :


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



[issue47097] Document PEP 646

2022-04-04 Thread Alex Waygood


Alex Waygood  added the comment:

(Feel free to reopen this issue if there's more to be done, Matthew!)

--

___
Python tracker 

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



[issue46850] [C API] Move _PyEval_EvalFrameDefault() to the internal C API

2022-04-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

per 
https://mail.python.org/archives/list/python-...@python.org/message/GFOMU7LP63JUVFMWNJNZJLUMZDRPTUYJ/
 lets roll some of those PRs back and reshape where we move these APIs as 
despite the PEP they were not as private as other privates.

(deferred blocker meaning: block 3.11beta1 - though Pablo could decide to have 
the rollbacks block 3.11alpha7)

--
nosy: +gregory.p.smith, pablogsal
priority: normal -> deferred blocker

___
Python tracker 

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



[issue47210] './configure --help' causes infinite loop

2022-04-04 Thread Ned Deily


Ned Deily  added the comment:

Python 3.9.6 is no longer supported, 3.9.12 is the most recent 3.9.x release. 
Do you get the same results with 3.9.12? But, for what it's worth, ./configure 
--help of that 3.9.6 tarball works just fine on other current Linux systems I 
have available.

--
nosy: +ned.deily

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Ned Deily


Ned Deily  added the comment:


New changeset 5a7506de7374c10e6eb9ae5a232cc88d4d588450 by Oleg Iarygin in 
branch 'main':
Fix "Contributed ... in bpo-bpo-45847" (GH-32299)
https://github.com/python/cpython/commit/5a7506de7374c10e6eb9ae5a232cc88d4d588450


--
nosy: +ned.deily

___
Python tracker 

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



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-04-04 Thread Ned Deily


Ned Deily  added the comment:

Unfortunately, this is the kind of issue, often the case with tkinter issues, 
where it is difficult to know where the problem might be. While I know little 
about the internals of tkinter and Tk, my intuition is that this is most likely 
a Tk issue and would need to be resolved by the Tk folks. For these kinds of 
problems, it is usually helpful to try to reproduce the problem using Tcl and 
Tk directly; I have no idea how difficult that would be in this case. If 
someone can do so, then it would be much more likely to get the Tk project to 
look into it (by opening an issue with them). Another ofter useful approach is 
to ask on the tkinter mailing list or on StackOverflow where people with both 
tkinter and Tk expertise hang out.

https://mail.python.org/mailman/listinfo/tkinter-discuss

--

___
Python tracker 

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



[issue47222] subprocess.Popen() should allow capturing output and sending it to stdout and stderr

2022-04-04 Thread Ned Deily


Change by Ned Deily :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset a74892cb2168d249d9a8c53fad605a5def9b41d4 by yyyan in branch 
'main':
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
https://github.com/python/cpython/commit/a74892cb2168d249d9a8c53fad605a5def9b41d4


--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30378
pull_request: https://github.com/python/cpython/pull/32317

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread miss-islington


miss-islington  added the comment:


New changeset 3fa800d7a7a405f51e0e8c9b7dac2f2a75c17bb4 by Miss Islington (bot) 
in branch '3.10':
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
https://github.com/python/cpython/commit/3fa800d7a7a405f51e0e8c9b7dac2f2a75c17bb4


--

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread miss-islington


miss-islington  added the comment:


New changeset e47e6ffed36eb1dd82da3bcadf8b45b894ef4ce2 by Miss Islington (bot) 
in branch '3.9':
bpo-41233: Add links to errnos referenced in exceptions docs (GH-21380)
https://github.com/python/cpython/commit/e47e6ffed36eb1dd82da3bcadf8b45b894ef4ce2


--

___
Python tracker 

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



[issue41233] Missing links to errnos on Built-in Exceptions page

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the patch!

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



[issue47007] [doc] str docs are inconsistent with special method lookup

2022-04-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +30379
pull_request: https://github.com/python/cpython/pull/32318

___
Python tracker 

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



[issue47007] [doc] str docs are inconsistent with special method lookup

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset bb86d1d9fbd1888524e04475383f4ea764277f67 by Vanshaj Singhania in 
branch 'main':
bpo-47007: [doc] `str` special method lookup (GH-31863)
https://github.com/python/cpython/commit/bb86d1d9fbd1888524e04475383f4ea764277f67


--
nosy: +JelleZijlstra

___
Python tracker 

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



[issue47007] [doc] str docs are inconsistent with special method lookup

2022-04-04 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30380
pull_request: https://github.com/python/cpython/pull/32319

___
Python tracker 

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



[issue45542] Using multiple comparison operators can cause performance issues

2022-04-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I came here from #47221.

If I am reading this correctly, it concerns me that stack operations (which 
should be fast) are apparently slow?

If we can't reduce the number of stack operations, can we speed them up?

--
nosy: +steven.daprano
status: pending -> open

___
Python tracker 

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



[issue46998] Allow subclassing Any at runtime

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 5a4973e29f2f5c4ee8c086f40325786c62381540 by Shantanu in branch 
'main':
bpo-46998: Allow subclassing Any at runtime (GH-31841)
https://github.com/python/cpython/commit/5a4973e29f2f5c4ee8c086f40325786c62381540


--

___
Python tracker 

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



[issue46998] Allow subclassing Any at runtime

2022-04-04 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the idea and patch!

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



[issue45790] Inaccurate phrasing in extending/newtypes_tutorial

2022-04-04 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +30381
pull_request: https://github.com/python/cpython/pull/32320

___
Python tracker 

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



  1   2   >