[issue44940] Clarify the documentation of re.findall()

2021-08-21 Thread Rondevous


Rondevous  added the comment:

Oops, I was wrong about re.finditer :D
Sorry, I think didn't check that properly.

Just saw the changes. The patch looks good :)

Thanks a lot!

--
title: Suggest the use of non-capturing groups in re.findall() and 
re.finditer() docs -> Clarify the documentation of re.findall()

___
Python tracker 

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



[issue44913] segfault in call to embedded PyModule_New

2021-08-21 Thread hai shi


hai shi  added the comment:

How about this one?

int foo(void)
{
  printf(stderr, "foo BEGIN\n");
  if (!Py_IsInitialized()) {
fprintf(stderr, "python already initialized\n");
return -1;
  }
  const char *module_name = "foo";
  PyGILState_STATE state = PyGILState_Ensure();
  PyObject *module_handle = PyModule_New(module_name);
  if (module_handle == 0)
  {
fprintf(stderr,"PyModule_New(module_data_name=%s) failed\n",
module_name);
exit(1);
  }
  fprintf(stdout, "point is: %p\n", module_handle);
  fprintf(stderr, "foo END\n");
  PyGILState_Release(state);
  return 0;
}

--
nosy: +shihai1991

___
Python tracker 

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



[issue30924] RPM build doc_files needs files separated into separate lines

2021-08-21 Thread hai shi


hai shi  added the comment:

> Should this be closed?
  Copy from PEP-632: In Python 3.10 and 3.11, distutils will be formally marked 
as deprecated. All known issues will be closed at this time.
  I close this bpo. If there have some block issues to discuss, we can reopen 
it again:)

--
nosy: +shihai1991
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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 407b3e0bb028c30fbf5efcf58c70c50eaa6712b0 by Miss Islington (bot) 
in branch '3.9':
bpo-44966: Fix out-of-date traceback message (GH-27867) (GH-27876)
https://github.com/python/cpython/commit/407b3e0bb028c30fbf5efcf58c70c50eaa6712b0


--

___
Python tracker 

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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread miss-islington


miss-islington  added the comment:


New changeset 95a9ba173ecaeec0cb8bf57cfcd916d64fa6f861 by Miss Islington (bot) 
in branch '3.10':
bpo-44966: Fix out-of-date traceback message (GH-27867)
https://github.com/python/cpython/commit/95a9ba173ecaeec0cb8bf57cfcd916d64fa6f861


--

___
Python tracker 

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



[issue43093] Make modules picklable

2021-08-21 Thread Myst


Change by Myst :


--
nosy: +LeMyst

___
Python tracker 

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



[issue42085] Add dedicated slot for sending values

2021-08-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Is there documentation anywhere for the semantics of am_send? I only see the 
signature followed by "See PyIter_Send for details", but the doc for 
PyIter_Send doesn't mention am_send.

In particular, it would be nice to document the relationship between 
PyIter_Send, am_send, and tp_iternext.

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread miss-islington


miss-islington  added the comment:


New changeset d5781e973079a20b2370686d6e080316d6c9f90d by Miss Islington (bot) 
in branch '3.9':
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
https://github.com/python/cpython/commit/d5781e973079a20b2370686d6e080316d6c9f90d


--

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread miss-islington


miss-islington  added the comment:


New changeset 88a1920c7b7b0fb73c4037b460c6a4a8c0aa10f0 by Miss Islington (bot) 
in branch '3.10':
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
https://github.com/python/cpython/commit/88a1920c7b7b0fb73c4037b460c6a4a8c0aa10f0


--

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26333
pull_request: https://github.com/python/cpython/pull/27878

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 585390fdd8661b4bc08bdfc27551292da9b4b9b8 by Serhiy Storchaka in 
branch 'main':
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
https://github.com/python/cpython/commit/585390fdd8661b4bc08bdfc27551292da9b4b9b8


--

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 15a64d89a31b7e91f0361c305b7b27d8761db93d by Raymond Hettinger in 
branch 'main':
bpo-44966: Fix out-of-date traceback message (GH-27867)
https://github.com/python/cpython/commit/15a64d89a31b7e91f0361c305b7b27d8761db93d


--

___
Python tracker 

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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44966] example code does not macth the very version(3.9)

2021-08-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26331
pull_request: https://github.com/python/cpython/pull/27876

___
Python tracker 

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



[issue44965] [sqlite3] early exit for non-DML statements in executemany()

