Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Setsys.abiflags on Windows #127405

Closed
Closed
@XuehaiPan

Description

@XuehaiPan

Feature or enhancement

Proposal:

Currently, thesys.abiflags attribute is only set on Unix systems. On Windows, there are nosys.abiflags set (i.e.hasattr(sys, 'abiflags') -> False). It is hard to tell if Python is in free-threaded or debug builds. Although developers can use something likesysconfig.get_config_var('Py_GIL_DISABLED'). It is not well documented and is not convenient.

ifnotsys.platform.startswith('win'):
self.assertIsInstance(sys.abiflags,str)

@test.support.cpython_only
@unittest.skipUnless(hasattr(sys,'abiflags'),'need sys.abiflags')
deftest_disable_gil_abi(self):
self.assertEqual('t'insys.abiflags,support.Py_GIL_DISABLED)

It would be nice if we could setABIFLAGS inpyconfig.h and enablesys.abiflags on Windows. This would simplify much code in the wild world and also in the CPython repo.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp