Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski
# Windows
PC/ @python/windows-team
PCbuild/ @python/windows-team
Modules/_testconsole.c @python/windows-team
Modules/_wmimodule.cpp @python/windows-team
Modules/msvcrtmodule.c @python/windows-team
Modules/winreg.c @python/windows-team
Modules/winsound.c @python/windows-team

# Windows Venv launcher/redirector
PC/venvlauncher.c @python/windows-team @vsajip
Expand Down Expand Up @@ -675,7 +680,6 @@ Modules/_zstd/ @AA-Turner @emmatyping
# Exclude Argument Clinic directories
Modules/**/clinic/
Objects/**/clinic/
PC/**/clinic/
Python/**/clinic/

# Exclude Lazy Imports=all CI carve out file
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/msvcrt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. module:: msvcrt
:synopsis: Miscellaneous useful routines from the MS VC++ runtime.

**Source code:** :source:`PC/msvcrtmodule.c`
**Source code:** :source:`Modules/msvcrtmodule.c`

--------------

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/winreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. module:: winreg
:synopsis: Routines and objects for manipulating the Windows registry.

**Source code:** :source:`PC/winreg.c`
**Source code:** :source:`Modules/winreg.c`

--------------

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/winsound.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. module:: winsound
:synopsis: Access to the sound-playing machinery for Windows.

**Source code:** :source:`PC/winsound.c`
**Source code:** :source:`Modules/winsound.c`

--------------

Expand Down
1 change: 0 additions & 1 deletion InternalDocs/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ Some exceptions to these layouts are:
* built-in type `str` is at [`Objects/unicodeobject.c`](../Objects/unicodeobject.c)
* built-in module `sys` is at [`Python/sysmodule.c`](../Python/sysmodule.c)
* built-in module `marshal` is at [`Python/marshal.c`](../Python/marshal.c)
* Windows-only module `winreg` is at [`PC/winreg.c`](../PC/winreg.c)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Move the Windows-only extension modules :mod:`msvcrt`, :mod:`winreg`,
:mod:`winsound`, ``_wmi`` and ``_testconsole`` from :file:`PC/` to
:file:`Modules/`. Patch by Hugo van Kemenade.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions PCbuild/_freeze_module.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@
<ClCompile Include="..\Parser\tokenizer\source.c" />
<ClCompile Include="..\Parser\tokenizer\helpers.c" />
<ClCompile Include="..\PC\invalid_parameter_handler.c" />
<ClCompile Include="..\PC\msvcrtmodule.c" />
<ClCompile Include="..\PC\winreg.c" />
<ClCompile Include="..\Modules\msvcrtmodule.c" />
<ClCompile Include="..\Modules\winreg.c" />
<ClCompile Include="..\Python\_strptime.c" />
<ClCompile Include="..\Python\_warnings.c" />
<ClCompile Include="..\Python\asdl.c" />
Expand Down
4 changes: 2 additions & 2 deletions PCbuild/_freeze_module.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
<ClCompile Include="..\Objects\moduleobject.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\PC\msvcrtmodule.c">
<ClCompile Include="..\Modules\msvcrtmodule.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Parser\myreadline.c">
Expand Down Expand Up @@ -538,7 +538,7 @@
<ClCompile Include="..\Modules\_io\winconsoleio.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\PC\winreg.c">
<ClCompile Include="..\Modules\winreg.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/_testconsole.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\_testconsole.c" />
<ClCompile Include="..\Modules\_testconsole.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/_testconsole.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\PC\_testconsole.c">
<ClCompile Include="..\Modules\_testconsole.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/_wmi.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\_wmimodule.cpp" />
<ClCompile Include="..\Modules\_wmimodule.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/_wmi.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\PC\_wmimodule.cpp">
<ClCompile Include="..\Modules\_wmimodule.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@
<ClCompile Include="..\Parser\string_parser.c" />
<ClCompile Include="..\Parser\peg_api.c" />
<ClCompile Include="..\PC\invalid_parameter_handler.c" />
<ClCompile Include="..\PC\winreg.c" />
<ClCompile Include="..\Modules\winreg.c" />
<ClCompile Include="..\PC\config.c" />
<ClCompile Include="..\PC\msvcrtmodule.c" />
<ClCompile Include="..\Modules\msvcrtmodule.c" />
<ClCompile Include="..\Python\pyhash.c" />
<ClCompile Include="..\Python\_contextvars.c" />
<ClCompile Include="..\Python\_strptime.c" />
Expand Down
8 changes: 4 additions & 4 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1382,17 +1382,17 @@
<ClCompile Include="..\Parser\token.c">
<Filter>Parser</Filter>
</ClCompile>
<ClCompile Include="..\PC\winreg.c">
<Filter>PC</Filter>
<ClCompile Include="..\Modules\winreg.c">
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="..\PC\config.c">
<Filter>PC</Filter>
</ClCompile>
<ClCompile Include="..\PC\dl_nt.c">
<Filter>PC</Filter>
</ClCompile>
<ClCompile Include="..\PC\msvcrtmodule.c">
<Filter>PC</Filter>
<ClCompile Include="..\Modules\msvcrtmodule.c">
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="..\Python\_contextvars.c">
<Filter>Python</Filter>
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/winsound.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\winsound.c" />
<ClCompile Include="..\Modules\winsound.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/winsound.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\PC\winsound.c">
<ClCompile Include="..\Modules\winsound.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tools/c-analyzer/cpython/_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def _is_local_static_mutex(decl):
return (vartype.typespec == 'PyMutex') and (decl.storage == 'static')

def _has_other_supported_type(decl):
if hasattr(decl, 'file') and decl.file.filename.endswith('.c.h'):
if hasattr(decl, 'file') and decl.file.filename.endswith(('.c.h', '.cpp.h')):
assert 'clinic' in decl.file.filename, (decl,)
if decl.name == '_kwtuple':
return True
Expand Down
4 changes: 4 additions & 0 deletions Tools/c-analyzer/cpython/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ def format_tsv_lines(lines):
'Modules/_scproxy.c', # SystemConfiguration/SystemConfiguration.h

# Windows
'Modules/_testconsole.c', # windows.h
'Modules/_winapi.c', # windows.h
'Modules/expat/winconfig.h',
'Modules/msvcrtmodule.c', # windows.h
'Modules/overlapped.c', # winsock.h
'Modules/winreg.c', # windows.h
'Modules/winsound.c', # windows.h
'Python/dynload_win.c', # windows.h
'Python/thread_nt.h',

Expand Down
3 changes: 3 additions & 0 deletions Tools/c-analyzer/cpython/ignored.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ Modules/_zstd/_zstdmodule.c - _zstdmodule -
Modules/clinic/md5module.c.h _md5_md5 _keywords -
Modules/clinic/grpmodule.c.h grp_getgrgid _keywords -
Modules/clinic/grpmodule.c.h grp_getgrnam _keywords -
Modules/clinic/winsound.c.h winsound_Beep _keywords -
Modules/clinic/winsound.c.h winsound_MessageBeep _keywords -
Modules/clinic/winsound.c.h winsound_PlaySound _keywords -
Objects/object.c - constants static PyObject*[]
Objects/dictobject.c - PyFrozenDict_Type -
Modules/_testcapi/unicode.c test_py_identifier PyId_hello -
Expand Down
Loading