Skip to content

Commit 0ed63c4

Browse files
fametranopre-commit-ci[bot]giacomocaironi
authored
Post release (#115)
* dropped python 3.7 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Bump version --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Giacomo Caironi <giacomo.caironi@gmail.com>
1 parent 600cb13 commit 0ed63c4

File tree

11 files changed

+21
-22
lines changed

11 files changed

+21
-22
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9", "pypy3.10"]
20+
python: ["3.8", "3.9", "3.10", "3.11", "pypy3.9", "pypy3.10"]
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v3

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757
rev: v3.9.0
5858
hooks:
5959
- id: pyupgrade
60-
args: [--py37-plus]
60+
args: [--py38-plus]
6161
# exclude: *fixtures
6262
language: python
6363
types: [python]

.sourcery.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# 📚 For a complete reference to this file, see the documentation at
88
# https://docs.sourcery.ai/Configuration/Project-Settings/
99

10-
# This file was auto-generated by Sourcery on 2023-01-01 at 13:20.
10+
# This file was auto-generated by Sourcery on 2023-07-08 at 01:13.
1111

1212
version: "1" # The schema version of this config file
1313

@@ -18,6 +18,8 @@ ignore: # A list of paths or files which Sourcery will ignore.
1818
- env
1919
- .env
2020
- .tox
21+
- node_modules
22+
- vendor
2123

2224
rule_settings:
2325
enable:
@@ -27,12 +29,13 @@ rule_settings:
2729
- refactoring
2830
- suggestion
2931
- comment
30-
python_version: "3.7" # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
32+
python_version: "3.8" # A string specifying the lowest Python version your project supports. Sourcery will not suggest refactorings requiring a higher Python version.
3133

3234
# rules: # A list of custom rules Sourcery will include in its analysis.
3335
# - id: no-print-statements
3436
# description: Do not use print statements in the test directory.
3537
# pattern: print(...)
38+
# language: python
3639
# replacement:
3740
# condition:
3841
# explanation:

HISTORY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ Notable changes to the codebase are documented here.
55
Release names follow *[calendar versioning](https://calver.org/)*:
66
full year, short month, short day (YYYY-M-D)
77

8+
## v2023.8 (work in progress, not released yet)
9+
10+
Major changes includes:
11+
12+
- dropped python 3.7 support
13+
814
## v2023.7.12
915

1016
This is the last release supporting py37.

btclib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""__init__ module for the btclib package."""
1111

1212
name = "btclib"
13-
__version__ = "2023.7.12"
13+
__version__ = "2023.8"
1414
__author__ = "The btclib developers"
1515
__author_email__ = "devs@btclib.org"
1616
__copyright__ = "Copyright (C) 2017-2023 The btclib developers"

btclib/b58.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ def h160_from_address(b58addr: String) -> tuple[str, bytes, str]:
7575
prefix = payload[:1]
7676

7777
for script_type in ("p2pkh", "p2sh"):
78-
# with python>=3.8 use walrus operator
79-
# if network := network_from_key_value(script_type, prefix):
80-
network = network_from_key_value(script_type, prefix)
81-
if network:
78+
if network := network_from_key_value(script_type, prefix):
8279
return script_type, payload[1:], network
8380

8481
err_msg = f"invalid base58 address prefix: 0x{prefix.hex()}"

btclib/bip32/slip132.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ def address_from_xpub(xpub: BIP32Key) -> str:
5858
b58.p2wpkh_p2sh,
5959
]
6060
for version, function in zip(version_list, function_list):
61-
# with python>=3.8 use walrus operator
62-
# if network := network_from_key_value(version, xpub.version):
63-
network = network_from_key_value(version, xpub.version)
64-
if network:
61+
if network := network_from_key_value(version, xpub.version):
6562
return function(xpub, network)
6663
err_msg = f"unknown xpub version: {xpub.version.hex()}" # pragma: no cover
6764
raise BTClibValueError(err_msg) # pragma: no cover

btclib/ec/curve_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def multiples(Q: JacPoint, size: int, ec: CurveGroup) -> list[JacPoint]:
472472
MAX_W = 5
473473

474474

475-
@functools.lru_cache() # results are cached to increase efficiency
475+
@functools.lru_cache # results are cached to increase efficiency
476476
def cached_multiples(Q: JacPoint, ec: CurveGroup) -> list[JacPoint]:
477477
T = [INFJ, Q]
478478
for i in range(3, 2**MAX_W, 2):
@@ -481,7 +481,7 @@ def cached_multiples(Q: JacPoint, ec: CurveGroup) -> list[JacPoint]:
481481
return T
482482

483483

484-
@functools.lru_cache() # results are cached to increase efficiency
484+
@functools.lru_cache # results are cached to increase efficiency
485485
def cached_multiples_fixwind(
486486
Q: JacPoint, ec: CurveGroup, w: int = 4
487487
) -> list[list[JacPoint]]:

btclib/psbt/psbt.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ def assert_signable(self) -> None:
144144
for i, tx_in in enumerate(self.tx.vin):
145145
non_witness_utxo = self.inputs[i].non_witness_utxo
146146
redeem_script = self.inputs[i].redeem_script
147-
# with python>=3.8 use walrus operator
148-
# if witness_utxo := self.inputs[i].witness_utxo:
149-
witness_utxo = self.inputs[i].witness_utxo
150-
if witness_utxo:
147+
if witness_utxo := self.inputs[i].witness_utxo:
151148
script_pub_key = witness_utxo.script_pub_key
152149
script_type, payload = type_and_payload(script_pub_key.script)
153150
if script_type == "p2sh":

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
project = "btclib"
2121
project_copyright = "2017-2023 The btclib developers"
2222
author = "The btclib developers"
23-
release = "2023.7.12"
23+
release = "2023.8"
2424

2525
# -- General configuration ---------------------------------------------------
2626
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

0 commit comments

Comments
 (0)