mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-25 13:45:52 +03:00
[GH-ISSUE #199] python gcs client will throw ValueError because of wrong timestamp format #2181
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#2181
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kc-panw on GitHub (Mar 20, 2020).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/199
The python GCS client somehow takes its format very similar to RFC3339 but not exactly the same so it will throw.
The format it uses is actually:
"2006-01-02T15:04:05.999999Z07:00"not
time.RFC3339would this be fixed?
@fsouza commented on GitHub (Mar 21, 2020):
@kc-panw hey there, thanks for reporting this issue. It can definitely be fixed. Can you provide a reproducer, just so we can write a test to prevent regressions?
Thanks!
@linjun9 commented on GitHub (May 7, 2020):
@fsouza Yea, I'm getting the same problem. You can reproduce by running the following sample code.
The problem is it using RFC3339Microsecond in python GCS client, but it's using RFC3339 in
fake-gcs-server. It requires following format2006-01-02T15:04:05.999999Z07:00. Thanks in advance.@fsouza commented on GitHub (May 11, 2020):
@linjun9 awesome, thanks for the reproducer! The fix for this is small (use ``time.RFC3339Nano
instead oftime.RFC3339`), but writing a test may be trickier. I can give it a shot later this week.@linjun9 commented on GitHub (May 11, 2020):
@fsouza I tryied
time.RFC3339Nano. It doesn't work, sinceRFC3339Nanogives us 9 decimal places, we only need 6 decimal places. Not a Golang expert, but yea, feel free to try it out. Thanks 👍@chrisK824 commented on GitHub (May 11, 2024):
Hi @fsouza , thanks for this awesome project!
I have stumbled on the above issue. I am not sure if this has been re-introduced at some stage due to python client changes, but it is breaking in my trials. I am using python3.12 and latest version (1.49) of the emulator.
Here is a reproducing script:
this spits out: