Skip to content

Commit a7c7dff

Browse files
authored
prepare release (crossbario#1617)
* prepare release * fix bitarray on pypy * use bitarray trunk * update min python * fix: hash algo must be instance, not class
1 parent f250517 commit a7c7dff

File tree

6 files changed

+28
-23
lines changed

6 files changed

+28
-23
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757

5858
# python 3.11 fails with "src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: No such file or directory"
5959
# twisted doesn't yet support 3.11 formally: https://github.com/twisted/twisted/blob/trunk/pyproject.toml#L24
60-
python-version: ['3.7', '3.11', 'pypy-3.7', 'pypy-3.9']
60+
python-version: ['3.9', '3.11', 'pypy-3.9']
6161
framework: ['asyncio', 'tw2210', 'twtrunk']
6262

6363
# https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
@@ -133,9 +133,7 @@ jobs:
133133
python -m pip install --upgrade pip
134134
pip install -r requirements-dev.txt
135135
136-
- name: Install this package
136+
- name: Install this package and run Sphinx
137137
run: |
138138
pip install .[all]
139-
140-
- name: Run Sphinx
141-
run: tox -c tox.ini -e sphinx
139+
tox -c tox.ini -e sphinx

autobahn/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
#
2525
###############################################################################
2626

27-
__version__ = '23.1.2'
27+
__version__ = '23.6.1'
2828

2929
__build__ = '00000000-0000000'

autobahn/wamp/auth.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,10 @@ def pbkdf2(data, salt, iterations=1000, keylen=32, hashfunc=None):
530530
)
531531

532532
backend = default_backend()
533+
534+
# https://cryptography.io/en/latest/hazmat/primitives/key-derivation-functions/#pbkdf2
533535
kdf = PBKDF2HMAC(
534-
algorithm=getattr(hashes, hashfunc.upper()),
536+
algorithm=getattr(hashes, hashfunc.upper())(),
535537
length=keylen,
536538
salt=salt,
537539
iterations=iterations,

docs/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
Changelog
66
=========
77

8+
23.6.1
9+
------
10+
11+
- fix: updated bitarray to make eth-account work on pypy
12+
- fix: updated web3 and eth-abi to not use beta versions (#1616)
13+
814
23.1.2
915
------
1016

setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from setuptools.command.test import test as test_command
3333

3434
CPY = platform.python_implementation() == 'CPython'
35+
PYPY = platform.python_implementation() == 'PyPy'
3536

3637
# read version string
3738
with open('autobahn/_version.py') as f:
@@ -115,6 +116,11 @@
115116
# https://peps.python.org/pep-0440/#direct-references
116117
# https://stackoverflow.com/a/63688209/884770
117118
extras_require_xbr = [
119+
# bitarray is required by eth-account, but on pypy
120+
# see discussion/links on https://github.com/crossbario/autobahn-python/pull/1617
121+
# 'bitarray>=2.7.5', # PSF
122+
'bitarray @ git+https://github.com/ilanschnell/bitarray.git@master#egg=bitarray',
123+
118124
# XBR contracts and ABI file bundle
119125
'xbr>=21.2.1', # Apache 2.0
120126

@@ -295,7 +301,7 @@ def run_tests(self):
295301

296302
zip_safe=False,
297303

298-
python_requires='>=3.7',
304+
python_requires='>=3.9',
299305

300306
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
301307
classifiers=["License :: OSI Approved :: MIT License",
@@ -306,8 +312,6 @@ def run_tests(self):
306312
"Operating System :: OS Independent",
307313
"Programming Language :: Python",
308314
"Programming Language :: Python :: 3",
309-
"Programming Language :: Python :: 3.7",
310-
"Programming Language :: Python :: 3.8",
311315
"Programming Language :: Python :: 3.9",
312316
"Programming Language :: Python :: 3.10",
313317
"Programming Language :: Python :: 3.11",

tox.ini

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ skip_missing_interpreters = true
33
envlist =
44
flake8
55
sphinx
6-
py37-{tw203,tw2210,twtrunk,asyncio}
6+
py39-{tw203,tw2210,twtrunk,asyncio}
77
# Twisted <22.10 on Python 3.11 fails with:
88
# src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: Datei oder Verzeichnis nicht gefunden
99
py311-{tw2210,twtrunk,asyncio}
10-
pypy37-{tw2210,twtrunk,asyncio}
1110
pypy39-{tw2210,twtrunk,asyncio}
1211

1312

@@ -20,9 +19,8 @@ envlist =
2019
#
2120
[gh-actions]
2221
python =
23-
3.7: py37
22+
3.9: py9
2423
3.11: py311
25-
pypy-3.7: pypy37
2624
pypy-3.9: pypy39
2725

2826

@@ -35,6 +33,10 @@ deps =
3533

3634
; FIXME: https://github.com/ethereum/web3.py/issues/2704#issuecomment-1369041219
3735
git+https://github.com/ethereum/web3.py.git
36+
37+
; UNTIL bitarray is released on pypi with pypy fixes
38+
git+https://github.com/ilanschnell/bitarray.git@master#egg=bitarray
39+
3840
cytoolz
3941

4042
; twisted dependencies
@@ -138,13 +140,6 @@ deps =
138140
sphinx.autoapi
139141
git+https://github.com/crossbario/txaio
140142
git+https://github.com/erikrose/parsimonious.git
141-
extras =
142-
twisted>=22.10.0
143-
encryption
144-
serialization
145-
scram
146-
nvx
147-
xbr
148143
commands =
149144
python -V
150145
sphinx-build --version
@@ -154,8 +149,8 @@ commands =
154149
python -c "from parsimonious.grammar import Grammar, TokenGrammar"
155150
python -c "from eth_abi import abi"
156151

157-
# python -c "from autobahn import xbr; print('HAS_XBR=' + str(xbr.HAS_XBR))"
158-
# python -c "from autobahn import xbr; assert(xbr.HAS_XBR)"
152+
python -c "from autobahn import xbr; print('HAS_XBR=' + str(xbr.HAS_XBR))"
153+
python -c "from autobahn import xbr; assert(xbr.HAS_XBR)"
159154
python -c "from autobahn.websocket.utf8validator import Utf8Validator"
160155

161156
# first test with all warnings fatal

0 commit comments

Comments
 (0)