Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pendulum to 3.0.0 #482

Closed
wants to merge 3 commits into from

Conversation

deronnax
Copy link
Contributor

@deronnax deronnax commented Dec 19, 2023

needs the merge of #481 first.

@deronnax
Copy link
Contributor Author

rebased on current master

@deronnax
Copy link
Contributor Author

I updated a broken test to pass but I am not sure this is the right fix, please have a look.

Copy link
Owner

@laixintao laixintao left a comment

Choose a reason for hiding this comment

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

The binary build failed on https://github.com/laixintao/iredis/actions/runs/7264955456/job/19793596427?pr=482#step:10:18

looks like a pendulum packaging issue, I can check it later.

@@ -350,7 +350,7 @@ def test_timestamp_completer_datetime_format_time_completion():
text="1581033600000",
start_position=-10,
display=FormattedText([("", "1581033600000")]),
display_meta="2020-02-07T00:00:00+00:00",
display_meta="2020-02-07 00:00:00+00:00",
Copy link
Owner

Choose a reason for hiding this comment

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

The difference came from here, we use str(pendulum_obj) as the display:

display_meta=str(dt),

import pendulum

dt = pendulum.parse("2023-12-01")
print(dt)


# pendulum 2.x: 2023-12-01T00:00:00+00:00
# pendulum 3.x: 2023-12-01 00:00:00+00:00

A think a better fix would be, also change the code on

display_meta=str(dt),
to dt.format('YYYY-MM-DD HH:mm:ss'), so that we do not depend on the default behavior, what do you think?

@deronnax deronnax mentioned this pull request Dec 20, 2023
@deronnax
Copy link
Contributor Author

oops, I forgot to come back to this issue. Can you assign it to me please?

@laixintao
Copy link
Owner

Done, thank you.

I also spent some time on this issue, but failed to make it work for pendulum 3.0 with pyoxidizer.

@deronnax
Copy link
Contributor Author

I close this one in favor of #492. I have no intention of spending time debbuging binary builds of pendulum.

@laixintao
Copy link
Owner

I close this one in favor of #492. I have no intention of spending time debbuging binary builds of pendulum.

Yes agree, thanks.

@laixintao laixintao closed this Apr 15, 2024
@deronnax deronnax deleted the support-pendulum-3 branch April 15, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants