Skip to content

Commit

Permalink
7.1.0 prep and misc bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
threema-eduard committed Jul 30, 2024
1 parent c307886 commit 96f8a76
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.9", "3.8", "3.7"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
event-loop: [asyncio, uvloop]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.9", "3.8", "3.7"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
event-loop: [asyncio, uvloop]

steps:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
*********

`7.1.0`_ (2022-06-13)
---------------------

- Add `GATEWAY_API_URL` environment variable to support custom Message API endpoints
- Add support for Python 3.12
- Drop support for Python versions below 3.8
- Major dependencies bump to increase compatibility with other packages

`7.0.1`_ (2023-02-21)

- Fix parsing of unknown reception capabilities
Expand Down Expand Up @@ -85,6 +93,7 @@ Server:

- Initial publication on PyPI

.. _7.1.0: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/v7.0.1...v7.1.0
.. _7.0.1: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/v6.0.0...v7.0.1
.. _6.0.0: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/v5.0.0...v6.0.0
.. _5.0.0: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/v4.0.0...v5.0.0
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ the Threema gateway. Run the following command to see usage information:
Setting a different API url
---------------------------

The default MsgApi URL points to https://msgapi.threema.ch/.
The default MsgApi URL points to ``https://msgapi.threema.ch/``.

If you are a Threema OnPrem customer or have another reason
to use a different MsgApi endpoint, you may set an environment variable as follows:
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.10
python_version = 3.12
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bdist_wheel]
python-tag = py37.py38.py39.py310
python_tag = py38.py39.py310.py311.py312

[flake8]
max-line-length = 90
Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read(file):
# Check python version
py_version = sys.version_info[:3]
if py_version < (3, 7, 0):
raise Exception("threema.gateway requires Python >= 3.7")
raise Exception("threema.gateway requires Python >= 3.8")

# Test requirements
# Note: These are just tools that aren't required, so a version range
Expand All @@ -41,11 +41,11 @@ def read(file):
'pytest>=7.1.2,<8',
'pytest-asyncio>=0.18.3,<0.19',
'pytest-cov>=3.0.0,<4',
'flake8==4.0.1',
'isort==5.10.1',
'flake8==7.1.0',
'isort==5.13.2',
'collective.checkdocs>=0.2,<0.3',
'Pygments>=2.12.0', # required by checkdocs
'mypy==0.961',
'mypy==1.11.0',
]

setup(
Expand All @@ -59,7 +59,6 @@ def read(file):
'aiohttp>=3.7.3,<4',
'wrapt>=1.10.10,<2',
],
tests_require=tests_require,
extras_require={
'dev': tests_require,
'uvloop': ['uvloop>=0.8.0,<2'],
Expand Down
2 changes: 1 addition & 1 deletion threema/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

__author__ = 'Lennart Grahl <lennart.grahl@gmail.com>'
__status__ = 'Production'
__version__ = '7.0.1'
__version__ = '7.1.0'
feature_level = 3

__all__ = tuple(itertools.chain(
Expand Down
4 changes: 2 additions & 2 deletions threema/gateway/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import mimetypes
import os
import struct
from typing import Tuple
from typing import Optional, Tuple

import libnacl
import libnacl.encode
Expand Down Expand Up @@ -61,7 +61,7 @@
MAX_HTTP_REQUEST_SIZE = 16384


def _pk_encrypt(key_pair: Tuple[Key, Key], data: bytes, nonce: bytes = None):
def _pk_encrypt(key_pair: Tuple[Key, Key], data: bytes, nonce: Optional[bytes] = None):
"""
Encrypt data by using public-key encryption.
Expand Down

0 comments on commit 96f8a76

Please sign in to comment.