Skip to content

Commit df85cf2

Browse files
committed
Rename zoneinfo module and source file
Instead of _czoneinfo generated from zoneinfomodule.c, we now have _zoneinfo generated from _zoneinfo.c
1 parent 5d1890c commit df85cf2

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

Lib/test/test_zoneinfo/_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get_modules():
3535
"""
3636
import zoneinfo as c_module
3737

38-
py_module = import_fresh_module("zoneinfo", blocked=["_czoneinfo"])
38+
py_module = import_fresh_module("zoneinfo", blocked=["_zoneinfo"])
3939

4040
return py_module, c_module
4141

Lib/zoneinfo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from ._common import ZoneInfoNotFoundError
1111

1212
try:
13-
from _czoneinfo import ZoneInfo
13+
from _zoneinfo import ZoneInfo
1414
except ImportError: # pragma: nocover
1515
from ._zoneinfo import ZoneInfo
1616

Modules/Setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ _symtable symtablemodule.c
181181
#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
182182
#_pickle _pickle.c # pickle accelerator
183183
#_datetime _datetimemodule.c # datetime accelerator
184-
#_czoneinfo zoneinfomodule.c # zoneinfo accelerator
184+
#_zoneinfo _zoneinfo.c # zoneinfo accelerator
185185
#_bisect _bisectmodule.c # Bisection algorithms
186186
#_heapq _heapqmodule.c # Heap queue algorithm
187187
#_asyncio _asynciomodule.c # Fast asyncio Future

Modules/zoneinfomodule.c renamed to Modules/_zoneinfo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include "datetime.h"
99

1010
// Imports
11-
PyObject *io_open = NULL;
12-
PyObject *_tzpath_find_tzfile = NULL;
13-
PyObject *_common_mod = NULL;
11+
static PyObject *io_open = NULL;
12+
static PyObject *_tzpath_find_tzfile = NULL;
13+
static PyObject *_common_mod = NULL;
1414

1515
typedef struct TransitionRuleType TransitionRuleType;
1616
typedef struct StrongCacheNode StrongCacheNode;
@@ -2585,7 +2585,7 @@ static PyTypeObject PyZoneInfo_ZoneInfoType = {
25852585
};
25862586

25872587
/////
2588-
// Specify the zoneinfo._czoneinfo module
2588+
// Specify the _zoneinfo module
25892589
static PyMethodDef module_methods[] = {{NULL, NULL}};
25902590
static void
25912591
module_free()
@@ -2681,15 +2681,15 @@ static PyModuleDef_Slot zoneinfomodule_slots[] = {
26812681

26822682
static struct PyModuleDef zoneinfomodule = {
26832683
PyModuleDef_HEAD_INIT,
2684-
.m_name = "zoneinfo._czoneinfo",
2684+
.m_name = "_zoneinfo",
26852685
.m_doc = "C implementation of the zoneinfo module",
26862686
.m_size = 0,
26872687
.m_methods = module_methods,
26882688
.m_slots = zoneinfomodule_slots,
26892689
.m_free = (freefunc)module_free};
26902690

26912691
PyMODINIT_FUNC
2692-
PyInit__czoneinfo(void)
2692+
PyInit__zoneinfo(void)
26932693
{
26942694
return PyModuleDef_Init(&zoneinfomodule);
26952695
}

PCbuild/_czoneinfo.vcxproj renamed to PCbuild/_zoneinfo.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
</ItemGroup>
6969
<PropertyGroup Label="Globals">
7070
<ProjectGuid>{FCBE1EF2-E0F0-40B1-88B5-00A35D378742}</ProjectGuid>
71-
<RootNamespace>_czoneinfo</RootNamespace>
71+
<RootNamespace>_zoneinfo</RootNamespace>
7272
<Keyword>Win32Proj</Keyword>
7373
</PropertyGroup>
7474
<Import Project="python.props" />
@@ -92,7 +92,7 @@
9292
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
9393
</PropertyGroup>
9494
<ItemGroup>
95-
<ClCompile Include="..\Modules\zoneinfomodule.c" />
95+
<ClCompile Include="..\Modules\_zoneinfo.c" />
9696
</ItemGroup>
9797
<ItemGroup>
9898
<ResourceCompile Include="..\PC\python_nt.rc" />

PCbuild/_czoneinfo.vcxproj.filters renamed to PCbuild/_zoneinfo.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</Filter>
1010
</ItemGroup>
1111
<ItemGroup>
12-
<ClCompile Include="..\Modules\zoneinfomodule.c">
12+
<ClCompile Include="..\Modules\_zoneinfo.c">
1313
<Filter>Source Files</Filter>
1414
</ClCompile>
1515
</ItemGroup>

PCbuild/pcbuild.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<!-- pyshellext.dll -->
5252
<Projects Include="pyshellext.vcxproj" />
5353
<!-- Extension modules -->
54-
<ExtensionModules Include="_asyncio;_czoneinfo;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid" />
54+
<ExtensionModules Include="_asyncio;_zoneinfo;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;_queue;select;unicodedata;winsound;_uuid" />
5555
<ExtensionModules Include="_ctypes" Condition="$(IncludeCTypes)" />
5656
<!-- Extension modules that require external sources -->
5757
<ExternalModules Include="_bz2;_lzma;_sqlite3" />

PCbuild/pcbuild.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testconsole", "_testconsol
9191
EndProject
9292
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_asyncio", "_asyncio.vcxproj", "{384C224A-7474-476E-A01B-750EA7DE918C}"
9393
EndProject
94-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_czoneinfo", "_czoneinfo.vcxproj", "{FCBE1EF2-E0F0-40B1-88B5-00A35D378742}"
94+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_zoneinfo", "_zoneinfo.vcxproj", "{FCBE1EF2-E0F0-40B1-88B5-00A35D378742}"
9595
EndProject
9696
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
9797
EndProject

PCbuild/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ library which are implemented in C; each one builds a DLL (renamed to
132132
_asyncio
133133
_ctypes
134134
_ctypes_test
135-
_czoneinfo
135+
_zoneinfo
136136
_decimal
137137
_elementtree
138138
_hashlib

Tools/msi/lib/lib_files.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3-
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_msi;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_czoneinfo ?>
3+
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_msi;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_zoneinfo ?>
44
<Fragment>
55
<DirectoryRef Id="Lib_venv_scripts_nt" />
66

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ def detect_simple_extensions(self):
819819
self.add(Extension('_datetime', ['_datetimemodule.c'],
820820
libraries=['m']))
821821
# zoneinfo module
822-
self.add(Extension('_czoneinfo', ['zoneinfomodule.c'])),
822+
self.add(Extension('_zoneinfo', ['_zoneinfo.c'])),
823823
# random number generator implemented in C
824824
self.add(Extension("_random", ["_randommodule.c"],
825825
extra_compile_args=['-DPy_BUILD_CORE_MODULE']))

0 commit comments

Comments
 (0)