Skip to content

Commit

Permalink
Merge pull request #367 from y0urself/drop-35-36-support
Browse files Browse the repository at this point in the history
Dropping the support for Python 3.5 and 3.6, adding Python 3.9
  • Loading branch information
y0urself authored Jan 5, 2021
2 parents 3de2900 + ada35a0 commit 4e00127
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 275 deletions.
43 changes: 15 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
version: 2.1

executors:
python-35:
docker:
- image: circleci/python:3.5
working_directory: ~/repo
python-36:
docker:
- image: circleci/python:3.6
working_directory: ~/repo

python-37:
docker:
- image: circleci/python:3.7
Expand All @@ -17,6 +10,10 @@ executors:
docker:
- image: circleci/python:3.8
working_directory: ~/repo
python-39:
docker:
- image: circleci/python:3.9
working_directory: ~/repo

commands:
build:
Expand Down Expand Up @@ -97,22 +94,6 @@ commands:
poetry run twine upload dist/*
jobs:
build-35:
executor: python-35
steps:
- build
test-35:
executor: python-35
steps:
- test
build-36:
executor: python-36
steps:
- build
test-36:
executor: python-36
steps:
- test
build-37:
executor: python-37
steps:
Expand All @@ -129,6 +110,14 @@ jobs:
executor: python-38
steps:
- test
build-39:
executor: python-39
steps:
- build
test-39:
executor: python-39
steps:
- test
lint-37:
executor: python-37
steps:
Expand All @@ -143,15 +132,13 @@ workflows:
version: 2
build_and_test:
jobs:
- build-35
- test-35
- build-36
- test-36
- build-37
- test-37
- lint-37
- build-38
- test-38
- build-39
- test-39
build_and_deploy:
jobs:
- build-37:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Added
* CI tests Python 3.9 now. [#367](https://github.com/greenbone/python-gvm/pull/367)

### Changed
### Deprecated
* Dropped Python 3.5 and Python 3.6 support. Python 3.7+ is required now. [#367](https://github.com/greenbone/python-gvm/pull/367)

### Removed
### Fixed
* Add missing types and functions to "latest" GMP [#369](https://github.com/greenbone/python-gvm/pull/369)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The current release of `python-gvm` can be used with all supported GOS versions.

### Requirements

Python 3.5 and later is supported.
Python 3.7 and later is supported.

### Install using pip

Expand Down
6 changes: 3 additions & 3 deletions gvm/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def __init__(
hostname: Optional[str] = DEFAULT_HOSTNAME,
port: Optional[int] = DEFAULT_SSH_PORT,
username: Optional[str] = DEFAULT_SSH_USERNAME,
password: Optional[str] = DEFAULT_SSH_PASSWORD
password: Optional[str] = DEFAULT_SSH_PASSWORD,
):
super().__init__(timeout=timeout)

Expand Down Expand Up @@ -294,7 +294,7 @@ def __init__(
hostname: Optional[str] = DEFAULT_HOSTNAME,
port: Optional[int] = DEFAULT_GVM_PORT,
password: Optional[str] = None,
timeout: Optional[int] = DEFAULT_TIMEOUT
timeout: Optional[int] = DEFAULT_TIMEOUT,
):
super().__init__(timeout=timeout)

Expand Down Expand Up @@ -348,7 +348,7 @@ def __init__(
self,
*,
path: Optional[str] = DEFAULT_UNIX_SOCKET_PATH,
timeout: Optional[int] = DEFAULT_TIMEOUT
timeout: Optional[int] = DEFAULT_TIMEOUT,
):
super().__init__(timeout=timeout)

Expand Down
6 changes: 3 additions & 3 deletions gvm/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
message: Optional[str] = None,
*,
argument: Optional[str] = None,
function: Optional[str] = None
function: Optional[str] = None,
):
super().__init__(message, argument, function)
self.argument = argument
Expand Down Expand Up @@ -146,7 +146,7 @@ def __init__(
argument: str = None,
arg_type: str = None,
*,
function: Optional[str] = None
function: Optional[str] = None,
):
# pylint: disable=super-init-not-called
self.argument = argument
Expand Down Expand Up @@ -180,7 +180,7 @@ def __init__(
message: Optional[str] = None,
*,
argument: Optional[str] = None,
function: Optional[str] = None
function: Optional[str] = None,
):
super().__init__(message, argument, function)
self.argument = argument
Expand Down
2 changes: 1 addition & 1 deletion gvm/protocols/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
self._connection = connection

Expand Down
2 changes: 1 addition & 1 deletion gvm/protocols/gmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=EtreeCheckCommandTransform())
self._gmp_transform = transform
Expand Down
2 changes: 1 addition & 1 deletion gvm/protocols/gmpv208/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=transform)

Expand Down
10 changes: 5 additions & 5 deletions gvm/protocols/gmpv208/gmpv208.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=transform)

Expand All @@ -68,7 +68,7 @@ def create_agent(
*,
comment: Optional[str] = None,
howto_install: Optional[str] = None,
howto_use: Optional[str] = None
howto_use: Optional[str] = None,
) -> None:
# pylint: disable=unused-argument
deprecation(
Expand All @@ -94,7 +94,7 @@ def modify_agent(
agent_id: str,
*,
name: Optional[str] = None,
comment: Optional[str] = None
comment: Optional[str] = None,
) -> None:
# pylint: disable=unused-argument
deprecation(
Expand Down Expand Up @@ -147,7 +147,7 @@ def get_info_list(
filter: Optional[str] = None,
filter_id: Optional[str] = None,
name: Optional[str] = None,
details: Optional[bool] = None
details: Optional[bool] = None,
) -> Any:
"""Request a list of security information
Expand Down Expand Up @@ -244,7 +244,7 @@ def create_target(
reverse_lookup_only: Optional[bool] = None,
reverse_lookup_unify: Optional[bool] = None,
port_range: Optional[str] = None,
port_list_id: Optional[str] = None
port_list_id: Optional[str] = None,
) -> Any:
"""Create a new target
Expand Down
2 changes: 1 addition & 1 deletion gvm/protocols/gmpv214/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=transform)

Expand Down
12 changes: 6 additions & 6 deletions gvm/protocols/gmpv214/gmpv214.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=transform)

Expand All @@ -73,7 +73,7 @@ def create_note(
result_id: Optional[str] = None,
severity: Optional[Severity] = None,
task_id: Optional[str] = None,
threat: Optional[SeverityLevel] = None
threat: Optional[SeverityLevel] = None,
) -> Any:
"""Create a new note
Expand Down Expand Up @@ -149,7 +149,7 @@ def create_override(
new_severity: Optional[Severity] = None,
task_id: Optional[str] = None,
threat: Optional[SeverityLevel] = None,
new_threat: Optional[SeverityLevel] = None
new_threat: Optional[SeverityLevel] = None,
) -> Any:
"""Create a new override
Expand Down Expand Up @@ -237,7 +237,7 @@ def modify_note(
result_id: Optional[str] = None,
severity: Optional[Severity] = None,
task_id: Optional[str] = None,
threat: Optional[SeverityLevel] = None
threat: Optional[SeverityLevel] = None,
) -> Any:
"""Modifies an existing note.
Expand Down Expand Up @@ -312,7 +312,7 @@ def modify_override(
new_severity: Optional[Severity] = None,
task_id: Optional[str] = None,
threat: Optional[SeverityLevel] = None,
new_threat: Optional[SeverityLevel] = None
new_threat: Optional[SeverityLevel] = None,
) -> Any:
"""Modifies an existing override.
Expand Down Expand Up @@ -402,7 +402,7 @@ def modify_user(
hosts_allow: Optional[bool] = False,
ifaces: Optional[List[str]] = None,
ifaces_allow: Optional[bool] = False,
group_ids: Optional[List[str]] = None
group_ids: Optional[List[str]] = None,
) -> Any:

"""Modifies an existing user. Most of the fields need to be supplied
Expand Down
2 changes: 1 addition & 1 deletion gvm/protocols/gmpv7/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
self,
connection: GvmConnection,
*,
transform: Optional[Callable[[str], Any]] = None
transform: Optional[Callable[[str], Any]] = None,
):
super().__init__(connection, transform=transform)

Expand Down
Loading

0 comments on commit 4e00127

Please sign in to comment.