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

[PR #7302/fde452da backport][3.9] Make max 32-bit timestamp aware #7304

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented May 27, 2023

This is a backport of PR #7302 as merged into master (fde452d).

What do these changes do?

Make the max 32-bit timestamp an aware one. For consistency with the non-32-bit one, and to avoid a DeprecationWarning with Python 3.12.

https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcfromtimestamp

Are there changes in behavior for the user?

aiohttp.cookiejar.MAX_32BIT_TIME is now aware. I suppose that's not something directly used much at all though.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • The format is <Name> <Surname>.
    • Please keep alphabetical order, the file is sorted by names.
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> for example (588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."

<!-- Thank you for your contribution! -->

## What do these changes do?

<!-- Please give a short brief about these changes. -->

Make the max 32-bit timestamp an aware one. For consistency with the
non-32-bit one, and to avoid a `DeprecationWarning` with Python 3.12.

https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcfromtimestamp

## Are there changes in behavior for the user?

<!-- Outline any notable behaviour for the end users. -->

`aiohttp.cookiejar.MAX_32BIT_TIME` is now aware. I suppose that's not
something directly used much at all though.

## Related issue number

<!-- Are there any issues opened that will be resolved by merging this
change? -->

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [x] Add a new news fragment into the `CHANGES` folder
  * name it `<issue_id>.<type>` for example (588.bugfix)
* if you don't have an `issue_id` change it to the pr id after creating
the pr
  * ensure type is one of the following:
    * `.feature`: Signifying a new feature.
    * `.bugfix`: Signifying a bug fix.
    * `.doc`: Signifying a documentation improvement.
    * `.removal`: Signifying a deprecation or removal of public API.
* `.misc`: A ticket has been closed, but it is not of interest to users.
* Make sure to use full sentences with correct case and punctuation, for
example: "Fix issue with non-ascii contents in doctest text files."

---------

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
(cherry picked from commit fde452d)
@patchback patchback bot requested a review from asvetlov as a code owner May 27, 2023 11:45
@patchback patchback bot mentioned this pull request May 27, 2023
5 tasks
@codecov
Copy link

codecov bot commented May 27, 2023

Codecov Report

Merging #7304 (d40ecf1) into 3.9 (aed8caf) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              3.9    #7304   +/-   ##
=======================================
  Coverage   97.31%   97.31%           
=======================================
  Files         107      107           
  Lines       31647    31647           
  Branches     4026     4026           
=======================================
  Hits        30796    30796           
  Misses        644      644           
  Partials      207      207           
Flag Coverage Δ
CI-GHA 97.20% <100.00%> (ø)
OS-Linux 96.88% <100.00%> (ø)
OS-Windows 94.52% <100.00%> (ø)
OS-macOS 96.47% <100.00%> (-0.01%) ⬇️
Py-3.10.11 96.95% <100.00%> (ø)
Py-3.11.0 96.40% <100.00%> (ø)
Py-3.7.16 96.69% <100.00%> (ø)
Py-3.7.9 94.36% <100.00%> (ø)
Py-3.8.10 94.30% <100.00%> (ø)
Py-3.8.16 96.61% <100.00%> (ø)
Py-3.9.13 94.30% <100.00%> (ø)
Py-3.9.16 96.64% <100.00%> (-0.01%) ⬇️
Py-pypy7.3.11 94.02% <100.00%> (ø)
VM-macos 96.47% <100.00%> (-0.01%) ⬇️
VM-ubuntu 96.88% <100.00%> (ø)
VM-windows 94.52% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/cookiejar.py 98.83% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit 8b0d5ee into 3.9 May 27, 2023
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/fde452da30f326f4fc50cbf6cbe32d6387c48c0f/pr-7302 branch May 27, 2023 16:26
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.

2 participants