2021-08-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal
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



[issue44965] [sqlite3] early exit for non-DML statements in executemany()

2021-08-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 878e7267016ba25d05d8736349fb897c756f311d by Erlend Egeberg 
Aasland in branch 'main':
bpo-44965: Early exit for non-DML statements in sqlite3.Cursor.executemany() 
(GH-27865)
https://github.com/python/cpython/commit/878e7267016ba25d05d8736349fb897c756f311d


--
nosy: +pablogsal

___
Python tracker 

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



[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am marking this as a release blocker, given that this is probably going to 
trip a lot of users.

--
priority: normal -> release blocker

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


Change by Ryan Mast (nightlark) :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


Change by Ryan Mast (nightlark) :


--
nosy: +steve.dower

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


Change by Ryan Mast (nightlark) :


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

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


Change by Ryan Mast (nightlark) :


--
nosy: +FFY00

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


Ryan Mast (nightlark)  added the comment:

* The main constraint is that the the `workflow_dispatch` trigger must be in 
the GHA workflow yaml files for the branch to be selectable as a target on the 
Actions tab when manually triggering a workflow. Having the change made to the 
main branch and backported would mean that new or rebased branches would have 
the trigger needed for manually running the CI job in forks.

--

___
Python tracker 

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



[issue44970] Re-examine complex pow special case handling

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The OverflowError should only be raised if finite arguments produce infinite 
result. Py_ADJUST_ERANGE2 is used improperly.

But after fixing this error I get (nan+infj) for z**1, the same as for z*1.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-21 Thread Ryan Mast (nightlark)


New submission from Ryan Mast (nightlark) :

Adding a workflow_dispatch trigger for the GitHub Actions jobs makes it 
possible to run the GHA CI jobs for commits to branches in a fork without 
opening a "draft/WIP" PR to one of the main release branches. It also runs the 
SSL tests which normally get skipped for PRs.

The main constraint is that

--
components: Build
messages: 400036
nosy: pablogsal, rmast, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Add workflow_dispatch trigger for GitHub Actions jobs
type: enhancement
versions: Python 3.10, Python 3.11, 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



[issue44964] Semantics of PyCode_Addr2Line() changed

2021-08-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Are you ok if I add a small comment to the what's new of 3.10?

--

___
Python tracker 

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



[issue44971] Named widget has NoneType after single line creation

2021-08-21 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I'm sorry if you don't like the design of the pack() method, but all the 
examples in the documentation show how it behaves. It is behaving as documented 
and designed.

https://docs.python.org/3/library/tkinter.html


The bug here is in your own code. You already know the correct way to write 
this, as you already stated:

label2 = ttk.Label(root, text='Show2 Label')
label2.pack()

Writing it as ttk.Label(root, text='Show2 Label').pack() returns None, as 
designed, which then consequently fails when you try to operate on None.

You say:

"If giving a widget a name, I expect to use it later in the program."

But you don't give the widget a name. What you are doing is the equivalent of 
this:

temp = ttk.Label(root, text='Show2 Label')  # hidden temp object
label = temp.pack()  # Returns None
del temp  # hidden temp object is garbage collected

except that `temp` is never directly accessible by you.

Or if you prefer another analogy:

number = (1 + 2) - 3

and then get surprised that number is zero rather than 3 because "I gave (1+2) 
a name". No, you gave a name to the *whole expression*, which evaluates to 0, 
not 3. And in the Label case, the *whole expression* evaluates to None.

Also, the code doesn't crash. It raises an exception, which is the expected 
behaviour for trying to access non-existent attributes.

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue44964] Semantics of PyCode_Addr2Line() changed

2021-08-21 Thread Mark Shannon


Mark Shannon  added the comment:

It is not `PyCode_Addr2Line()` that has changed, but `frame->f_lasti`.

If you call 
`PyCode_Addr2Line(frame->f_code, 8)` in 3.9

you get the same behavior as calling 

`PyCode_Addr2Line(frame->f_code, 8)` in 3.10.

Assuming the bytecode is unchanged.

The difference is that for the nth instruction `frame->f_lasti` is n*2 for 3.9 
and n for 3.10.

People should be using `PyFrame_GetLineNumber()`, which is part of the API.

--

___
Python tracker 

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



[issue44971] Named widget has NoneType after single line creation

2021-08-21 Thread Russell Crosser


New submission from Russell Crosser :

Declaring a widget in the following form:
...
label2 = ttk.Label(root, text='Show2 Label').pack()
...
leaves the widget with a NoneType, and unable to be assigned to (for instance 
to assign new text). If giving a widget a name, I expect to use it later in the 
program.
This declaration works correctly:
...
label2 = ttk.Label(root, text='Show2 Label')
label2.pack()
...
Simple tkinter program attached. Only tested with 3.9.6 on Win 10.

--
components: Tkinter
files: test_pack.py
messages: 400032
nosy: rcrosser
priority: normal
severity: normal
status: open
title: Named widget has NoneType after single line creation
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50228/test_pack.py

___
Python tracker 

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



[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Deprecation warnings are not on by default in tests. You can pass -Wall while 
running tests to turn on all warnings.

./python -Wall -m test test_capi
0:00:00 load avg: 2.46 Run tests sequentially
0:00:00 load avg: 2.46 [1/1] test_capi
/home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: 
DeprecationWarning: It is deprecated to return a value!=None from a test case 
()
  warnings.warn(f'It is deprecated to return a value!=None from a '

== Tests result: SUCCESS ==

1 test OK.

Total duration: 5.2 sec
Tests result: SUCCESS

--

___
Python tracker 

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



[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

I should just add that none of the these tests are actually a problem, i.e. 
they all do run properly and not running duplicate times (except that I'm not 
sure about the 2 distutils tests, but that shouldn't matter much as distutils 
is deprecated and up for removal).

--

___
Python tracker 

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



[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

Karthikeyan: I was looking into them yesterday, and:

 - distutils ones can probably be left as is because distutils are set for 
removal in 3.12

 - test_constructor should be fixed, I can do that today.

 - test_null_strings in test_capi I'm not sure, I think it can also be fixed 
here:
https://github.com/python/cpython/blob/main/Modules/_testcapimodule.c#L2388

   .. by replacing return line with Py_RETURN_NONE;

  but I haven't worked with C tests before and it looks like some other C api 
tests also return non-null and not None values, but they didn't trigger the 
deprecation when running a test PR I made yesterday here:

https://github.com/python/cpython/pull/27869/checks?check_run_id=3387700689

--

___
Python tracker 

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



[issue38291] Deprecate the typing.io and typing.re pseudo-modules

2021-08-21 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +26327
pull_request: https://github.com/python/cpython/pull/27872

___
Python tracker 

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



[issue41322] unittest: deprecate test methods returning non-None values

2021-08-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

There are few deprecation warnings in other tests : 

0:00:05 load avg: 3.20 [ 52/428] test_code passed
/home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: 
DeprecationWarning: It is deprecated to return a value!=None from a test case 
(>)
  warnings.warn(f'It is deprecated to return a value!=None from a '

0:00:12 load avg: 3.74 [110/428] test_capi passed
/home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: 
DeprecationWarning: It is deprecated to return a value!=None from a test case 
()
  warnings.warn(f'It is deprecated to return a value!=None from a '

0:00:13 load avg: 3.74 [114/428] test_distutils passed
/home/karthikeyan/stuff/python/cpython/Lib/distutils/tests/test_unixccompiler.py:7:
 DeprecationWarning: The distutils.sysconfig module is deprecated, use 
sysconfig instead
  from distutils import sysconfig
/home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: 
DeprecationWarning: It is deprecated to return a value!=None from a test case 
(>)
  warnings.warn(f'It is deprecated to return a value!=None from a '
/home/karthikeyan/stuff/python/cpython/Lib/unittest/case.py:550: 
DeprecationWarning: It is deprecated to return a value!=None from a test case 
(>)
  warnings.warn(f'It is deprecated to return a value!=None from a '

--

___
Python tracker 

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



[issue44970] Re-examine complex pow special case handling

2021-08-21 Thread Mark Dickinson


Mark Dickinson  added the comment:

Aargh. Brain fail. There *is* no `cmath.pow`, of course; this issue applies 
only to `**` and the built-in `pow`.

--

___
Python tracker 

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



[issue44970] Re-examine complex pow special case handling

2021-08-21 Thread Mark Dickinson


Mark Dickinson  added the comment:

Here's just one example that doesn't make a whole lot of sense: in this case, z 
** 1 should be returning z.

>>> z = complex(3, float("inf"))
>>> z ** 1
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: complex exponentiation

--

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

2021-08-21 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests: +26326
pull_request: https://github.com/python/cpython/pull/3640

___
Python tracker 

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



[issue44970] Re-examine complex pow special case handling

2021-08-21 Thread Mark Dickinson


New submission from Mark Dickinson :

Complex power, both via `**` and the built-in `pow`, and via `cmath.pow`, is 
currently a bit of a mess when it comes to special-case handling - particularly 
handling of signed zeros, infinities, NaNs, and overflow.

At some point it would be nice to rationalise and document the special-case 
handling, as far as possible, and to make the behaviour of `**` and `pow` 
consistent with that of `cmath.pow`. Note that while for all the other cmath 
functions we have good guidance from the C standards on how special cases 
should be handled, for pow we're on our own - the C standard refuses to specify 
anything at all about special case handling.

Note also that there are a *lot* of special cases to consider. We have four 
real input parameters (the real and imaginary parts of each of the base and the 
exponent), each of which can be one of the 7 cases nan, -inf, -finite, -0.0, 
0.0, finite, inf, for a total of 7**4 = 2401 combinations; moreover, for some 
cases we might need to distinguish integral from non-integral values, and even 
integers from odd integers.

This is low priority - in many years of mathematical, scientific and numeric 
work, I've seen little evidence that anyone actually cares about or uses 
general complex power. Most users are interested in one or more subcases, like:

- positive real base and complex exponent
- complex base and integral exponent
- complex nth root for positive integers n, especially for small n (square 
root, cube root, ...)

So a possibly more manageable and more useful subtask would be to ensure that 
special cases are handled in a sensible manner for these subcases.

--
messages: 400025
nosy: mark.dickinson
priority: low
severity: normal
status: open
title: Re-examine complex pow special case handling
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



[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-21 Thread Thomas Grainger


Change by Thomas Grainger :


--
nosy: +pablogsal

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 5bd27c3be5734e158f67ff86087a977a25d89161 by Miss Islington (bot) 
in branch '3.10':
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) (GH-27871)
https://github.com/python/cpython/commit/5bd27c3be5734e158f67ff86087a977a25d89161


--

___
Python tracker 

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



[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue12558 which exposes the other side of the same issue.

Las time I looked at it, it was inherently a Tcl issue. In some places it uses 
locale-dependent formatting of floating point numbers, but locale-unaware 
parsing, or vice versa.

--

___
Python tracker 

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



[issue44969] Subclassing of annotated types does not always work

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think that __mro_entries__() for annotated types should return the result of 
__mro_entries__() for the original type if it has __mro_entries__. But details 
can be complicated, especially if user-defined generic types are involved.

Alternatively, __build_class__ can call __mro_entries__() repeatedly for the 
result of __mro_entries__(). I do not know what is better.

--

___
Python tracker 

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



[issue44969] Subclassing of annotated types does not always work

2021-08-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It works only with simple types

>>> class X(Annotated[list, 'annotation']): pass
... 

But not with type aliases

>>> class X(Annotated[List[int], 'annotation']): pass
... 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: _GenericAlias.__init__() takes 3 positional arguments but 4 were 
given
>>> class X(Annotated[list[int], 'annotation']): pass
... 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: GenericAlias expected 2 arguments, got 3

And even if the original type is not subclassable, the error message is not 
always clear:

>>> class X(Annotated[Union[int, str], 'annotation']): pass
... 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: _GenericAlias.__init__() takes 3 positional arguments but 4 were 
given
>>> class X(Annotated[int | str, 'annotation']): pass
... 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: _GenericAlias.__init__() takes 3 positional arguments but 4 were 
given

--
components: Library (Lib)
messages: 400021
nosy: gvanrossum, kj, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Subclassing of annotated types does not always work
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



[issue44524] __name__ attribute in typing module

2021-08-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26325
pull_request: https://github.com/python/cpython/pull/27871

___
Python tracker 

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



[issue44524] __name__ attribute in typing module

2021-08-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 4ceec495598e78f0776dd46d511dcc612a434dc3 by Serhiy Storchaka in 
branch 'main':
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861)
https://github.com/python/cpython/commit/4ceec495598e78f0776dd46d511dcc612a434dc3


--

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +asyncio
type:  -> behavior
versions:  -Python 3.8

___
Python tracker 

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



[issue44968] Fix/remove test_subprocess_wait_no_same_group from test_asyncio tests

2021-08-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 7.0 -> 8.0
pull_requests: +26324
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/27870

___
Python tracker 

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