Update pyproject.toml license settings and minimum python version#191
Update pyproject.toml license settings and minimum python version#191
Conversation
Miauwkeru
commented
Sep 22, 2025
- Change the minimum python version to 3.10
- Change vermin minimum version to python3.10
- Fix linting for python3.10
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #191 +/- ##
==========================================
- Coverage 83.35% 83.32% -0.03%
==========================================
Files 35 35
Lines 3718 3713 -5
==========================================
- Hits 3099 3094 -5
Misses 619 619
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0365f68 to
92c379a
Compare
flow/record/context.py
Outdated
| @@ -39,10 +38,7 @@ def fresh_app_context() -> Generator[AppContext, None, None]: | |||
|
|
|||
| # Use slots=True on dataclass for better performance which requires Python 3.10 or later. | |||
| # This can be removed when we drop support for Python 3.9. | |||
tests/record/test_adapter.py
Outdated
| rec = TestRecordWithFooBar(name="world", foo="foo", bar="bar") | ||
| writer.write(rec) | ||
| out, err = capsys.readouterr() | ||
| out, _err = capsys.readouterr() |
There was a problem hiding this comment.
What's the point of this? If it's unused, why not _?
There was a problem hiding this comment.
the new version of ruff adds a warning if a variable is unused. Prefixing it with a _ stops that warning, and you can still see what the variable was supposed to be
There was a problem hiding this comment.
We don't use it so I don't think we care, just put _.
There was a problem hiding this comment.
In my opinion having it as _err is fine, it's still useful for readability even when we don't use it.
flow/record/adapter/avro.py
Outdated
| for field_name in self.datetime_fields: | ||
| value = obj.get(field_name, None) | ||
| if isinstance(value, (int, float)) and value > 0xFFFFFFFF: | ||
| if isinstance(value, int | float) and value > 0xFFFFFFFF: |
There was a problem hiding this comment.
I read this was a bit slower compared to old style tuples. I'm not sure if that is true, but if that's the case I think we can keep it old style unless there is a good reason not to.
There was a problem hiding this comment.
Ruff is enforcing this now I think. So we'd have to disable that rule if we want to keep the old style.
I don't really like this new style either, to be honest.
There was a problem hiding this comment.
This rule was already removed in the version of ruff we now use. It was an issue where the local ruff I used was older and still had the rule enabled. I reverted all those changes to the projects
we can consider adding a deprecation warning instead, but I doubt that someone directly imports app_dataclass
92c379a to
c10e69d
Compare
tests/record/test_record.py
Outdated
|
|
||
| grouped = GroupedRecord("grouped/ab", [a, b]) | ||
| assert isinstance(grouped, (Record, GroupedRecord)) | ||
| assert isinstance(grouped, Record | GroupedRecord) |
There was a problem hiding this comment.
Seems I missed reverting this one