Skip to content

Conversation

@VanshAgarwal24036
Copy link
Contributor

@VanshAgarwal24036 VanshAgarwal24036 commented Jan 18, 2026

This PR splits the datetime tests into two groups:

  • Pure-Python tests that do not require _datetime
  • Fast C-accelerated tests that require _datetime

The _Fast tests are only loaded when _datetime is available, allowing
the test suite to run correctly on builds where _datetime is not present.

No test behavior is changed.

@VanshAgarwal24036
Copy link
Contributor Author

Test-only change; no user-visible impact, so no NEWS entry is needed.

@serhiy-storchaka serhiy-storchaka added skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 20, 2026
fast_tests = import_fresh_module(TESTS,
fresh=['datetime', '_strptime'],
blocked=['_pydatetime'])
pure_tests = import_fresh_module(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now restore the old formatting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — I’ve restored the original formatting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not restored yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve now restored the original structure by keeping the two import_fresh_module() calls adjacent and moved the _datetime availability check outside that block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants