Skip to content

Commit f50841f

Browse files
committed
Set version 1.0.5
- Add official support for Python 3.13 - Refactor `distutils` -> `setuptools` - Refactor deprecated methods
1 parent ffbe01f commit f50841f

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

.github/workflows/python-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
python-version: ["3.9", "3.10", "3.11"]
20-
18+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2119
steps:
2220
- uses: actions/checkout@v3
2321
- name: Set up Python ${{ matrix.python-version }}
2422
uses: actions/setup-python@v3
2523
with:
2624
python-version: ${{ matrix.python-version }}
2725
- name: Install dependencies
28-
run: python -m pip install --upgrade pip tox
26+
run: python -m pip install -U pip tox build
2927
- name: Tox
3028
run: tox
29+
- name: Build
30+
run: python -m build

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ the sha3 module directly and rather go through the hashlib interface:
8383
Changelog
8484
---------
8585

86+
### pysha3 1.0.5
87+
88+
- Make pysha3 compatible with Python 3.13
89+
- Refactor deployment process to use `build`
90+
91+
### pysha3 1.0.4
92+
93+
- Make pysha3 compatible with Python 3.11
94+
8695
### pysha3 1.0.3-dev
8796

8897
*Unreleased*

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
import os
33
import subprocess
44
import sys
5-
from distutils.core import Command
65
from glob import glob
76
try:
8-
from setuptools import setup, Extension
7+
from setuptools import setup, Extension, Command
98
except ImportError:
10-
from distutils.core import setup
9+
from distutils.core import setup, Command
1110
from distutils.extension import Extension
1211

1312

@@ -89,7 +88,7 @@ def run(self):
8988

9089
setup(
9190
name="safe-pysha3",
92-
version="1.0.4",
91+
version="1.0.5",
9392
ext_modules=exts,
9493
py_modules=["sha3"],
9594
cmdclass={"test": TestCommand},
@@ -101,7 +100,7 @@ def run(self):
101100
keywords="sha3 sha-3 keccak hash",
102101
platforms="POSIX, Windows",
103102
license="PSFL (Keccak: CC0 1.0 Universal)",
104-
description="SHA-3 (Keccak) for Python 3.9 - 3.11",
103+
description="SHA-3 (Keccak) for Python 3.9 - 3.13",
105104
long_description="\n".join(long_description),
106105
classifiers=[
107106
"Development Status :: 4 - Beta",
@@ -119,6 +118,8 @@ def run(self):
119118
"Programming Language :: Python :: 3.9",
120119
"Programming Language :: Python :: 3.10",
121120
"Programming Language :: Python :: 3.11",
121+
"Programming Language :: Python :: 3.12",
122+
"Programming Language :: Python :: 3.13",
122123
"Topic :: Security :: Cryptography",
123124
],
124125
options={

tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_hmac(self):
172172

173173
class BaseKeccakTests(BaseSHA3Tests):
174174
def test_hashlib(self):
175-
self.failIf(hasattr(hashlib, self.name))
175+
self.assertFalse(hasattr(hashlib, self.name))
176176

177177

178178
class BaseShakeTests(BaseSHA3Tests):
@@ -332,13 +332,14 @@ class Keccak_512Tests(BaseKeccakTests):
332332

333333
def test_main():
334334
suite = unittest.TestSuite()
335+
loader = unittest.TestLoader()
335336
classes = [
336337
SHA3_224Tests, SHA3_256Tests, SHA3_384Tests, SHA3_512Tests,
337338
Shake_128Tests, Shake_256Tests,
338339
Keccak_224Tests, Keccak_256Tests, Keccak_384Tests, Keccak_512Tests,
339340
]
340341
for cls in classes:
341-
suite.addTests(unittest.makeSuite(cls))
342+
suite.addTests(loader.loadTestsFromTestCase(cls))
342343
return suite
343344

344345

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ skip_missing_interpreters=True
33

44
[testenv]
55
commands={envpython} setup.py test
6+
deps=
7+
setuptools
68

79
[flake8]
810
exclude = .tox,*.egg,.git,build,dist

0 commit comments

Comments
 (0)