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

rename a shadowed test and re-enable F811 to catch future cases (#8139) #8148

Conversation

alexmac
Copy link
Contributor

@alexmac alexmac commented Feb 8, 2024

(cherry picked from commit 3c0f1eb)

What do these changes do?

Are there changes in behavior for the user?

Is it a substantial burden for the maintainers to support this?

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_or_pr_num>.<type>.rst (e.g. 588.bugfix.rst)

    • if you don't have an issue number, change it to the pull request
      number after creating the PR

      • .bugfix: A bug fix for something the maintainers deemed an
        improper undesired behavior that got corrected to match
        pre-agreed expectations.
      • .feature: A new behavior, public APIs. That sort of stuff.
      • .deprecation: A declaration of future API removals and breaking
        changes in behavior.
      • .breaking: When something public is removed in a breaking way.
        Could be deprecated in an earlier release.
      • .doc: Notable updates to the documentation structure or build
        process.
      • .packaging: Notes for downstreams about unobvious side effects
        and tooling. Changes in the test invocation considerations and
        runtime assumptions.
      • .contrib: Stuff that affects the contributor experience. e.g.
        Running tests, building the docs, setting up the development
        environment.
      • .misc: Changes that are hard to assign to any of the above
        categories.
    • Make sure to use full sentences with correct case and punctuation,
      for example:

      Fixed issue with non-ascii contents in doctest text files
      -- by :user:`contributor-gh-handle`.

      Use the past tense or the present tense a non-imperative mood,
      referring to what's changed compared to the last released version
      of this project.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 8, 2024
@alexmac
Copy link
Contributor Author

alexmac commented Feb 8, 2024

@Dreamsorcerer - here's one of the backports

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b3e5376) 97.41% compared to head (c7da1ab) 97.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             3.10    #8148      +/-   ##
==========================================
+ Coverage   97.41%   97.44%   +0.03%     
==========================================
  Files         108      108              
  Lines       32950    32937      -13     
  Branches     3933     3932       -1     
==========================================
  Hits        32097    32097              
+ Misses        649      637      -12     
+ Partials      204      203       -1     
Flag Coverage Δ
CI-GHA 97.36% <100.00%> (+0.03%) ⬆️
OS-Linux 97.05% <100.00%> (+0.03%) ⬆️
OS-Windows 94.59% <100.00%> (+0.03%) ⬆️
OS-macOS 96.87% <100.00%> (+0.03%) ⬆️
Py-3.10.11 94.49% <100.00%> (+0.03%) ⬆️
Py-3.10.13 96.83% <100.00%> (+0.03%) ⬆️
Py-3.11.7 96.51% <100.00%> (+0.03%) ⬆️
Py-3.12.1 96.48% <100.00%> (+0.04%) ⬆️
Py-3.8.10 94.47% <100.00%> (+0.03%) ⬆️
Py-3.8.18 96.77% <100.00%> (+0.03%) ⬆️
Py-3.9.13 94.48% <100.00%> (+0.03%) ⬆️
Py-3.9.18 96.81% <100.00%> (+0.03%) ⬆️
Py-pypy7.3.15 96.34% <100.00%> (+0.03%) ⬆️
VM-macos 96.87% <100.00%> (+0.03%) ⬆️
VM-ubuntu 97.05% <100.00%> (+0.03%) ⬆️
VM-windows 94.59% <100.00%> (+0.03%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…29d3512419ea65e7cdeb61ba3f3496f00/pr-8139' into patchback/backports/3.10/3c0f1eb29d3512419ea65e7cdeb61ba3f3496f00/pr-8139
@alexmac
Copy link
Contributor Author

alexmac commented Feb 8, 2024

@Dreamsorcerer I've removed the other shadowed test (made the diff match master) - do you want the contrib file updated for this back port, and if so do I updated both the pr number and the text or just the text?

@Dreamsorcerer Dreamsorcerer enabled auto-merge (squash) February 8, 2024 22:48
@Dreamsorcerer Dreamsorcerer merged commit 1dc8a07 into aio-libs:3.10 Feb 8, 2024
26 of 31 checks passed
@Dreamsorcerer
Copy link
Member

Ah, I think it's fine.

@@ -179,33 +179,7 @@ async def unknown_addrinfo(*args: Any, **kwargs: Any) -> List[Any]:


async def test_close_for_threaded_resolver(loop) -> None:
resolver = ThreadedResolver(loop=loop)
Copy link
Member

@webknjaz webknjaz Feb 12, 2024

Choose a reason for hiding this comment

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

@Dreamsorcerer did you miss that this removes an unrelated test in a test module that the original commit didn't even touch?

Copy link
Member

Choose a reason for hiding this comment

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

@alexmac it seems like the conflict resolution hasn't been completed correctly and this removed a legit test. Why?

Copy link
Member

Choose a reason for hiding this comment

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

@alexmac was it exactly identical to the other test? It'd be useful to have in a PR description. And perhaps, do such things in separate PRs. Backports must never include changes that aren't directly related to resolving conflicts with the original patch.

Copy link
Member

Choose a reason for hiding this comment

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

You can see the same test still exists, though the diff makes it a bit awkward to tell. The flake8 rule found this duplicate test that only existed on the 3.x branches. Could have been removed in another PR, but I don't think it makes any real difference.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I managed to find that. It'd be much more obvious (== less mental overhead) if this was explained explicitly.

As for a separate PR — this is the way. Patchback would also work to port from 3.10 to 3.9. The thing is that the git cherry-pick -x is supposed to contain a copy of another change, it even generates a reference (cherry picked from commit xxxxxx). By making arbitrary changes, that makes it hard to track, breaking transparency of the updates to Git. Atomic commits/PRs is a convention that is designed around certain expectations/promises. Breaking them hurts future git paleontology, making the introspection harder. This effect is often not visible/obvious to the commit authors, making it a hard sell, but is quite important for keeping sane history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants