Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: add docs signed_url expiration take default utc#250

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tseaver merged 9 commits intogoogleapis:masterfromMaxxleLLC:storage_issue_244
Aug 27, 2020

Conversation

@HemangChothani
Copy link
Contributor

Fixes#244

@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelAug 19, 2020
Copy link
Contributor

@tseavertseaver left a comment

Choose a reason for hiding this comment

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

Please change all the docstrings as noted in my first comment.

:param expiration: Point in time when the signed URL should expire.
:param expiration: Point in time when the signed URL should expire. If
expiration in datetime, then need to pass timezone
with it. Default value of ``tzinfo`` is ``UTC``.
Copy link
Contributor

Choose a reason for hiding this comment

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

The default value of thetzinfo argument todatetime.datetime is None, resulting in a "naive"datetime instance: the comment should state clearly that we forcibly convert such instances toUTC. E.g.:

    :paramexpiration:PointintimewhenthesignedURLshouldexpire.Ifa`datetime`instanceispassedwithoutanexplicit`tzinfo`set,itwillbeconvertedto``UTC``.

Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than "it will be converted to" let's use "it will be assumed to be". This is a huge footgun; a user who sees the term "converted" will assume that we will do the right thing in the default case, whereas in fact we will almost always do the wrong thing.

@product-auto-labelproduct-auto-labelbot added the api: storageIssues related to the googleapis/python-storage API. labelAug 21, 2020
@frankynfrankyn requested a review fromandrewsgAugust 24, 2020 21:11
Copy link
Contributor

@andrewsgandrewsg left a comment

Choose a reason for hiding this comment

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

As per the original issue, can we also modify the system test TestV4POSTPolicies.test_get_signed_policy_v4() to use utcnow()?

@andrewsg
Copy link
Contributor

Cancel that, I just saw that the test issue is resolved in#251. Thanks for that! Leaving review on "changes requested" for the docstring update as per my comment; lgtm other than that.

Copy link
Contributor

@andrewsgandrewsg left a comment

Choose a reason for hiding this comment

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

Thanks!

@tseaver
Copy link
Contributor

@HemangChothani I would merge my suggestions to address the concern expressed by@andrewsg , but you have the "maintainers can push changes" option turned off.

@tseavertseaver merged commit944ab18 intogoogleapis:masterAug 27, 2020
@IlyaFaerIlyaFaer deleted the storage_issue_244 branchSeptember 10, 2020 14:22
cojenco pushed a commit to cojenco/python-storage that referenced this pull requestOct 13, 2021
Co-authored-by: Frank Natividad <frankyn@users.noreply.github.com>Co-authored-by: Tres Seaver <tseaver@palladion.com>
cojenco pushed a commit to cojenco/python-storage that referenced this pull requestOct 13, 2021
Co-authored-by: Frank Natividad <frankyn@users.noreply.github.com>Co-authored-by: Tres Seaver <tseaver@palladion.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@andrewsgandrewsgandrewsg approved these changes

+1 more reviewer

@tseavertseavertseaver approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

api: storageIssues related to the googleapis/python-storage API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

generate_signed_post_policy_v4() improperly handles expiration timestamps with tzinfo=None

4 participants

@HemangChothani@andrewsg@tseaver@frankyn

[8]ページ先頭

©2009-2025 Movatter.jp