Skip to content

Conversation

@ianthomas23
Copy link
Collaborator

Fixes #1218.

test_sequential_control_messages added in #1210 compares two datetimes returned in execute_reply messages. Some downstream libraries (ipyparallel) keep them as strings for performance reasons, so here allow this test to accept datetime or strings, otherwise this test is testing the return types rather than the intended sequence of control messages.

Once this passes CI here and is merged, we will need to check that IPythons CI also passes before we can be sure that it is fully fixed.

@ianthomas23
Copy link
Collaborator Author

@ianthomas23 ianthomas23 added the bug label Mar 4, 2024
@blink1073
Copy link
Contributor

This failure on Windows looks relevant:

FAILED tests/test_kernel.py::test_sequential_control_messages - assert datetime.datetime(2024, 3, 4, 12, 12, 34, 411229, tzinfo=datetime.timezone.utc) > datetime.datetime(2024, 3, 4, 12, 12, 34, 411229, tzinfo=tzutc())

@ianthomas23
Copy link
Collaborator Author

Windows tests are passing now.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thank you!

@blink1073 blink1073 merged commit cdc988a into ipython:main Mar 4, 2024
@ianthomas23 ianthomas23 deleted the test_allow_str_or_datetime branch March 4, 2024 19:54
ianthomas23 added a commit to ianthomas23/ipykernel that referenced this pull request Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: '>=' not supported between instances of 'str' and 'datetime.datetime'

2 participants