Skip to content

Commit 69b18fe

Browse files
committed
pythongh-106316: Remove pytime.h header file
Remove the "cpython/pytime.h" header file: it only contained private functions. Move functions to the internal pycore_time.h header file. Move tests from _testcapi to _testinternalcapi. Rename also test methods to have the same name than tested C functions.
1 parent c2622a0 commit 69b18fe

24 files changed

+646
-668
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Doc/library/time.rst @pganssle @abalkin
7979
Lib/test/test_time.py @pganssle @abalkin
8080
Modules/timemodule.c @pganssle @abalkin
8181
Python/pytime.c @pganssle @abalkin
82-
Include/pytime.h @pganssle @abalkin
82+
Include/internal/pycore_time.h @pganssle @abalkin
8383

8484
# Email and related
8585
**/*mail* @python/email-team

Doc/whatsnew/3.13.rst

+3
Original file line numberDiff line numberDiff line change
@@ -602,3 +602,6 @@ Removed
602602
use ``PyObject_Vectorcall()`` which is available since Python 3.8
603603
(:pep:`590`).
604604
(Contributed by Victor Stinner in :gh:`106023`.)
605+
606+
* Remove ``cpython/pytime.h`` header file: it only contained private functions.
607+
(Contributed by Victor Stinner in :gh:`106316`.)

Include/Python.h

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
#include "weakrefobject.h"
8484
#include "structseq.h"
8585
#include "cpython/picklebufobject.h"
86-
#include "cpython/pytime.h"
8786
#include "codecs.h"
8887
#include "pyerrors.h"
8988
#include "pythread.h"

Include/cpython/pytime.h

-331
This file was deleted.

Include/internal/pycore_import.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
extern "C" {
66
#endif
77

8+
#include "pycore_time.h" // _PyTime_t
9+
810

911
struct _import_runtime_state {
1012
/* The builtin modules (defined in config.c). */

0 commit comments

Comments
 (0)