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

[BUG] Python Version Request: Reduce python >= 3.9 #6

Closed
mdancho84 opened this issue Jan 12, 2024 · 3 comments
Closed

[BUG] Python Version Request: Reduce python >= 3.9 #6

mdancho84 opened this issue Jan 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mdancho84
Copy link

Thanks for the great-looking package!

I have hopefully a small request. Currently you have:

requires-python = ">=3.10"

Is it possible to change this to 3.9 to reduce the restrictiveness?

Sklearn doesn't actually specify a python version in their project.toml. And I don't see a need to restrict from the current dependencies:

dependencies = [
    "numpy>=1.23.4",
    "scipy>=1.8.0",
    "pandas>=1.4.1",
    "cvxpy>=1.4.1",
    "scikit-learn>=1.3.2",
    "joblib>=1.3.2",
    "plotly>=5.15.0"
]
@mdancho84 mdancho84 added the bug Something isn't working label Jan 12, 2024
@HugoDelatte
Copy link
Member

Thank you!

We've chosen 3.10 as the minimal requirement, aiming to stay two majors below the latest release and take advantage of the new features introduced in 3.10.

Among these features, we currently use:

  • Structural Pattern Matching (PEP 634)
  • New Type Union Operator (PEP 604)
  • TypeAlias (PEP 613)

Therefore, the current code wouldn't work with 3.9. The solution would be to refactor the code, which is not technically difficult but would also require us to maintain two code bases (one for 3.9 and one for >=3.10).

This additional development time won't be allocated to other features, so we'll need to monitor this request to see how many users it impacts and make a decision based on this.

Regarding scikit-learn, they specifiy the Python version in their setup.py (which is 3.9 for scikit-learn 1.3).

To better understand the impact of these restrictions, could you provide more details on why you need to stay on 3.9?

@mdancho84
Copy link
Author

Understood. I didn't expect that you were using features specific to py 3.10. And that's why I asked.

What I did was upgraded to Python 3.11 in a code base to permit use of skfolio.

You can find the article here: https://www.quantscience.io/newsletter/b/risk-parity-portfolio-python-skfolio

@HugoDelatte
Copy link
Member

Thank you for the details. Also, thank you for the tutorial and communication you provided around the package. They are very much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants