Visitar URL original
Make 'sys.platform' return "freebsd" only on FreeBSD without major version · Issue #129393 · python/cpython · GitHub
Skip to content

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

Closed

Description

@michael-o

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

Activity

  1. added a commit that references this issue on Jan 28, 2025
  2. added 2 commits that reference this issue on Jan 28, 2025
  3. added a commit that references this issue on Jan 31, 2025
  4. vstinner commented on Jan 31, 2025

    @vstinner
    Member

    Implemented by the change e3eba8c.

  5. added a commit that references this issue on Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions