Skip to content

Commit e554854

Browse files
authored
Merge pull request #49 from illuin-tech/python-3.11
Add Python 3.11 compatibility
2 parents 843150b + fafd253 commit e554854

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10' ]
14+
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]
1515

1616
steps:
1717
- uses: actions/checkout@v3
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
py.test --cov-report xml --cov-report term --cov=opyoid ./tests ./tests_e2e
2929
- name: Codecov
30-
if: matrix.python-version == '3.10'
30+
if: matrix.python-version == '3.11'
3131
uses: codecov/codecov-action@v3
3232
with:
3333
fail_ci_if_error: true
@@ -37,7 +37,7 @@ jobs:
3737
strategy:
3838
matrix:
3939
# python 3.6 has too many false positives
40-
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
40+
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
4141

4242
steps:
4343
- uses: actions/checkout@v3
@@ -55,7 +55,7 @@ jobs:
5555
- name: Lint with pylint
5656
run: |
5757
pylint opyoid
58-
pylint tests tests_e2e --disable=too-many-public-methods,no-self-use,too-many-instance-attributes,too-many-lines
58+
pylint tests tests_e2e --disable=too-many-public-methods,too-many-instance-attributes,too-many-lines
5959
6060
deploy:
6161
needs: [ test, lint ]

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Opyoid follows [semver guidelines](https://semver.org) for versioning.
44

55
## Unreleased
6+
## 1.7.0
67
### Features
8+
- Add official support for Python 3.11
79
- Opyoid is now PEP561 compliant, and as such compatible with mypy
810
- Added a Context Scope that can be used to control more precisely the scope of created objects:
911
```python

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Run `python -m unitttest discover` to run the tests.
2222
Run these commands to check the files linting:
2323
```shell script
2424
pylint opyoid
25-
pylint tests tests_e2e --disable=too-many-public-methods,no-self-use,too-many-instance-attributes
25+
pylint tests tests_e2e --disable=too-many-public-methods,too-many-instance-attributes
2626
```

dev.requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
-e .
33

44
# Linting
5-
pylint==2.11.1
6-
black==22.8.0
5+
pylint==2.15.5; python_version >= '3.7'
6+
black==22.10.0; python_version >= '3.7'
77

88
# Publish
9-
twine==3.4.2
10-
setuptools==58.3.0
11-
wheel==0.37.1
9+
twine==4.0.1; python_version >= '3.7'
10+
setuptools==65.5.1; python_version >= '3.7'
11+
wheel==0.38.4; python_version >= '3.7'
1212

1313
# Coverage
1414
pytest-cov==4.0.0

opyoid/bindings/abstract_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def configure(self) -> None:
5252

5353
def install(self, module: Union["AbstractModule", Type["AbstractModule"]]) -> None:
5454
"""Adds bindings from another Module to this one."""
55-
# pylint: disable=import-outside-toplevel
55+
# pylint: disable=import-outside-toplevel, cyclic-import
5656
from .private_module import PrivateModule
5757

5858
module_instance = self._get_module_instance(module)

opyoid/type_checker/pep484_type_checker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def is_named(target_type: Type) -> bool:
3838
@staticmethod
3939
def is_union(target_type: Type) -> bool:
4040
"""Returns True if target_type is Union[<Any>, <Any>...] or Optional[<Any>]"""
41-
# pylint: disable=comparison-with-callable
4241
return isinstance(target_type, _Union) and target_type.__origin__ == Union
4342

4443
@staticmethod

opyoid/type_checker/pep560_type_checker.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pylint: disable=no-name-in-module
21
# noinspection PyUnresolvedReferences,PyProtectedMember
32
from typing import _GenericAlias, Type, Union
43

@@ -38,7 +37,6 @@ def is_named(target_type: Type) -> bool:
3837
@staticmethod
3938
def is_union(target_type: Type) -> bool:
4039
"""Returns True if target_type is Union[<Any>, <Any>...] or Optional[<Any>]"""
41-
# pylint: disable=comparison-with-callable
4240
return isinstance(target_type, _GenericAlias) and target_type.__origin__ == Union
4341

4442
@staticmethod

0 commit comments

Comments
 (0)