Skip to content

Commit

Permalink
prepare release (#1617)
Browse files Browse the repository at this point in the history
* prepare release
* fix bitarray on pypy
* use bitarray trunk
* update min python
* fix: hash algo must be instance, not class
  • Loading branch information
oberstet committed Jun 4, 2023
1 parent f250517 commit a7c7dff
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/main.yml
Expand Up @@ -57,7 +57,7 @@ jobs:

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

# https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
Expand Down Expand Up @@ -133,9 +133,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Install this package
- name: Install this package and run Sphinx
run: |
pip install .[all]
- name: Run Sphinx
run: tox -c tox.ini -e sphinx
tox -c tox.ini -e sphinx
2 changes: 1 addition & 1 deletion autobahn/_version.py
Expand Up @@ -24,6 +24,6 @@
#
###############################################################################

__version__ = '23.1.2'
__version__ = '23.6.1'

__build__ = '00000000-0000000'
4 changes: 3 additions & 1 deletion autobahn/wamp/auth.py
Expand Up @@ -530,8 +530,10 @@ def pbkdf2(data, salt, iterations=1000, keylen=32, hashfunc=None):
)

backend = default_backend()

# https://cryptography.io/en/latest/hazmat/primitives/key-derivation-functions/#pbkdf2
kdf = PBKDF2HMAC(
algorithm=getattr(hashes, hashfunc.upper()),
algorithm=getattr(hashes, hashfunc.upper())(),
length=keylen,
salt=salt,
iterations=iterations,
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.rst
Expand Up @@ -5,6 +5,12 @@
Changelog
=========

23.6.1
------

- fix: updated bitarray to make eth-account work on pypy
- fix: updated web3 and eth-abi to not use beta versions (#1616)

23.1.2
------

Expand Down
10 changes: 7 additions & 3 deletions setup.py
Expand Up @@ -32,6 +32,7 @@
from setuptools.command.test import test as test_command

CPY = platform.python_implementation() == 'CPython'
PYPY = platform.python_implementation() == 'PyPy'

# read version string
with open('autobahn/_version.py') as f:
Expand Down Expand Up @@ -115,6 +116,11 @@
# https://peps.python.org/pep-0440/#direct-references
# https://stackoverflow.com/a/63688209/884770
extras_require_xbr = [
# bitarray is required by eth-account, but on pypy
# see discussion/links on https://github.com/crossbario/autobahn-python/pull/1617
# 'bitarray>=2.7.5', # PSF
'bitarray @ git+https://github.com/ilanschnell/bitarray.git@master#egg=bitarray',

# XBR contracts and ABI file bundle
'xbr>=21.2.1', # Apache 2.0

Expand Down Expand Up @@ -295,7 +301,7 @@ def run_tests(self):

zip_safe=False,

python_requires='>=3.7',
python_requires='>=3.9',

# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=["License :: OSI Approved :: MIT License",
Expand All @@ -306,8 +312,6 @@ def run_tests(self):
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
21 changes: 8 additions & 13 deletions tox.ini
Expand Up @@ -3,11 +3,10 @@ skip_missing_interpreters = true
envlist =
flake8
sphinx
py37-{tw203,tw2210,twtrunk,asyncio}
py39-{tw203,tw2210,twtrunk,asyncio}
# Twisted <22.10 on Python 3.11 fails with:
# src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: Datei oder Verzeichnis nicht gefunden
py311-{tw2210,twtrunk,asyncio}
pypy37-{tw2210,twtrunk,asyncio}
pypy39-{tw2210,twtrunk,asyncio}


Expand All @@ -20,9 +19,8 @@ envlist =
#
[gh-actions]
python =
3.7: py37
3.9: py9
3.11: py311
pypy-3.7: pypy37
pypy-3.9: pypy39


Expand All @@ -35,6 +33,10 @@ deps =

; FIXME: https://github.com/ethereum/web3.py/issues/2704#issuecomment-1369041219
git+https://github.com/ethereum/web3.py.git

; UNTIL bitarray is released on pypi with pypy fixes
git+https://github.com/ilanschnell/bitarray.git@master#egg=bitarray

cytoolz

; twisted dependencies
Expand Down Expand Up @@ -138,13 +140,6 @@ deps =
sphinx.autoapi
git+https://github.com/crossbario/txaio
git+https://github.com/erikrose/parsimonious.git
extras =
twisted>=22.10.0
encryption
serialization
scram
nvx
xbr
commands =
python -V
sphinx-build --version
Expand All @@ -154,8 +149,8 @@ commands =
python -c "from parsimonious.grammar import Grammar, TokenGrammar"
python -c "from eth_abi import abi"

# python -c "from autobahn import xbr; print('HAS_XBR=' + str(xbr.HAS_XBR))"
# python -c "from autobahn import xbr; assert(xbr.HAS_XBR)"
python -c "from autobahn import xbr; print('HAS_XBR=' + str(xbr.HAS_XBR))"
python -c "from autobahn import xbr; assert(xbr.HAS_XBR)"
python -c "from autobahn.websocket.utf8validator import Utf8Validator"

# first test with all warnings fatal
Expand Down

0 comments on commit a7c7dff

Please sign in to comment.