Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
gh-102255: Improve build support for Windows API partitions (GH-102256)
Browse files Browse the repository at this point in the history
Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs).
CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes.
`MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
  • Loading branch information
maxbachmann authored Mar 9, 2023
1 parent 1f3c0b3 commit b7ff4df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -3084,11 +3084,13 @@ def test_device_encoding(self):
class PidTests(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'getppid'), "test needs os.getppid")
def test_getppid(self):
p = subprocess.Popen([sys.executable, '-c',
p = subprocess.Popen([sys._base_executable, '-c',
'import os; print(os.getppid())'],
stdout=subprocess.PIPE)
stdout, _ = p.communicate()
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, error = p.communicate()
# We are the parent of our subprocess
self.assertEqual(error, b'')
self.assertEqual(int(stdout), os.getpid())

def check_waitpid(self, code, exitcode, callback=None):
Expand Down

0 comments on commit b7ff4df

Please sign in to comment.