Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lev-blit
Copy link
Contributor

Closes #14734

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@lev-blit lev-blit marked this pull request as ready for review October 14, 2025 11:31
@donBarbos
Copy link
Contributor

@lev-blit Hi! Could you please resolve the conflicts when you get a chance?
I recently added some annotations to the stubs and got a better understanding of source code, so I think I could help review your PR.

@lev-blit lev-blit marked this pull request as draft November 15, 2025 13:45
@github-actions

This comment has been minimized.

@lev-blit
Copy link
Contributor Author

lev-blit commented Nov 15, 2025

7.1.2 introduces many changes that aren't in 7.1.1, including removing _psutil_posix.py and adding fields to other files

what should we do here? lock to 7.1.3? 7.1.1? should we target the latest in the patch releases or the first?

@donBarbos
Copy link
Contributor

donBarbos commented Nov 15, 2025

I think it will be easier to update gradually and then we'll have more suitable versions of stubs for the corresponding versions of the library

@lev-blit
Copy link
Contributor Author

Then I'll make this pr update to 7.1.1, and future versions can be in other prs

@lev-blit lev-blit changed the title [psutil]: Bump psutil to 7.1.* [psutil]: Bump psutil to 7.1.1 Nov 15, 2025
@lev-blit lev-blit marked this pull request as ready for review November 15, 2025 15:45
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Contributor

@donBarbos donBarbos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I found few missing changes in _psbsd.pyi, based on giampaolo/psutil@release-7.0.0...release-7.1.1:

  • HAS_PER_CPU_TIMES, HAS_PROC_OPEN_FILES, HAS_PROC_NUM_FDS removed
  • def adjust_proc_create_time(ctime): ... function added but only for NetBSD
  • def create_time(self, monotonic=False): ... method updated

def cpu_count_cores() -> int | None: ...
def cpu_stats() -> _common.scpustats: ...
def cpu_freq() -> list[_common.scpufreq]: ...

Copy link
Contributor

@donBarbos donBarbos Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add from psutil._common import debug as debug to imports in _psosx.pyi

def disk_io_counters() -> dict[str, tuple[int, int, int, int, int, int]]: ...
def disk_partitions() -> list[tuple[str, str, str, str]]: ...
def disk_usage_used(mount_point: StrOrBytesPath, default: _T, /) -> int | _T: ...
def has_cpu_freq(*args, **kwargs) -> bool: ...
Copy link
Contributor

@donBarbos donBarbos Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't necessary, I just already typed it, so I decided to suggest it:

Suggested change
def has_cpu_freq(*args, **kwargs) -> bool: ...
def has_cpu_freq() -> bool: ...

AF_LINK: Final[int]
def net_if_duplex_speed(nic_name: str, /) -> list[int]: ...

def users(*args, **kwargs): ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def users(*args, **kwargs): ...
def users() -> list[tuple[Incomplete, ...]]: ...

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.

2 participants