Skip to content

gh-89928: Fix integer conversion of device numbers.#31794

Merged
serhiy-storchaka merged 12 commits intopython:mainfrom
serhiy-storchaka:long-from-dev_t
Jun 4, 2024
Merged

gh-89928: Fix integer conversion of device numbers.#31794
serhiy-storchaka merged 12 commits intopython:mainfrom
serhiy-storchaka:long-from-dev_t

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka commented Mar 10, 2022

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).

https://bugs.python.org/issue45767

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
@serhiy-storchaka serhiy-storchaka added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 10, 2022
@bedevere-bot
Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit c2d082b 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 10, 2022
@ambv
Copy link
Copy Markdown
Contributor

ambv commented May 17, 2022

This missed the boat for inclusion in Python 3.9 which accepts security fixes only as of today.

Copy link
Copy Markdown
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

This has merge conflicts now.

@bedevere-bot
Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@hugovk hugovk removed the needs backport to 3.10 only security fixes label Apr 7, 2023
@serhiy-storchaka
Copy link
Copy Markdown
Member Author

!buildbot freebsd

@bedevere-bot
Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 17c02dc 🤖

The command will test the builders whose names match following regular expression: freebsd

The builders matched are:

  • AMD64 FreeBSD14 PR
  • AMD64 FreeBSD PR
  • AMD64 FreeBSD15 PR

@serhiy-storchaka
Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

@serhiy-storchaka serhiy-storchaka added the needs backport to 3.12 only security fixes label Dec 28, 2023
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the update.

@vstinner
Copy link
Copy Markdown
Member

vstinner commented Jun 2, 2024

@serhiy-storchaka: Do you want to merge this PR?

Comment on lines +728 to +729
if sys.platform == 'linux':
NODEV = -1
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am going to expose posix.NODEV, but this is a different issue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FWIW, musl is another C library implementation on Linux ( like glibc ) which does not provide NODEV, so relying on platform to provide this definition may not be true always.

@serhiy-storchaka serhiy-storchaka added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 3, 2024
@bedevere-bot
Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 97e71d3 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 3, 2024
@serhiy-storchaka serhiy-storchaka merged commit 7111d96 into python:main Jun 4, 2024
@miss-islington-app
Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the long-from-dev_t branch June 4, 2024 16:36
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 4, 2024
)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app
Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f 3.12

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Jun 4, 2024

GH-120053 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 4, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jun 4, 2024
…onGH-31794)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Jun 4, 2024

GH-120054 is a backport of this pull request to the 3.12 branch.

@vstinner
Copy link
Copy Markdown
Member

vstinner commented Jun 4, 2024

Thanks for the fix @serhiy-storchaka!

serhiy-storchaka added a commit that referenced this pull request Jun 4, 2024
…H-120054)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d96)
serhiy-storchaka added a commit that referenced this pull request Jun 4, 2024
…H-120053)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
(cherry picked from commit 7111d96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
barneygale pushed a commit to barneygale/cpython that referenced this pull request Jun 5, 2024
)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
)

Fix os.major(), os.minor() and os.makedev().
Support device numbers larger than 2**63-1.
Support non-existent device number (NODEV).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants