Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 'sys.platform' return "freebsd" only on FreeBSD without major version #129393

Closed
michael-o opened this issue Jan 28, 2025 · 1 comment
Closed
Labels
OS-freebsd type-feature A feature request or enhancement

Comments

@michael-o
Copy link
Contributor

michael-o commented Jan 28, 2025

Feature or enhancement

Proposal:

When using using sys.platform and especially requirements.txt /pyproject.toml one cannot constrain dependencies to FreeBSD as whole, but need to deal with the suffixed major version. A change should follow suit all other cases to contain the platform name only without the major version.

Locally patched:

osipovmi@deblndw011x:~/var/Projekte/cpython (main *+>)
$ /tmp/python-3.13/bin/python3
Python 3.14.0a4+ (heads/main-dirty:8e57877e3f4, Jan 28 2025, 10:01:48) [Clang 19.1.5 (https://github.com/llvm/llvm-project.git llvmorg-19.1.5-0-gab4b5a on freebsd
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'freebsd'
>>>

A PR wll follow soon.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@michael-o michael-o added the type-feature A feature request or enhancement label Jan 28, 2025
michael-o added a commit to michael-o/cpython that referenced this issue Jan 28, 2025
michael-o added a commit to michael-o/cpython that referenced this issue Jan 28, 2025
michael-o added a commit to michael-o/cpython that referenced this issue Jan 28, 2025
vstinner pushed a commit that referenced this issue Jan 31, 2025
)

Make 'sys.platform' return "freebsd" only on FreeBSD without major version.
@vstinner
Copy link
Member

Implemented by the change e3eba8c.

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Feb 7, 2025
…python#129394)

Make 'sys.platform' return "freebsd" only on FreeBSD without major version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-freebsd type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants