Skip to content

Commit

Permalink
fix: python38 support dropped (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosschroh authored Oct 22, 2024
1 parent dcc9518 commit d179d45
Show file tree
Hide file tree
Showing 23 changed files with 1,105 additions and 931 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup pythonß
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Generate [avro schemas](https://avro.apache.org/docs/1.8.2/spec.html) from pytho
[![Tests](https://github.com/marcosschroh/dataclasses-avroschema/actions/workflows/tests.yaml/badge.svg)](https://github.com/marcosschroh/dataclasses-avroschema/actions/workflows/tests.yaml)
[![GitHub license](https://img.shields.io/github/license/marcosschroh/dataclasses-avroschema.svg)](https://github.com/marcosschroh/dataclasses-avroschema/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/marcosschroh/dataclasses-avroschema/branch/master/graph/badge.svg)](https://codecov.io/gh/marcosschroh/dataclasses-avroschema)
![python version](https://img.shields.io/badge/python-3.8%2B-yellowgreen)
![python version](https://img.shields.io/badge/python-3.9%2B-yellowgreen)

## Requirements

`python 3.8+`
`python 3.9+`

## Installation

Expand Down
3 changes: 1 addition & 2 deletions dataclasses_avroschema/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ def generate_documentation(self) -> typing.Optional[str]:
# dataclasses create a (in avro context) useless docstring by default,
# which we don't want in the schema.
is_dataclass_with_default_docstring = (
dataclasses.is_dataclass(self.type)
# from https://github.com/python/cpython/blob/3.10/Lib/dataclasses.py
and doc == (self.type.__name__ + str(inspect.signature(self.type)).replace(" -> None", ""))
doc == (self.type.__name__ + str(inspect.signature(self.type)).replace(" -> None", ""))
)
if is_dataclass_with_default_docstring:
return None
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Generate [Avro](https://avro.apache.org/docs/1.8.2/spec.html) Schemas from a Pyt
[![Tests](https://github.com/marcosschroh/dataclasses-avroschema/actions/workflows/tests.yaml/badge.svg)](https://github.com/marcosschroh/dataclasses-avroschema/actions/workflows/tests.yaml)
[![GitHub license](https://img.shields.io/github/license/marcosschroh/dataclasses-avroschema.svg)](https://github.com/marcosschroh/dataclasses-avroschema/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/marcosschroh/dataclasses-avroschema/branch/master/graph/badge.svg)](https://codecov.io/gh/marcosschroh/dataclasses-avroschema)
![python version](https://img.shields.io/badge/python-3.8%2B-yellowgreen)
![python version](https://img.shields.io/badge/python-3.9%2B-yellowgreen)

## Requirements

`python 3.8+`
`python 3.9+`

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ event_2 = b'{"first_union": 10, "logical_union": {"long": 1647971584847}}'

my_union.deserialize(event_2, serialization_type="avro-json")

File ~/Projects/dataclasses-avroschema/.venv/lib/python3.8/site-packages/fastavro/io/json_decoder.py:213, in AvroJSONDecoder.read_index(self)
File ~/Projects/dataclasses-avroschema/.venv/lib/python3.9/site-packages/fastavro/io/json_decoder.py:213, in AvroJSONDecoder.read_index(self)
211 label = "null"
212 else:
--> 213 label, data = self._current[self._key].popitem()
Expand Down
2 changes: 1 addition & 1 deletion examples/kafka-examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This Makefile requires the following commands to be available:
# * python3.8
# * python3.9
# * docker

# Docker Compse options
Expand Down
2 changes: 1 addition & 1 deletion examples/kafka-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You will find a series of example about how to use [dataclasses-avroschema](http

## Requirements

`python 3.8+ poetry docker docker-compose`
`python 3.9+ poetry docker docker-compose`

## Kafka examples

Expand Down
133 changes: 80 additions & 53 deletions examples/kafka-examples/aiokafka-example/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/kafka-examples/aiokafka-example/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["marcosschroh <schrohm@gmail.com>"]
packages = [{include = "aiokafka_example"}]

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
aiokafka = "^0.10.0"
dataclasses-avroschema = { path = "../../../.", develop = true }

Expand Down
Loading

0 comments on commit d179d45

Please sign in to comment.