Skip to content

Remove setuptools dependency, improve release process, remove travis #4587

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .copyrite_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,13 @@
],
"authoritative_mail": "[email protected]",
"name": "Matus Valo"
},
{
"mails": [
"66853113+pre-commit-ci[bot]@users.noreply.github.com",
"49699333+dependabot[bot]@users.noreply.github.com"
],
"authoritative_mail": "[email protected]",
"name": "bot"
}
]
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
release:
types:
- published

env:
DEFAULT_PYTHON: 3.9

jobs:
release-pypi:
name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out code from Github
uses: actions/[email protected]
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
run: |
python -m pip install -U pip twine wheel
python -m pip install -U "setuptools>=56.0.0"
- name: Build distributions
run: |
python setup.py sdist bdist_wheel
- name: Upload to PyPI
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
env:
TWINE_REPOSITORY: pypi
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose dist/*
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Release date: TBA
..
Put new features and bugfixes here and also in 'doc/whatsnew/2.9.rst'

* ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not
have hidden runtime dependencies to setuptools

* Appveyor is no longer used in the continuous integration

* Added ``deprecated-decorator``: Emitted when deprecated decorator is used.
Expand Down
69 changes: 24 additions & 45 deletions doc/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,15 @@ So, you want to release the `X.Y.Z` version of pylint ?

## Process

1. Run the acceptance tests to see if everything is alright with this release. We don't
run them on CI: `pytest -m acceptance`
2. Check if the dependencies of the package are correct, make sure astroid is pinned to
1. Check if the dependencies of the package are correct, make sure astroid is pinned to
the latest version.
3. Put the release date into `Changelog` (and `What's new` if it's a major).
4. Generate the new copyright notices for this release:

```bash
pip3 install copyrite
copyrite --contribution-threshold 1 --change-threshold 3 --backend-type \
git --aliases=.copyrite_aliases . --jobs=8
# During the commit pre-commit and pyupgrade will remove the encode utf8
# automatically
```

5. Submit your changes in a merge request.

6. Make sure the tests are passing on Travis/GithubActions:
https://travis-ci.org/PyCQA/pylint/

7. Do the actual release by tagging the master with `vX.Y.Z` (ie `v1.6.12` or `v2.5.3a1`
for example). Travis should deal with the release process once the tag is pushed with
`git push origin --tags`

8. Go to github, click on "Releases" then on the `vX.Y.Z` tag, choose edit tag, and copy
past the changelog in the description.

## Manual Release

Following the previous steps, for a manual release run the following commands:

```bash
git clean -fdx && find . -name '*.pyc' -delete
python setup.py sdist --formats=gztar bdist_wheel
twine upload dist/*
# don't forget to tag it as well
```
2. Put the release date into`What's new` if it's a minor version.
3. Install the release dependencies `pip3 install pre-commit tbump`
4. Bump the version and release by using `tbump X.Y.Z --no-push`.
5. Check the result.
6. Push the tag.
7. Go to GitHub, click on "Releases" then on the `vX.Y.Z` tag, choose edit tag, and copy
past the changelog in the description. This will trigger the release to pypi.

## Post release

Expand All @@ -61,22 +33,29 @@ git push
We move issue that were not done in the next milestone and block release only if it's an
issue labelled as blocker.

### Files to update after releases
### Back to a dev version

#### setup.cfg
1. Unpin the version of astroid, so it's possible to install a dev version during
development
2. Move back to a dev version for pylint with `tbump`:

- Unpin the version of astroid, so it's possible to install a dev version during
development
```bash
tbump X.Y.Z-dev0 --no-tag --no-push # You can interrupt during copyrite
```

Check the result and then upgrade the master branch

#### Changelog

- Create a new section, with the name of the release `X.Y.Z+1` or `X.Y+1.0` on the
master branch.
If it was a minor release add a `X.Y+1.0` title following the template:

You need to add the estimated date when it is going to be published. If no date can be
known at that time, we should use `Undefined`.
```text
What's New in pylint x.y.z?
============================
Release Date: TBA
```

#### Whatsnew

If it's a major release, create a new `What's new in Pylint X.Y+1` document Take a look
If it's a minor release, create a new `What's new in Pylint X.Y+1` document Take a look
at the examples from `doc/whatsnew`.
7 changes: 1 addition & 6 deletions pylint/__pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
from typing import Tuple

from pkg_resources import DistributionNotFound, get_distribution

try:
__version__ = get_distribution("pylint").version
except DistributionNotFound:
__version__ = "2.8.2+"
__version__ = "2.9.0-dev1"


def get_numversion_from_version(v: str) -> Tuple:
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
# Copyright (c) 2020 Benny <[email protected]>
# Copyright (c) 2020 Anubhav <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 David Liu <[email protected]>
# Copyright (c) 2021 Andreas Finkler <[email protected]>
# Copyright (c) 2021 Or Bahari <[email protected]>

Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
# Copyright (c) 2019 Pascal Corpet <[email protected]>
# Copyright (c) 2020 GergelyKalmar <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>
# Copyright (c) 2021 Konstantina Saketou <[email protected]>
# Copyright (c) 2021 James Sinclair <[email protected]>
# Copyright (c) 2021 tiagohonorato <[email protected]>

Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/design_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Ram Rachum <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
3 changes: 2 additions & 1 deletion pylint/checkers/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
# Copyright (c) 2020 Peter Kolbus <[email protected]>
# Copyright (c) 2020 Damien Baty <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Andrew Howe <[email protected]>
# Copyright (c) 2021 Matus Valo <[email protected]>
# Copyright (c) 2021 Andrew Howe <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (c) 2019 Djailla <[email protected]>
# Copyright (c) 2019 Svet <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE

Expand Down
2 changes: 1 addition & 1 deletion pylint/checkers/mapreduce_checker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2020 Frank Harrison <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Pierre Sassoulas <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/python3.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# Copyright (c) 2020 Federico Bond <[email protected]>
# Copyright (c) 2020 Athos Ribeiro <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Tiago Honorato <[email protected]>
# Copyright (c) 2021 tiagohonorato <[email protected]>
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/similar.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# Copyright (c) 2020 Eli Fine <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Shiv Venkatasubrahmanyam <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Aditya Gupta <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (c) 2020 Ganden Schaffner <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Damien Baty <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Andreas Finkler <[email protected]>
# Copyright (c) 2021 Eli Fine <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion pylint/checkers/stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 谭九鼎 <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Matus Valo <[email protected]>
# Copyright (c) 2021 victor <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# Copyright (c) 2020 谭九鼎 <[email protected]>
# Copyright (c) 2020 Anthony <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Peter Kolbus <[email protected]>


# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2020 Anubhav <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>
# Copyright (c) 2021 Andrew Haigh <[email protected]>
# Copyright (c) 2021 Jens H. Nielsen <[email protected]>
# Copyright (c) 2021 Ikraduya Edian <[email protected]>

Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
# Copyright (c) 2020 Slavfox <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/extensions/_check_docs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# Copyright (c) 2019 Hugo van Kemenade <[email protected]>
# Copyright (c) 2019 Danny Hermes <[email protected]>
# Copyright (c) 2019 Zeb Nicholls <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Pierre Sassoulas <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/pyreverse/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Copyright (c) 2020 yeting li <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2020 bernie gray <[email protected]>
# Copyright (c) 2021 Andreas Finkler <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions pylint/reporters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Copyright (c) 2019, 2021 Pierre Sassoulas <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 ruro <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/reporters/ureports/text_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright (c) 2019-2021 Pierre Sassoulas <[email protected]>
# Copyright (c) 2019 Hugo van Kemenade <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2021 bot <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
Expand Down
1 change: 1 addition & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
coveralls~=3.1
coverage~=5.5
pre-commit~=2.13;python_full_version>="3.6.2"
tbump~=6.3.2
pyenchant~=3.2
pytest-cov~=2.12
pytest-profiling~=1.7
Expand Down
Loading