pylint-dev / pylint-pytest

A Pylint plugin to suppress pytest-related false positives.
https://pypi.org/project/pylint-pytest/
MIT License
14 stars 3 forks source link

Migrate setup.py to pyproject.toml #8

Closed Pierre-Sassoulas closed 8 months ago

Pierre-Sassoulas commented 10 months ago

Additionally, fixes https://github.com/pylint-dev/pylint-pytest/issues/3

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (69ad82f) 93.97% compared to head (5c6d3fb) 93.98%.

:exclamation: Current head 5c6d3fb differs from pull request most recent head 2df48d8. Consider uploading reports for the commit 2df48d8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8 +/- ## ========================================== + Coverage 93.97% 93.98% +0.01% ========================================== Files 18 18 Lines 548 549 +1 Branches 106 106 ========================================== + Hits 515 516 +1 Misses 23 23 Partials 10 10 ``` | [Flag](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | Coverage Δ | | |---|---|---| | [3.10](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [3.11](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [3.12](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (?)` | | | [3.8](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [3.9](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [macos-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [ubuntu-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | | [windows-latest](https://app.codecov.io/gh/pylint-dev/pylint-pytest/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev) | `93.98% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pylint-dev#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stdedos commented 10 months ago

Let's do a direct-to-pyproject conversion instead, after we release the last pylint<3 fixes.

WDYT?

If the current setup will do us "one last release", let it be.

I guess I should also be the first name / contact person (with everything redirecting here).

Pierre-Sassoulas commented 10 months ago

Maybe let's release a last version using setup.py first, it's going to be easier to do that if we drop support for python 3.6 first (Also 3.7 is EOL too).

stdedos commented 10 months ago

If py3.6 makes it hard for us to move forward, let's do it.

However, "are there people still depending on it"? 😕 Ubuntu 18.04 LTS shipped with py3.6 (ofc, that is now EOL too - but just saying)

Is there ... some kind of dashboard that would show us downloads/month per python version?

Pierre-Sassoulas commented 10 months ago

proportion_pylint-pytest

https://pypistats.org/packages/pylint-pytest

Seems pretty fine to do.

stdedos commented 10 months ago

Noice graphs

image

Yea, let's do it. But maybe after merging "outstanding issues".

Should we also release a minor after the CI-scaffolding finishes?

stdedos commented 10 months ago

btw, any idea what Null is?

image

They are a "significant force", but given that the 3.6 is max 58 downloads/day (very graciously 1800/mo) - it is a decision I have made already.

stdedos commented 10 months ago

And also yea - let's drop 3.7 too

image

There are some higher spikes - but "all in all", they are at the same level

Activating 3.8 only makes them disappear

image

Pierre-Sassoulas commented 10 months ago

I think we could release alphas to test the release workflow right now, release the last python 3.6 compatible version, then get on the pylint 3.0 compat, and release a new version not compatible with python 3.6 / 3.7 (everything with linter is just nice to have for long term maintenance).

Pierre-Sassoulas commented 10 months ago

WdYT ?

stdedos commented 10 months ago

I was thinking:

https://github.com/pylint-dev/pylint-pytest/milestone/1


https://github.com/pylint-dev/pylint-pytest/milestone/2

Pierre-Sassoulas commented 10 months ago

Step 1/2 in #10

stdedos commented 10 months ago

Probably https://github.com/pylint-dev/pylint-pytest/issues/13 touches here

Pierre-Sassoulas commented 10 months ago

Hmm, pyproject.toml support is easier if we already dropped python 3.6 / 3.7 I would say. Are we dropping 3.6 3.7 in 1.1.3 ? (milestone of this MR should be v2 or 1.2.x ?). Let's see how the pipeline fair after a rebase.

Pierre-Sassoulas commented 10 months ago

I think dropping py 3.6 / 3.7 is great but it contradict https://github.com/pylint-dev/pylint-pytest/pull/8#issuecomment-1763332031 wdyt ?

stdedos commented 10 months ago

idk; I feel like I want to merge the fixes that have been existing for months (years?) before dropping support 😓

Pierre-Sassoulas commented 10 months ago

Ok then blocked by 1.1.3 (#2 and https://github.com/PyCQA/pylint-pytest/pull/1 -- this aim to merge in the pycqa repo, probably the branch need to be changed, or reopened here ?)

stdedos commented 10 months ago

Re-opened here (forks are split because of the archival 😕, and you cannot PR between severed forks)

My personal fork has the branch already there - I just haven't "done it" yet

Pierre-Sassoulas commented 8 months ago

Seems like there's #24 mixed in ? We can close #24 then ?

stdedos commented 8 months ago

Seems like there's #24 mixed in ? We can close #24 then ?

It seems so 😅 Looking back at the commit, I don't really get what fixed it.

The error was highly-esoteric:

  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

  self = <astroid.rebuilder.TreeRebuilder object at 0x7f84bc5d7a70>
  node = <ast.TypeAlias object at 0x7f84bb2ee910>
  parent = <Module.typing l.0 at 0x7f84bc5d5e20>

      def visit(self, node: ast.AST | None, parent: NodeNG) -> NodeNG | None:
          if node is None:
              return None
          cls = node.__class__
          if cls in self._visit_meths:
              visit_method = self._visit_meths[cls]
          else:
              cls_name = cls.__name__
              visit_name = "visit_" + REDIRECT.get(cls_name, cls_name).lower()
  >           visit_method = getattr(self, visit_name)
  E           AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'

(https://github.com/pylint-dev/pylint-pytest/actions/runs/6508313960/job/17677430135?pr=1#step:5:1587, for only a couple of tests: https://github.com/pylint-dev/pylint-pytest/actions/runs/6508313960/job/17677430135?pr=1#step:5:117)

But the Actions are unambiguous: It's fixed:

https://github.com/pylint-dev/pylint-pytest/actions/runs/6754228827/job/18361511074#step:6:165

Pierre-Sassoulas commented 8 months ago

AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'

Astroid was upgraded to be able to handle a new construct from python 3.12

Pierre-Sassoulas commented 8 months ago

Great 🎉 !!