[issue46411] modernize exception handling in tests

2022-01-17 Thread miss-islington


miss-islington  added the comment:


New changeset 42038d00ea7b0b5455e371285102d85006fbf687 by Miss Islington (bot) 
in branch '3.10':
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
https://github.com/python/cpython/commit/42038d00ea7b0b5455e371285102d85006fbf687


--

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread miss-islington


miss-islington  added the comment:


New changeset 1d6530dd0564a6bb75989b9fca25a649b5ddc1b0 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638) 
(GH-30658)
https://github.com/python/cpython/commit/1d6530dd0564a6bb75989b9fca25a649b5ddc1b0


--

___
Python tracker 

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



[issue46005] [doc] replace 'distutils' examples with 'setuptools'

2022-01-17 Thread Tal Einat


Tal Einat  added the comment:

First, I think that it's good and useful to have full, well-maintained examples 
of how to build extension modules in the docs.

Second, until distutils is removed, I think we should keep the documentation 
for how to use it. Due to this, I don't think adding the "setuptools 
disclaimer" would be appropriate, since we shouldn't remove the section once 
the setuptools docs are updated.

It seems to me that we should:

1. Add a prominent note about distutils being deprecated and what that means: 
can one still use it, should one still use it, when is it planned to be 
removed, etc.

2. Add mention that 3rd-party tools are now the recommended way to build 
extensions. Include links to the sections in these libraries' docs explaining 
how to build extensions.

--
nosy: +taleinat

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset a287b31bcb065e4122400cb59167340d25480e6d by Irit Katriel in 
branch 'main':
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
https://github.com/python/cpython/commit/a287b31bcb065e4122400cb59167340d25480e6d


--

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28859
pull_request: https://github.com/python/cpython/pull/30658

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +28858
pull_request: https://github.com/python/cpython/pull/30657

___
Python tracker 

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



[issue42161] Remove private _PyLong_Zero and _PyLong_One variables

2022-01-17 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +28857
pull_request: https://github.com/python/cpython/pull/30656

___
Python tracker 

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



[issue46159] Segfault when using trace functions in 3.11a3

2022-01-17 Thread Quentin Pradet


Quentin Pradet  added the comment:

Thanks, you're right, I ran `git bisect` on Linux and the commit that causes 
the issue is 
https://github.com/python/cpython/commit/135cabd328504e1648d17242b42b675cdbd0193b
 ("Copy free variables in bytecode to allow calls to inner functions to be 
specialized") from https://bugs.python.org/issue44525

--

___
Python tracker 

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



[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-17 Thread Hynek Schlawack


Hynek Schlawack  added the comment:

>>> @attrs.define
... class C(Base):
...   a: int
...   b: int
...
>>> C.__slots__
('b', '__weakref__')

We've got a test specifically for this use case: 
https://github.com/python-attrs/attrs/blob/5f36ba9b89d4d196f80147d4f2961fb2f97ae2e5/tests/test_slots.py#L309-L334

--

___
Python tracker 

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



[issue45452] Support crash tolerance feature for gdbm module

2022-01-17 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The gdbm module's purpose is effectively one of just exposing the underlying C 
library APIs to Python as you said.  

Consider this a +1 in favor of exposing the new APIs in the Python gdbm module.

I'm not concerned about anyone wanting these in older Python versions. It 
really requires a combination of modern software in order to use.  Running on a 
recent kernel version, using a non-default fancy filesystem, and linking 
against a recent gdbm library.  So being a new feature in 3.11 makes sense.  
Anyone satisfying all of the above is highly likely to already also use a 
recent CPython.

If anyone _really_ wants it for older things, they can maintain backport on 
PyPI.

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



[issue45959] Teach pprint about dict views

2022-01-17 Thread Éric Araujo

Éric Araujo  added the comment:

The PR looks good!  When the last comments are resolved, unless there is 
activity from other core devs, I will merge it.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2022-01-17 Thread John Belmonte


John Belmonte  added the comment:

Mark, would you give it a review this month?  (PR has been marked stale.)

--

___
Python tracker 

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



[issue46421] unittest ValueError when invoking as module

2022-01-17 Thread Bader Zaidan


Change by Bader Zaidan :


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

___
Python tracker 

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



[issue44934] Windows installer: Append Python to PATH instead of prepending it

2022-01-17 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the PR! This is a good contribution, that wasn't trivial to do. It 
should be in Python 3.11 alpha 5, so please test it out and make sure it's 
behaving as you expect.

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



[issue44934] Windows installer: Append Python to PATH instead of prepending it

2022-01-17 Thread Steve Dower


Steve Dower  added the comment:


New changeset c47c9e6589eb7a272cfe4d352eb87389eb20ec2f by bneuburg in branch 
'main':
bpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)
https://github.com/python/cpython/commit/c47c9e6589eb7a272cfe4d352eb87389eb20ec2f


--

___
Python tracker 

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



[issue43430] Exception raised when attempting to create Enum via functional API

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:

Thanks for the reminder.

--
resolution:  -> not a bug
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue46421] unittest ValueError when invoking as module

2022-01-17 Thread Bader Zaidan


Bader Zaidan  added the comment:

For reference, this is the error request:
```
python3 -m unittest ./tests/*.py
Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
  File "/usr/lib64/python3.10/unittest/__main__.py", line 18, in 
main(module=None)
  File "/usr/lib64/python3.10/unittest/main.py", line 100, in __init__
self.parseArgs(argv)
  File "/usr/lib64/python3.10/unittest/main.py", line 147, in parseArgs
self.createTests()
  File "/usr/lib64/python3.10/unittest/main.py", line 158, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames,
  File "/usr/lib64/python3.10/unittest/loader.py", line 220, in 
loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib64/python3.10/unittest/loader.py", line 220, in 
suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in 
loadTestsFromName
module = __import__(module_name)
ValueError: Empty module name
```

The issue stems with having "." as its own value in the parts list of 
`unittest/loader.py`.

https://github.com/python/cpython/blob/main/Lib/unittest/loader.py#L125

--

___
Python tracker 

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



[issue46421] unittest ValueError when invoking as module

2022-01-17 Thread Bader Zaidan


New submission from Bader Zaidan :

When running a local unittest as a module (for example, `python -m unittest 
./tests/*.py`), the command fails with a ValueError. However, if we remove the 
local directory definition, and call it as `python -m unittest tests/*.py`, it 
runs without issue.

A GitHub pull request with a pull request will be sent promptly.

--
components: Library (Lib)
messages: 410833
nosy: BaderSZ
priority: normal
severity: normal
status: open
title: unittest ValueError when invoking as module
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



[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

I'm not getting this error on 3.11 on a Mac. Can you check on versions <= 3.9? 
Earlier versions are no longer getting bugfixes.

--
nosy: +iritkatriel
status: open -> pending
type: crash -> behavior

___
Python tracker 

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



[issue28384] [doc] hmac cannot be used with shake algorithms

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
title: hmac cannot be used with shake algorithms -> [doc] hmac cannot be used 
with shake algorithms
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue46407] optimizing `1 << n` or `2 ** n` and modulo-only operations

2022-01-17 Thread theeshallnotknowethme


Change by theeshallnotknowethme :


--
pull_requests: +28854
pull_request: https://github.com/python/cpython/pull/30653

___
Python tracker 

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



[issue38472] GCC detection in setup.py is broken

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

Alex, is this still an issue with current python versions (>= 3.9)? And can you 
followup on Victor's questions?

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

___
Python tracker 

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



[issue30492] 'make clinic' does not work for out of tree builds / clinic.py is not in the devguide

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

I'm closing because the original issue was fixed and testing out of tree build 
issue is the subject of Issue45695.

--
nosy: +iritkatriel
resolution:  -> fixed
stage: needs patch -> 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



[issue30819] Linking with 'ld -b' fails with 64-bit using Itanium HP compiler

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

Robert's PR was merged so I'm assuming this is fixed. Reopen or create a new 
issue if not.

--
nosy: +iritkatriel
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34027] openpty/forkpty build failure using nix package manager macOS environment

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
title: python 3.7 openpty/forkpty build failure using nix package manager macOS 
environment -> openpty/forkpty build failure using nix package manager macOS 
environment
versions:  -Python 3.7, Python 3.8

___
Python tracker 

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



[issue43430] Exception raised when attempting to create Enum via functional API

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

Is there a bug/documentation change to make here or can this be closed?

--
nosy: +iritkatriel
status: open -> pending
type: crash -> behavior
versions: +Python 3.10 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue42763] Exposing a race in the "_warnings" resulting Python parser crash

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue42712] Segmentation fault in running ast.literal_eval() with large expression size.

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Eval with too high string multiplication crashes newer Python 
versions

___
Python tracker 

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



[issue39602] importlib: lazy loading can result in reimporting a submodule

2022-01-17 Thread Brett Cannon


Change by Brett Cannon :


--
priority: normal -> low

___
Python tracker 

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



[issue45913] readline + GTK + Pytest Seg Fault with Python 3.7 and 3.10 on CI

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

There are a number of third party components involved in your bug. If you can't 
narrow it down to something that plausibly looks like a cpython bug, it's 
unlikely that a core dev will investigate it.

--
nosy: +iritkatriel
resolution:  -> third party
status: open -> pending

___
Python tracker 

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



[issue46115] Interrupting subprocess.popen in recursive calls by KeyboardInterrupt causes Fatal Python error.

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue46392] MessageIDHeader is too strict for message-id

2022-01-17 Thread R. David Murray


R. David Murray  added the comment:

Note that the parser does attempt to accept obsolete syntax (registering 
defects for it), so if there is a bug in the implementation of the obsolete 
syntax handling it should be fixed.  And yes, there have been other bugs with 
whitespace handling in the parser, unfortunately.

Examples would be most helpful, even if you don't write unit tests.  Most of 
the tests, by the way, are in test__header_value_parser (search for 
message_id).  There aren't very many, so more would be good.

--

___
Python tracker 

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



[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-17 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +hynek

___
Python tracker 

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



[issue46420] Use NOTRACE_DISPATCH in specialized opcodes

2022-01-17 Thread Dennis Sweeney


Change by Dennis Sweeney :


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

___
Python tracker 

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



[issue46420] Use NOTRACE_DISPATCH in specialized opcodes

2022-01-17 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
components: Interpreter Core
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Use NOTRACE_DISPATCH in specialized opcodes
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue46418] Simplify `MODULE` variable in `test_enum.py`

2022-01-17 Thread Nikita Sobolev


Change by Nikita Sobolev :


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



[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread David Lord


David Lord  added the comment:

Meant to say that "done" shows up on the same line, not the shell prompt. An 
earlier version of my example was in the REPL, where its prompt *does* show up 
on the same line.

--

___
Python tracker 

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



[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
resolution: works for me -> 
versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 
3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
status: closed -> open

___
Python tracker 

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



[issue24711] Document getpass.getpass behavior on ^C

2022-01-17 Thread David Lord


David Lord  added the comment:

I can reproduce this on Python 3.10. 
Actually, `input` and `getpass` both seem to have this behavior now. Please 
reopen it.

```python
import getpass

try:
getpass.getpass("in: ")
except:
pass

print("done")
```

```
$ python example.py
getpass: ^D done
$
```

Run this and press `Ctrl+D` or `Ctrl+C`. The shell prompt appears on the same 
line rather than the next line.

--
nosy: +davidism

___
Python tracker 

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



[issue46419] Incomplete Comparison to C++ Methods

2022-01-17 Thread Jorgen Harmse


New submission from Jorgen Harmse :

The description of classes mentions twice that methods are like C++ virtual 
member functions, but the truth is a bit stranger.

Even __init__ seems to act like a virtual function, so there is no guarantee 
that the base-class part of a derived-class instance is properly constructed.

Even if the base class __init__ is called, it may behave erratically. The 
object is already considered to belong to the derived class, so any method 
calls will resolve to the derived class. In C++, the run-time type inside any 
constructor or destructor always matches the compile-time type. Derived-class 
members are not called because those methods would attempt to use parts of the 
object that haven't been constructed yet or have already been destructed. 
Python takes no such precautions, and programmers should be warned accordingly. 
(I think the solution is to be very careful of calling any other method from 
__init__.)

--
assignee: docs@python
components: Documentation
messages: 410823
nosy: docs@python, jharmse
priority: normal
severity: normal
status: open
title: Incomplete Comparison to C++ Methods
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



[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-17 Thread Guido van Rossum


Guido van Rossum  added the comment:

Probably.

On Mon, Jan 17, 2022 at 02:14 Alex Waygood  wrote:

>
> Alex Waygood  added the comment:
>
> Do these changes warrant an entry in "What's New in 3.11"?
>
> --
>
> ___
> Python tracker 
> 
> ___
>
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue46418] Simplify `MODULE` variable in `test_enum.py`

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 596cf51a4d40f1ac3090cbccb83ad0663d739ae2 by Nikita Sobolev in 
branch 'main':
bpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647)
https://github.com/python/cpython/commit/596cf51a4d40f1ac3090cbccb83ad0663d739ae2


--

___
Python tracker 

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



[issue46382] dataclass(slots=True) does not account for slots in base classes

2022-01-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

It would also be interesting to see what attrs does in this case.

--

___
Python tracker 

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



[issue12067] Doc: remove errors about mixed-type comparisons.

2022-01-17 Thread Humbled Drugman


Change by Humbled Drugman :


--
pull_requests: +28852
pull_request: https://github.com/python/cpython/pull/30651

___
Python tracker 

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



[issue46317] Pathlib.rename isn't robust

2022-01-17 Thread Oz Tiram


Change by Oz Tiram :


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

___
Python tracker 

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



[issue33601] [doc] Py_UTF8Mode is not documented

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: [EASY DOC] Py_UTF8Mode is not documented -> [doc] Py_UTF8Mode is not 
documented
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue46412] PyQT6 projects crashes with python 3.10

2022-01-17 Thread Fernando Pérez Gómez

Fernando Pérez Gómez  added the comment:

I have to perform several tests to provide a detailed report, check other
third party libraries, mysql connector for example, and send it to you.
There are several things that don't work with Qt libs (the one that works
best is PyQt6). When I finish the tests and have the report, I'll send it
to you. In the meantime I suggest you search for pyqt6 + python3.10 on the
web. There are plenty of complaints on all platforms (Windows, Mac and
Linux). My system is Manjaro Linux , kernel version 5.15-2 , the PyQt6
version installed is 6.22.3 . So far I have verified that it is not the
fault of the IDE and that it does not install the plugins via pip . Of
course I will report the same to River Bank Computing. Sorry I can't be
more specific at the moment, because python has been updated on my system
recently.
Thanks for your patience , I 'll send you a full report in a couple of days
. that takes work

El lun, 17 ene 2022 a las 16:02, Ronald Oussoren ()
escribió:

>
> Ronald Oussoren  added the comment:
>
> This is most likely a problem with PyQt6. Please ask that project first
> (with a clearer description of what goes wrong and on which platforms).
>
> --
> nosy: +ronaldoussoren
> resolution:  -> third party
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34165] uu.decode() raises binascii.Error instead of uu.Error on invalid data

2022-01-17 Thread Pulak Malhotra


Change by Pulak Malhotra :


--
keywords: +patch
nosy: +PulakIIIT
nosy_count: 1.0 -> 2.0
pull_requests: +28850
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30648

___
Python tracker 

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



[issue46418] Simplify `MODULE` variable in `test_enum.py`

2022-01-17 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46418] Simplify `MODULE` variable in `test_enum.py`

2022-01-17 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Right now `MODULE` in Lib/test/test_enum.py is defined as:

```python
MODULE = ('test.test_enum', '__main__')[__name__=='__main__'] 
```

I dived into history and did not find any reasoning why it should not be just 
`__name__`. (But, I might had missed it: the first usage of it is dated back to 
2016)

This came up in https://github.com/python/cpython/pull/30641

So, I think it is a good idea to simplify it like this:

```python
MODULE = __name__
```

Probably, this won't cause any more confusion in the future :)

I am not going to change all `MODULE` usages to `__name__` to keep the diff as 
minimal as possible.

--
components: Tests
messages: 410818
nosy: ethan.furman, sobolevn
priority: normal
severity: normal
status: open
title: Simplify `MODULE` variable in `test_enum.py`
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



[issue46159] Segfault when using trace functions in 3.11a3

2022-01-17 Thread Paul Kehrer


Paul Kehrer  added the comment:

Changes in ABI don't seem to be the likely culprit since the Dockerfile 
provided can demonstrate this bug and has no caching that would result in 
obtaining alpha2-based binaries.

--

___
Python tracker 

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



[issue31603] Please add argument to override stdin/out/err in the input builtin

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

See also Issue1927.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue1927] Change input() to always prompt to stderr

2022-01-17 Thread Irit Katriel


Irit Katriel  added the comment:

See also Issue31603.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue46414] Add typing.reveal_type

2022-01-17 Thread Sebastian Rittau


Change by Sebastian Rittau :


--
nosy: +srittau

___
Python tracker 

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



[issue46405] Warning compiling main on Windows

2022-01-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you Kumar for the quick fix.  Just got a clean compile.

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



[issue46414] Add typing.reveal_type

2022-01-17 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


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

___
Python tracker 

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



[issue46161] `class A(1, 2, 3, **d): pass` gives bad bytecode

2022-01-17 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset c118c2455c95baea08045dc64963600b7a56b6fd by zq1997 in branch 
'main':
bpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235)
https://github.com/python/cpython/commit/c118c2455c95baea08045dc64963600b7a56b6fd


--

___
Python tracker 

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



[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-17 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

> `sys.float_info.n_unnamed_fields` causes a memory violation if the 
> per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed.
> If it is not freed, then `sys.float_info.n_unnamed_fields is 0` is False, 
> meaning that there are two zeros present.

Python 3.9 and 3.10 are concerned by this issue: integer singletons are 
per-interpreter since Python 3.9.

Should Python 3.9 and 3.10 be fixed? "x is 0" is recommended and should be 
used. For example, the compiler emits a SyntaxWarning:

$ python3.9
>>> x=0
>>> x is 0
:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True

I propose to only fix the main branch and so close the issue.

--

___
Python tracker 

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



[issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse.

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

Mark:
> `sys.float_info.n_unnamed_fields` causes a memory violation if the 
> per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed.

I created bpo-46417 follow-up issue: "[subinterpreters] Clear static types in 
Py_Finalize()".

--

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-46417 "[subinterpreters] Clear static types in Py_Finalize()".

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

> I wrote PR 20763 to "finalize" static types in Py_Finalize(). It mostly 
> works, but "./Programs/_testembed test_forced_io_encoding" crash. (...)

I created bpo-46417 follow-up issue: "[subinterpreters] Clear static types in 
Py_Finalize()".

--

___
Python tracker 

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



[issue46417] [subinterpreters] Clear static types in Py_Finalize()

2022-01-17 Thread STINNER Victor


New submission from STINNER Victor :

Converting static types to heap types is a work-in-progress:

* bpo-40077: "Convert static types to heap types: use PyType_FromSpec()"
* At December 29, 2020, 43% (89/206) of types are declared as heap types on a 
total of 206 types. For comparison, in Python 3.8, only 9% (15/172) of types 
were declared as heap types: 74 types have been converted in the meanwhile.
* https://vstinner.github.io/isolate-subinterpreters.html

Static types are still causing issues with Py_Initialize() / Py_Finalize() is 
called multiple times in the same process, which is a supported use case for 
embedded Python. See bpo-45691 "Partial moving of core objects to interpreter 
state is incorrect at best, unsafe at worse" for a recent example with 
sys.float_info where sys.float_info.n_unnamed_fields holds a reference to a 
Python object.

In june 2020, I wrote GH-20763 to clear static types at exit. But I abandoned 
my attempt because of bugs. Copy of my 
https://bugs.python.org/issue1635741#msg371119 message:

"""
I wrote PR 20763 to "finalize" static types in Py_Finalize(). It mostly works, 
but "./Programs/_testembed test_forced_io_encoding" crash. This program calls 
Py_Initialize() and Py_Finalize() multiple times in a loop.

It doesn't look to be safe to clear static types. Many functions rely on the 
fact that static types are "always there" and are never finalized. Also, only a 
few static types are cleared by my PR: many static types are left unchanged. 
For example, static types of the _io module.

It seems like a safer approach is to continue the work on bpo-40077: "Convert 
static types to PyType_FromSpec()".
"""

I propose a "best effort" approach: only clear a static type if it is no longer 
used. For example, check its reference count and its __subclasses__() method.

--
components: Subinterpreters
messages: 410808
nosy: vstinner
priority: normal
severity: normal
status: open
title: [subinterpreters] Clear static types in Py_Finalize()
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



[issue45535] Enum's dir() does not contain inherited members

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:

Fixed in 3.11.

Pure enums have a few more dir() entries now; mixed enums now show all 
inherited methods/attributes -- members still do not show up in member dirs 
(this is a good thing).

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> Enum: modify __repr__, __str__; update docs

___
Python tracker 

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



[issue46108] Enum repr() incorrect when mixed with non-__new__ data types

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:

Fixed in 3.11.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> Enum: modify __repr__, __str__; update docs
type:  -> behavior

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Change by Ethan Furman :


--
priority: release blocker -> normal
resolution:  -> fixed
stage: patch review -> resolved

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 62a6594e66ca955073be2f4e5a40291a39252ef3 by Ethan Furman in 
branch 'main':
bpo-40066: [Enum] fix tests (GH-30643)
https://github.com/python/cpython/commit/62a6594e66ca955073be2f4e5a40291a39252ef3


--

___
Python tracker 

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



[issue25710] zipimport is not PEP 3147 or PEP 488 compliant

2022-01-17 Thread László Kiss Kollár

Change by László Kiss Kollár :


--
nosy: +lkollar

___
Python tracker 

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



[issue46414] Add typing.reveal_type

2022-01-17 Thread Marc Mueller


Change by Marc Mueller :


--
nosy: +cdce8p

___
Python tracker 

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



[issue46405] Warning compiling main on Windows

2022-01-17 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset a4bc2218d270c4c7a898c8b3967c8c271afe9abe by Kumar Aditya in 
branch 'main':
bpo-46405: fix msvc compiler warnings (GH-30627)
https://github.com/python/cpython/commit/a4bc2218d270c4c7a898c8b3967c8c271afe9abe


--

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

I created https://github.com/python/core-workflow/issues/424 "Should we make 
the Docs CI mandatory on the Python main branch?".

--

___
Python tracker 

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



[issue46414] Add typing.reveal_type

2022-01-17 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
nosy: +sobolevn

___
Python tracker 

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



[issue46415] ipaddress.ip_{address, network, interface} raises TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier


Change by Thomas Cellerier :


--
title: ipaddress.ip_{address,network,interface} raise TypeError instead of 
ValueError if given a tuple as address -> 
ipaddress.ip_{address,network,interface} raises TypeError instead of ValueError 
if given a tuple as address

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Change by Ethan Furman :


--
pull_requests: +28846
pull_request: https://github.com/python/cpython/pull/30643

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:

vstinner wrote:
--
>>self.assertEqual(repr(type), '')

> For this one, I suggest to replace the value with "..." doctest pattern.

That bit of code is from the unittest suite, not the doctest suite.

I went with:  

self.assertEqual(repr(type), '' % type.value)

--

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

>self.assertEqual(repr(type), '')

For this one, I suggest to replace the value with "..." doctest pattern.

--

___
Python tracker 

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



[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-17 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46415] ipaddress.ip_{address, network, interface} raise TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier


Change by Thomas Cellerier :


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

___
Python tracker 

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



[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-17 Thread Nikita Sobolev

New submission from Nikita Sobolev :

Here's the problem:

```
» ./python.exe Lib/test/test_typing.py
s.F.
==
FAIL: test_special_attrs2 (__main__.SpecialAttrsTests)
--
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_typing.py", line 5068, in 
test_special_attrs2
self.assertEqual(
^
AssertionError: '__main__' != 'test.test_typing'
- __main__
+ test.test_typing
```

I think it is a good idea to use the same hack we have in `test_enum.py`: 
https://github.com/python/cpython/blob/83d544b9292870eb44f6fca37df0aa351c4ef83a/Lib/test/test_enum.py#L34

```python
MODULE = ('test.test_typing', '__main__')[__name__=='__main__']
```

PR is on its way :)

--
components: Tests
messages: 410800
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Direct invocation of `Lib/test/test_typing.py` fails
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



[issue46381] Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

Do you want to propose a PR?

--
nosy: +vstinner

___
Python tracker 

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



[issue46415] ipaddress.ip_{address, network, interface} raise TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier


New submission from Thomas Cellerier :

`IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of (address 
description, netmask) as the address parameter.
When the tuple-based address is used errors are not propagated correctly 
through the `ipaddress.ip_*` helper because of the %-formatting now expecting 
several arguments:

In [7]: ipaddress.ip_network(("192.168.100.0", "fooo"))

---
TypeError Traceback (most recent call 
last)
 in 
> 1 ipaddress.ip_network(("192.168.100.0", "fooo"))

/usr/lib/python3.8/ipaddress.py in ip_network(address, strict)
 81 pass
 82
---> 83 raise ValueError('%r does not appear to be an IPv4 or IPv6 
network' %
 84  address)
 85

TypeError: not all arguments converted during string formatting

Compared to:

In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo"))

---
NetmaskValueError Traceback (most recent call 
last)
 in 
> 1 ipaddress.IPv4Network(("192.168.100.0", "foo"))

/usr/lib/python3.8/ipaddress.py in __init__(self, address, strict)
   1453
   1454 self.network_address = IPv4Address(addr)
-> 1455 self.netmask, self._prefixlen = self._make_netmask(mask)
   1456 packed = int(self.network_address)
   1457 if packed & int(self.netmask) != packed:

/usr/lib/python3.8/ipaddress.py in _make_netmask(cls, arg)
   1118 # Check for a netmask or hostmask in 
dotted-quad form.
   1119 # This may raise NetmaskValueError.
-> 1120 prefixlen = cls._prefix_from_ip_string(arg)
   1121 netmask = 
IPv4Address(cls._ip_int_from_prefix(prefixlen))
   1122 cls._netmask_cache[arg] = netmask, prefixlen

/usr/lib/python3.8/ipaddress.py in _prefix_from_ip_string(cls, ip_str)
516 ip_int = cls._ip_int_from_string(ip_str)
517 except AddressValueError:
--> 518 cls._report_invalid_netmask(ip_str)
519
520 # Try matching a netmask (this would be /1*0*/ as a 
bitwise regexp).

/usr/lib/python3.8/ipaddress.py in _report_invalid_netmask(cls, 
netmask_str)
472 def _report_invalid_netmask(cls, netmask_str):
473 msg = '%r is not a valid netmask' % netmask_str
--> 474 raise NetmaskValueError(msg) from None
475
476 @classmethod

NetmaskValueError: 'foo' is not a valid netmask

--
components: Library (Lib)
messages: 410798
nosy: thomascellerier
priority: normal
severity: normal
status: open
title: ipaddress.ip_{address,network,interface} raise TypeError instead of 
ValueError if given a tuple as address
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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 83d544b9292870eb44f6fca37df0aa351c4ef83a by Kumar Aditya in 
branch 'main':
bpo-40066: [Enum] skip failing doc test (GH-30637)
https://github.com/python/cpython/commit/83d544b9292870eb44f6fca37df0aa351c4ef83a


--

___
Python tracker 

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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Ethan Furman


Ethan Furman  added the comment:

After merging in doc fix by kumaraditya303, I'll update tests so Solaris passes.

--

___
Python tracker 

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



[issue34875] Change .js mime to "text/javascript"

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

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



[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue46414] Add typing.reveal_type

2022-01-17 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

The `reveal_type()` primitive is injected by type checkers into the builtins. 
When the type checker sees a call, it prints the inferred type of the argument.

This has been implemented across all type checkers, but adding an 
implementation to `typing` would help document the behavior and make it more 
discoverable for users. Also, it means code with `reveal_type()` calls can run 
without runtime errors, useful if you want to run your tests at the same time 
as you're debugging a typing issue.

The runtime implementation can be very simple:

def reveal_type(obj: _T, /) -> _T:
print("Runtime type is", type(obj))
return obj


reveal_type() is supported by all type checkers that I'm aware of (docs include 
https://google.github.io/pytype/faq.html#can-i-find-out-what-pytype-thinks-the-type-of-my-expression-is
 for pytype and 
https://mypy.readthedocs.io/en/stable/common_issues.html#reveal-type for mypy).

One area of divergence is the return value. Pyright returns the inferred type 
of the expression as a string (and uses that in its test suite for testing type 
inference). Mypy returns the argument, which has the advantage that you can 
insert `reveal_type()` in the middle of an expression without having to put it 
on its own line. Also, the Pyright behavior cannot sensibly be implemented at 
runtime. Therefore, I suggest using Mypy's behavior for `typing.reveal_type`.

--
assignee: Jelle Zijlstra
components: Library (Lib)
messages: 410794
nosy: AlexWaygood, Jelle Zijlstra, gvanrossum, kj
priority: normal
severity: normal
status: open
title: Add typing.reveal_type
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



[issue46412] PyQT6 projects crashes with python 3.10

2022-01-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is most likely a problem with PyQt6. Please ask that project first (with a 
clearer description of what goes wrong and on which platforms).

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

___
Python tracker 

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



[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Erlend E. Aasland

Erlend E. Aasland  added the comment:

I guess we could do more to promote that trick in the docs. It’s quite useful.

--

___
Python tracker 

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



[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-17 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46413] `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` in `typing`

2022-01-17 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Today I've noticed that these two methods are not covered: 
https://github.com/python/cpython/blame/16901c0482734dbd389b09ca3edfcf3e22faeed7/Lib/typing.py#L1028-L1032

- `typing._GenericAlias.__or__`
- `typing._GenericAlias.__ror__`

Later, I've realized that these two methods are not covered as well: 
https://github.com/python/cpython/blame/16901c0482734dbd389b09ca3edfcf3e22faeed7/Lib/typing.py#L1149-L1153

- `typing._SpecialGenericAlias.__or__`
- `typing._SpecialGenericAlias.__ror__`

My test plan is:
1. Cover regular `_GenericAlias` with `|` operation
2. Cover some `_SpecialGeneriAlias` instances like `Sized` and `Hashable`
3. Cover `Callable` and `Tuple` types, because they are a special-cased 
subtypes of `_SpecialGeneriAlias`

PR is on its way.

--
components: Tests
messages: 410792
nosy: sobolevn
priority: normal
severity: normal
status: open
title: `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` 
in `typing`
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



[issue46412] PyQT6 projects crashes with python 3.10

2022-01-17 Thread Fernando Pérez Gómez

New submission from Fernando Pérez Gómez :

can't translate ui. files , flags of alignment , curve types of animation 
doesn´t wors ...etc

--
messages: 410791
nosy: fernandoprezgmez
priority: normal
severity: normal
status: open
title: PyQT6 projects crashes with python 3.10
type: crash
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



[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue46402] Enhance sqlite3 to avoid implicit creation?

2022-01-17 Thread Ned Batchelder


Ned Batchelder  added the comment:

@Erlend: thanks for the URI tip, I missed that as a possibility in the SQLite 
docs.

--

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue46411] modernize exception handling in tests

2022-01-17 Thread Irit Katriel


New submission from Irit Katriel :

There are a few tests that use sys.exc_info() because they needed to in python 
2, but there is no longer a reason to do it. I will make a patch shortly.

--
assignee: iritkatriel
components: Tests
messages: 410789
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: modernize exception handling in tests
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



[issue22039] PyObject_SetAttr doesn't mention value = NULL

2022-01-17 Thread Petr Viktorin


Petr Viktorin  added the comment:

This cannot be changed in 3.x, since the PyObject_DelAttr macro calls 
PyObject_SetAttr(..., NULL), and the macro is expanded in all extensions that 
use the stable ABI.
(Technically, it would be possible to add a PyObject_SetAttr *macro* that would 
warn/fail, while keeping the PyObject_SetAttr *function* untouched, but that 
would be a pain to test/maintain.) 

The wording could be clarified to something like: "This behaviour is deprecated 
in favour of using PyObject_DelAttr(), but there are currently no plans to 
remove it."

--

___
Python tracker 

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



[issue46374] Assertion failed in ceval.c

2022-01-17 Thread Mark Shannon


Change by Mark Shannon :


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



[issue40066] Enum: modify __repr__, __str__; update docs

2022-01-17 Thread Kumar Aditya


Change by Kumar Aditya :


--
nosy: +kumaraditya303
nosy_count: 15.0 -> 16.0
pull_requests: +28840
pull_request: https://github.com/python/cpython/pull/30637

___
Python tracker 

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



[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-01-17 Thread Mark Shannon


Change by Mark Shannon :


--
assignee:  -> Mark.Shannon

___
Python tracker 

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



  1   2   >