Skip to content

psutil: remove empty tuple from laddr#15498

Open
beauxq wants to merge 1 commit intopython:mainfrom
beauxq:psutil-sconn-laddr
Open

psutil: remove empty tuple from laddr#15498
beauxq wants to merge 1 commit intopython:mainfrom
beauxq:psutil-sconn-laddr

Conversation

@beauxq
Copy link
Contributor

@beauxq beauxq commented Mar 9, 2026

remove empty tuple from sconn.laddr

The PR that introduced this #6669 only showed results for raddr, not laddr

The documentation https://psutil.readthedocs.io/en/latest/#psutil.net_connections says that raddr can be the empty tuple. It does not say that laddr can be the empty tuple.


I don't know psutil that well. It would be nice if someone who knows it better can confirm.
(But if this isn't right, they should change their documentation.)

The PR that introduced this python#6669
only showed results for `raddr`, not `laddr`

The documentation https://psutil.readthedocs.io/en/latest/#psutil.net_connections
says that `raddr` can be the empty tuple. It does not say that `laddr` can be the empty tuple.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Diff from mypy_primer, showing the effect of this PR on open source code:

rotki (https://github.com/rotki/rotki)
- rotkehlchen/tests/utils/ports.py:33: error: Tuple index out of range  [misc]
- rotkehlchen/tests/utils/ports.py:34: error: Tuple index out of range  [misc]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant