Support + test Python 3.9-3.13#116
Merged
traderben merged 1 commit intohyperliquid-dex:masterfrom Feb 3, 2025
dbast:3913
Merged
Support + test Python 3.9-3.13#116traderben merged 1 commit intohyperliquid-dex:masterfrom dbast:3913
traderben merged 1 commit intohyperliquid-dex:masterfrom
dbast:3913
Conversation
Fixes the 3 mypy errors:
```
hyperliquid/info.py: note: In member "__init__" of class "Info":
hyperliquid/info.py:29:31: error: Incompatible types in assignment (expression has type "None", variable has type "WebsocketManager") [assignment]
self.ws_manager = None
^~~~
hyperliquid/exchange.py: note: In member "market_close" of class "Exchange":
hyperliquid/exchange.py:215:23: error: Incompatible types in assignment (expression has type "str", variable has type "ChecksumAddress") [assignment]
address = self.account_address
^~~~~~~~~~~~~~~~~~~~
hyperliquid/exchange.py:217:23: error: Incompatible types in assignment (expression has type "str", variable has type "ChecksumAddress") [assignment]
address = self.vault_address
^~~~~~~~~~~~~~~~~~
```
Contributor
Author
|
Ready for review/merge. thanks |
Contributor
|
Thanks for putting this together. I'm just double checking with the rest of the team to make sure no one is concerned about dropping 3.8 support. It looks like we still have a small amount of users on 3.8. Was supporting 3.8 causing any conflicts? It would be helpful to have a clear benefit to dropping support in case we get complaints. Also, I currently have poetry 1.4 installed and everything still seems to work. I thought the poetry-core version would result in an error that would require an upgrade. |
traderben
approved these changes
Feb 3, 2025
gblack686
pushed a commit
to gblack686/hyperliquid-python-sdk
that referenced
this pull request
Jan 31, 2026
Fixes the 3 mypy errors:
```
hyperliquid/info.py: note: In member "__init__" of class "Info":
hyperliquid/info.py:29:31: error: Incompatible types in assignment (expression has type "None", variable has type "WebsocketManager") [assignment]
self.ws_manager = None
^~~~
hyperliquid/exchange.py: note: In member "market_close" of class "Exchange":
hyperliquid/exchange.py:215:23: error: Incompatible types in assignment (expression has type "str", variable has type "ChecksumAddress") [assignment]
address = self.account_address
^~~~~~~~~~~~~~~~~~~~
hyperliquid/exchange.py:217:23: error: Incompatible types in assignment (expression has type "str", variable has type "ChecksumAddress") [assignment]
address = self.vault_address
^~~~~~~~~~~~~~~~~~
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main change: Updates the supported Python version range in pyproject.toml from 3.8-3.12 to 3.9-3.13. Python 3.8 is EOL and 3.13 is the latest Python stable version, as listed here https://devguide.python.org/versions/. Many (dev-) dependencies also already require Python >=3.9 and otherwise have to remain at old versions.
Also:
make lockfile-update-fulltarget).installmake target into several targets so thatinstallis fully deterministic (installs what is specified in poetry.lock without further updating). One can still runmake lockfile-update install install-typesto have the old behaviour.--no-updatearg frompoetry lockcalls as that is default by poetry 2 and the arg does not exist anymore.>=2, to prevent conflicts regarding supported poetry args and poetry behaviour (The previous pinning>=1would allow poetry 1 and 2).mypy --install-types(installstypes-requests) to dev dependencies in pyproject.toml to be handled by poetry and to make things even more deterministic / reproducible.The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.in current "Install dependency" workflow step, that can be seen here https://github.com/hyperliquid-dex/hyperliquid-python-sdk/actions/runs/12835420694/job/35794815057make checkruns locally without any findings (wasn't the case before):pip install -r requirements*.txt).make codestyle(=pyupgrade + black + isort)Green workflow runs can be found in my fork of the repo: https://github.com/dbast/hyperliquid-python-sdk/actions/runs/12864803064