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

Migrate setup.py to pyproject.toml #8

Merged
merged 17 commits into from
Dec 19, 2023
Merged

Migrate setup.py to pyproject.toml #8

merged 17 commits into from
Dec 19, 2023

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Oct 14, 2023

Additionally, fixes #3

@Pierre-Sassoulas Pierre-Sassoulas added the enhancement New feature or request label Oct 14, 2023
@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
@@            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 Coverage Δ
3.10 93.98% <100.00%> (+0.01%) ⬆️
3.11 93.98% <100.00%> (+0.01%) ⬆️
3.12 93.98% <100.00%> (?)
3.8 93.98% <100.00%> (+0.01%) ⬆️
3.9 93.98% <100.00%> (+0.01%) ⬆️
macos-latest 93.98% <100.00%> (+0.01%) ⬆️
ubuntu-latest 93.98% <100.00%> (+0.01%) ⬆️
windows-latest 93.98% <100.00%> (+0.01%) ⬆️

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.

@stdedos
Copy link
Collaborator

stdedos commented Oct 14, 2023

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 Pierre-Sassoulas changed the title Migrate setup.py to setup.cfg Migrate setup.py to setup.cfg / pyproject.toml Oct 14, 2023
Copy link
Member Author

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

I defered changing the actual content of the metadata to another PR because it's hard enough to review as is 😄 But yeah it should be changed (at least the version)

@Pierre-Sassoulas
Copy link
Member Author

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).

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft October 14, 2023 18:01
@stdedos
Copy link
Collaborator

stdedos commented Oct 15, 2023

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
Copy link
Member Author

Pierre-Sassoulas commented Oct 15, 2023

proportion_pylint-pytest

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

Seems pretty fine to do.

@stdedos
Copy link
Collaborator

stdedos commented Oct 15, 2023

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
Copy link
Collaborator

stdedos commented Oct 15, 2023

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
Copy link
Collaborator

stdedos commented Oct 15, 2023

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
Copy link
Member Author

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
Copy link
Member Author

Pierre-Sassoulas commented Oct 15, 2023

WdYT ?

@stdedos
Copy link
Collaborator

stdedos commented Oct 15, 2023

I was thinking:

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


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

@Pierre-Sassoulas
Copy link
Member Author

Step 1/2 in #10

@stdedos
Copy link
Collaborator

stdedos commented Oct 15, 2023

Probably #13 touches here

pyproject.toml Outdated Show resolved Hide resolved
@stdedos stdedos changed the title Migrate setup.py to setup.cfg / pyproject.toml Migrate setup.py to pyproject.toml Oct 15, 2023
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review October 17, 2023 13:27
# By Stavros Ntentos (14) and others
# Via GitHub (10) and Stavros Ntentos (1)
* master:
  Update/Prepare Changelog for v1.1.7
  use pylint v3 in the repo
  remove support of pylint v1
  Support pylint v3
  Release v1.1.6
  Minor `.github/ISSUE_TEMPLATE/bug_report.md` improvement
  Release v1.1.5
  Improve copy-paste docstring from 8756cc4
  Fix tests running via PyCharm
  Move `--cov-report=html` to `addopts`
  Windows Artifacts have incorrect Slugification
  Release v1.1.4
  Extend coverage for `if node.name in FixtureChecker._pytest_fixtures[fixname][0].argnames:`
  Make `nsp/nate/better-unused-argument` merge-able with `origin/master`
  Improve `F6401`:`cannot-enumerate-pytest-fixtures`:
  🐛 Ignore collection failures in non-tests
  removes more false positives for unused-argument

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>

# Conflicts:
#	.github/workflows/run-tests.yaml
#	CHANGELOG.md
#	setup.py
#	tests/base_tester.py
#	tox.ini

Additionally, some minor format modifications at `CHANGELOG.md`
This reverts commit b8ce4ad.

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Pierre-Sassoulas added a commit that referenced this pull request Dec 3, 2023
* Move everything from the setup.cfg to pyproject.toml

* Drop python 3.6 and 3.7

#8 (comment)

* Upgrade python version to python 3.8 in tooling configuration

Co-authored-by: Irtaza Akram <irtaza.akram@arbisoft.com>

---------

Co-authored-by: Irtaza Akram <irtaza.akram@arbisoft.com>
Co-authored-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
# By Pierre Sassoulas (3) and Stavros Ntentos (1)
* master:
  Release v1.1.7
  Upgrade python version to python 3.8 in tooling configuration
  Drop python 3.6 and 3.7
  Move everything from the setup.cfg to pyproject.toml

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
@stdedos stdedos removed the blocked label Dec 4, 2023
setup.py Outdated Show resolved Hide resolved
Pierre-Sassoulas and others added 3 commits December 4, 2023 09:46
Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
@Pierre-Sassoulas
Copy link
Member Author

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

@stdedos
Copy link
Collaborator

stdedos commented Dec 19, 2023

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
Copy link
Member Author

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

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

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Copy link
Collaborator

@stdedos stdedos left a comment

Choose a reason for hiding this comment

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

🎉 🎉 🎉 🎉 🎉

@stdedos stdedos merged commit f559398 into master Dec 19, 2023
33 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the migrate-to-setup.cfg branch December 19, 2023 15:56
@Pierre-Sassoulas
Copy link
Member Author

Great 🎉 !!

stdedos added a commit that referenced this pull request Feb 2, 2024
# Added

* Migrate setup.py to pyproject.toml (#8)
* Support for Python 3.12 (#3,
  "side effect" of #8)
* Introduced @dependabot (part of #28)
* Improved reliability of the `FixtureChecker` class (#29)

# Removed

* Support for Python 3.6 & 3.7 (#23)

# Improved

* Increased reproducibility of the project, by using `pip-compile` for the development dependencies
  (#28, small bugfix in #39)
* Minor CI + License updates (in 29f0c33, e0e529a, 8f56d1c)

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
stdedos added a commit that referenced this pull request Feb 2, 2024
# Added

* Increased reproducibility of the project, by using `pip-compile` for the development dependencies
  (#28, small bugfix in #39)
* Introduced @dependabot (part of #28)

# Removed

* Support for Python 3.6 & 3.7 (#23)

# Improved

* Migrate setup.py to pyproject.toml (#8)
* Support for Python 3.12 (#3,
  "side effect" of #8)
* Improved reliability of the `FixtureChecker` class (#29)
* Minor CI + License updates (in 29f0c33, e0e529a, 8f56d1c)

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
stdedos added a commit that referenced this pull request Feb 2, 2024
# Added

* Increased reproducibility of the project, by using `pip-compile` for the development dependencies
  (#28, small bugfix in #39)
* Introduced @dependabot (part of #28)

# Removed

* Support for Python 3.6 & 3.7 (#23)

# Improved

* Migrate setup.py to pyproject.toml (#8)
* Support for Python 3.12 (#3,
  "side effect" of #8)
* Improved reliability of the `FixtureChecker` class (#29)
* Minor CI + License updates (in 29f0c33, e0e529a, 8f56d1c)

Signed-off-by: Stavros Ntentos <133706+stdedos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Python3.12 compatibility
2 participants