Skip to content

Commit

Permalink
Merge pull request #291 from sanger/python-version-upgrade-to-3.13
Browse files Browse the repository at this point in the history
bump python version to 3.13 in Pipfile
  • Loading branch information
dasunpubudumal authored Feb 3, 2025
2 parents 7586e8f + bb1355c commit 4d5e0f6
Show file tree
Hide file tree
Showing 9 changed files with 544 additions and 537 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/automated_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ env:
IMAGE_NAME: ${{ github.repository }}/${{ github.event.repository.name }}

jobs:
setup:
runs-on: ubuntu-latest
outputs:
python_version: ${{ steps.read_python_version.outputs.python_version }}
steps:
- uses: actions/checkout@v4
- name: Read Python version
id: read_python_version
run: echo "::set-output name=python_version::$(cat .python-version)"
build_test_release_push:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4

Expand All @@ -20,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@ on:
- master

jobs:
setup:
runs-on: ubuntu-latest
outputs:
python_version: ${{ steps.read_python_version.outputs.python_version }}
steps:
- uses: actions/checkout@v4
- name: Read Python version
id: read_python_version
run: echo "::set-output name=python_version::$(cat .python-version)"
black:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -39,12 +49,13 @@ jobs:
python -m black --check .
flake8:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -63,12 +74,13 @@ jobs:
flake8
mypy:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -86,12 +98,13 @@ jobs:
python -m mypy .
test:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ target/
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.1
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ requests = ">= 2.28"
python-snappy = "*"

[requires]
python_version = "3.8"
python_version = "3.13.1"

[pipenv]
allow_prereleases = true
Expand Down
1,036 changes: 511 additions & 525 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/example1/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
LOCALHOST = os.getenv("LOCALHOST", "localhost")

# REDPANDA_BASE_URI defines the URL where the Redpanda service is running
REDPANDA_BASE_URI = f"http://{ LOCALHOST }:8081"
REDPANDA_BASE_URI = f"http://{LOCALHOST}:8081"

# Define one (or more) Rabbit servers to consume from and publish to.
RABBIT_SERVER_DETAILS = RabbitServerDetails(
Expand Down
2 changes: 1 addition & 1 deletion examples/example1/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def process(self, message: RabbitMessage) -> bool:
Returning True will acknowledge the message and remove it from the queue.
"""

print(f"Message read from the queue at { datetime.datetime.now() }:")
print(f"Message read from the queue at {datetime.datetime.now()}:")
print("<<")
print(message.message)
print(">>")
Expand Down
2 changes: 1 addition & 1 deletion lab_share_lib/rabbit/avro_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class AvroEncoderBinaryMessage(AvroEncoderBase):
ValueError: If the message binary does not start with the expected two-byte marker.
"""

TWO_BYTE_MARKER = b"\xC3\x01" # Used to identify single-object Avro encoding.
TWO_BYTE_MARKER = b"\xc3\x01" # Used to identify single-object Avro encoding.

def __init__(self, schema_registry, subject):
super().__init__(schema_registry, subject)
Expand Down

0 comments on commit 4d5e0f6

Please sign in to comment.