Skip to content

Commit af8888f

Browse files
firaskafriFiras Kafri
and
Firas Kafri
authored
Upgrade github actions versions, default python and dev dependencies (#1407)
* Use Python 3.10 for deployments on PyPi * Update gh-action-pypi-publish version * Update python version * Update checkout and setup-python versions * Upgrade dev dependencies * fromat examples and few files to follow black new version * Upgrade pytest version --------- Co-authored-by: Firas Kafri <[email protected]>
1 parent c1a22bf commit af8888f

File tree

20 files changed

+21
-38
lines changed

20 files changed

+21
-38
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python 3.9
15-
uses: actions/setup-python@v2
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.10
15+
uses: actions/setup-python@v4
1616
with:
17-
python-version: 3.9
17+
python-version: '3.10'
1818
- name: Build wheel and source tarball
1919
run: |
2020
pip install wheel
2121
python setup.py sdist bdist_wheel
2222
- name: Publish a Python distribution to PyPI
23-
uses: pypa/gh-action-pypi-publish@v1.1.0
23+
uses: pypa/gh-action-pypi-publish@v1.8.6
2424
with:
2525
user: __token__
2626
password: ${{ secrets.pypi_password }}

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v2
11-
- name: Set up Python 3.9
12-
uses: actions/setup-python@v2
10+
- uses: actions/checkout@v3
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v4
1313
with:
14-
python-version: 3.9
14+
python-version: '3.10'
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- django: "3.2"
1515
python-version: "3.7"
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
default_language_version:
2-
python: python3.9
2+
python: python3.10
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.3.0
5+
rev: v4.4.0
66
hooks:
77
- id: check-merge-conflict
88
- id: check-json
@@ -16,15 +16,15 @@ repos:
1616
- id: trailing-whitespace
1717
exclude: README.md
1818
- repo: https://github.com/asottile/pyupgrade
19-
rev: v3.2.0
19+
rev: v3.3.2
2020
hooks:
2121
- id: pyupgrade
2222
args: [--py37-plus]
2323
- repo: https://github.com/psf/black
24-
rev: 22.10.0
24+
rev: 23.3.0
2525
hooks:
2626
- id: black
2727
- repo: https://github.com/PyCQA/flake8
28-
rev: 5.0.4
28+
rev: 6.0.0
2929
hooks:
3030
- id: flake8

examples/cookbook-plain/cookbook/ingredients/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Migration(migrations.Migration):
8-
98
initial = True
109

1110
dependencies = []

examples/cookbook-plain/cookbook/ingredients/migrations/0002_auto_20161104_0050.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("ingredients", "0001_initial"),
109
]

examples/cookbook-plain/cookbook/ingredients/migrations/0003_auto_20181018_1746.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("ingredients", "0002_auto_20161104_0050"),
109
]

examples/cookbook-plain/cookbook/recipes/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Migration(migrations.Migration):
8-
98
initial = True
109

1110
dependencies = [

examples/cookbook-plain/cookbook/recipes/migrations/0002_auto_20161104_0106.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("recipes", "0001_initial"),
109
]

examples/cookbook-plain/cookbook/recipes/migrations/0003_auto_20181018_1728.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("recipes", "0002_auto_20161104_0106"),
109
]

examples/cookbook/cookbook/ingredients/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Migration(migrations.Migration):
8-
98
initial = True
109

1110
dependencies = []

examples/cookbook/cookbook/ingredients/migrations/0002_auto_20161104_0050.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("ingredients", "0001_initial"),
109
]

examples/cookbook/cookbook/recipes/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class Migration(migrations.Migration):
8-
98
initial = True
109

1110
dependencies = [

examples/cookbook/cookbook/recipes/migrations/0002_auto_20161104_0106.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
class Migration(migrations.Migration):
7-
87
dependencies = [
98
("recipes", "0001_initial"),
109
]

graphene_django/filter/tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ class Query(graphene.ObjectType):
8787
events = DjangoFilterConnectionField(EventType)
8888

8989
def resolve_events(self, info, **kwargs):
90-
9190
events = [
9291
Event(name="Live Show", tags=["concert", "music", "rock"]),
9392
Event(name="Musical", tags=["movie", "music"]),

graphene_django/forms/mutation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ class Meta:
8282
def __init_subclass_with_meta__(
8383
cls, form_class=None, only_fields=(), exclude_fields=(), **options
8484
):
85-
8685
if not form_class:
8786
raise Exception("form_class is required for DjangoFormMutation")
8887

@@ -129,7 +128,6 @@ def __init_subclass_with_meta__(
129128
exclude_fields=(),
130129
**options,
131130
):
132-
133131
if not form_class:
134132
raise Exception("form_class is required for DjangoModelFormMutation")
135133

graphene_django/rest_framework/mutation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def __init_subclass_with_meta__(
7272
_meta=None,
7373
**options
7474
):
75-
7675
if not serializer_class:
7776
raise Exception("serializer_class is required for the SerializerMutation")
7877

graphene_django/tests/schema_view.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class QueryRoot(ObjectType):
8-
98
thrower = graphene.String(required=True)
109
request = graphene.String(required=True)
1110
test = graphene.String(who=graphene.String())

graphene_django/tests/test_query.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,6 @@ def resolve_all_reporters(self, info, **args):
780780

781781

782782
def test_should_query_connectionfields_with_last():
783-
784783
r = Reporter.objects.create(
785784
first_name="John", last_name="Doe", email="[email protected]", a_choice=1
786785
)
@@ -818,7 +817,6 @@ def resolve_all_reporters(self, info, **args):
818817

819818

820819
def test_should_query_connectionfields_with_manager():
821-
822820
r = Reporter.objects.create(
823821
first_name="John", last_name="Doe", email="[email protected]", a_choice=1
824822
)

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
tests_require = [
17-
"pytest>=7.1.3",
17+
"pytest>=7.3.1",
1818
"pytest-cov",
1919
"pytest-random-order",
2020
"coveralls",
@@ -26,10 +26,10 @@
2626

2727

2828
dev_requires = [
29-
"black==22.8.0",
30-
"flake8==5.0.4",
31-
"flake8-black==0.3.3",
32-
"flake8-bugbear==22.9.11",
29+
"black==23.3.0",
30+
"flake8==6.0.0",
31+
"flake8-black==0.3.6",
32+
"flake8-bugbear==23.3.23",
3333
"pre-commit",
3434
] + tests_require
3535

0 commit comments

Comments
 (0)