Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a quick CI job to verify python minimum version #5272

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/quick-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,18 @@ jobs:
name: quick-ci-jvm-err
path: '**/*_pid*.log'
if-no-files-found: ignore

verify-python-min-version:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
Comment on lines +59 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we use 3.8 here, would it catch more 3.8 related compatibility issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project has this recommendation:

It is recommended to use the most recent Python version to run Vermin on projects since Python's own language parser is used to detect language features, like f-strings since Python 3.6 etc.

Unless we discover otherwise, I'd like to follow this recommendation.


- name: Install vermin
run: pip install vermin==1.6.0

- name: Verify minimum version support
run: vermin -t=3.8 --no-tips --eval-annotations --violations py/server/deephaven py/client py/client-ticking py/embedded-server
2 changes: 1 addition & 1 deletion py/server/deephaven/_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _parse_signature(fn: Callable) -> _ParsedSignature:
else:
p_sig = _ParsedSignature(fn=fn)
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
sig = inspect.signature(fn, eval_str=True)
sig = inspect.signature(fn, eval_str=True) # novermin
else:
sig = inspect.signature(fn)

Expand Down
2 changes: 1 addition & 1 deletion py/server/deephaven/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def _np_ndarray_component_type(t: type) -> Optional[type]:
# when np.ndarray is used, the 1st argument is the component type
if not component_type and sys.version_info.major == 3 and sys.version_info.minor > 8:
import types
if isinstance(t, types.GenericAlias) and (issubclass(t.__origin__, Sequence) or t.__origin__ == np.ndarray):
if isinstance(t, types.GenericAlias) and (issubclass(t.__origin__, Sequence) or t.__origin__ == np.ndarray): # novermin
nargs = len(t.__args__)
if nargs == 1:
component_type = t.__args__[0]
Expand Down
2 changes: 1 addition & 1 deletion py/server/deephaven/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ def _tzinfo_to_j_time_zone(tzi: datetime.tzinfo) -> TimeZone:
return _JDateTimeUtils.parseTimeZone(tzi.zone)

# Handle zoneinfo time zones

if sys.version_info >= (3, 9):
# novermin
import zoneinfo
if isinstance(tzi, zoneinfo.ZoneInfo):
return _JDateTimeUtils.parseTimeZone(tzi.key)
Expand Down
Loading