Skip to content

Commit bfaa5de

Browse files
authored
Merge pull request #745 from betcode-org/task/python-312
upgrade for python 3.12
2 parents d9b729d + b72992e commit bfaa5de

26 files changed

+151
-143
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.8', '3.9', '3.10', '3.11']
14+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1515
fail-fast: false
1616

1717
steps:
@@ -22,14 +22,9 @@ jobs:
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

25-
- name: Check setup.py
26-
run: |
27-
python setup.py check
28-
2925
- name: Install dependencies
3026
run: |
3127
pip install -r requirements.txt
32-
pip install -r requirements-test.txt
3328
3429
- name: Black fmt
3530
run: |
@@ -55,15 +50,10 @@ jobs:
5550
with:
5651
python-version: 3.11
5752

58-
- name: Check setup.py
59-
run: |
60-
python setup.py check
61-
6253
- name: Install dependencies
6354
run: |
6455
pip install -r requirements.txt
6556
pip install -r requirements-speed.txt
66-
pip install -r requirements-test.txt
6757
6858
- name: Unittest
6959
run: |
@@ -87,11 +77,10 @@ jobs:
8777
- name: Install dependencies
8878
run: |
8979
pip install -r requirements.txt
90-
pip install -r requirements-test.txt
9180
9281
- name: Build package and docs
9382
run: |
94-
python setup.py sdist bdist_wheel
83+
python -m build
9584
twine check dist/*
9685
mkdocs build
9786

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/psf/black
5-
rev: 23.9.1
5+
rev: 24.2.0
66
hooks:
77
- id: black
88
# It is recommended to specify the latest version of Python

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

HISTORY.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
Release History
44
---------------
55

6+
2.6.0 (2024-03-11)
7+
+++++++++++++++++++
8+
9+
**Improvements**
10+
11+
- toml file added / repo cleanup
12+
13+
**Bug Fixes**
14+
15+
- Correctly handle sports data files that contain no valid data
16+
17+
**Libraries**
18+
19+
- python 3.12 added
20+
- betfairlightweight upgraded to 2.20.1
21+
- black upgraded to 24.2.0
22+
623
2.5.10 (2024-02-15)
724
+++++++++++++++++++
825

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Support for market, order and custom streaming data.
2424

2525
[join betcode slack group](https://join.slack.com/t/betcode-org/shared_invite/zt-25yz6dt1y-LHya5VzHLOzN3RZEQrSnrA)
2626

27-
Tested on Python 3.8, 3.9, 3.10 and 3.11.
27+
Tested on Python 3.8, 3.9, 3.10, 3.11 and 3.12.
2828

2929
## installation
3030

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Support for market, order and custom streaming data.
3030

3131
[join slack group](https://join.slack.com/t/betcode-org/shared_invite/zt-25yz6dt1y-LHya5VzHLOzN3RZEQrSnrA)
3232

33-
Tested on Python 3.8, 3.9, 3.10 and 3.11.
33+
Tested on Python 3.8, 3.9, 3.10, 3.11 and 3.12.
3434

3535
## installation
3636

examples/example-betconnect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def start(self, flumine) -> None:
6161
)
6262
for fixture in active_fixtures:
6363
# get markets
64-
context["active_markets"][
65-
fixture.fixture_id
66-
] = client.betting.active_markets(fixture_id=fixture.fixture_id)
64+
context["active_markets"][fixture.fixture_id] = (
65+
client.betting.active_markets(fixture_id=fixture.fixture_id)
66+
)
6767
# get the selections and prices for WIN market
6868
fixture_selection_prices = client.betting.selections_for_market(
6969
fixture_id=fixture.fixture_id,

examples/strategies/marketrecorder.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717

1818
class MarketRecorder(BaseStrategy):
19-
2019
"""
2120
Simple raw streaming market recorder, context:
2221
@@ -230,9 +229,11 @@ def _load(self, market, compress_file_dir: str, market_definition: dict) -> None
230229
bucket=self._bucket,
231230
key=self._make_prices_file_s3_key(compress_file_dir, market_definition),
232231
extra_args={
233-
"Metadata": self._create_metadata(market_definition)
234-
if market_definition
235-
else {}
232+
"Metadata": (
233+
self._create_metadata(market_definition)
234+
if market_definition
235+
else {}
236+
)
236237
},
237238
)
238239
logger.info("%s successfully loaded to s3" % compress_file_dir)

flumine/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = "flumine"
22
__description__ = "Betting trading framework"
33
__url__ = "https://github.com/betcode-org/flumine"
4-
__version__ = "2.5.10"
4+
__version__ = "2.6.0"
55
__author__ = "Liam Pauling"
66
__license__ = "MIT"

flumine/controls/clientcontrols.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212

1313
class MaxTransactionCount(BaseControl):
14-
1514
"""
1615
Counts and limits orders based on max
1716
transaction count as per:

0 commit comments

Comments
 (0)