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

"poetry install" for librelingo_json_export fails due to cython attribute error #3023

Open
stucamp opened this issue Aug 23, 2023 · 4 comments

Comments

@stucamp
Copy link

stucamp commented Aug 23, 2023

Helping Kate get her dev env setup came across a bit of a dependancy issue while setting up librelingo_jason_export. json_export depends on yaml_loader, which in turn requires pyyaml >=5.3.1 <6.0.0 and defaults to 5.4.1 during the 'poetry install'

Issue being that it throw an attribute error when using 5.4.1. yaml/pyyaml#601

area_2023_08_22_195111

6.0.1 would avoid the error, however the yaml_loader version poetry is using currently specifies less than 6.0.0.

Was able to resolve by adding pyyaml version 5.3.1 as a static version dependancy in json_loaders's pyproject.toml file.

@stucamp
Copy link
Author

stucamp commented Aug 23, 2023

Could push a change to update the pyproject.toml file with pyyaml = "5.3.1", but assumed a more appealing solution would probably be to expand the librelingo-yaml-loader pyyaml dep to allow for pyyaml 6.0.1 in PyPi

@kantord
Copy link
Owner

kantord commented Aug 23, 2023

Could push a change to update the pyproject.toml file with pyyaml = "5.3.1", but assumed a more appealing solution would probably be to expand the librelingo-yaml-loader pyyaml dep to allow for pyyaml 6.0.1 in PyPi

Hi 👋 Sure, updating to 6 makes sense to me!

@stucamp
Copy link
Author

stucamp commented Aug 28, 2023

Just as a followup, I can see a couple paths forward to achieve this.

Dependancies for librelingo_yaml_loader package would need to be updated to pyyaml version requirements on PyPi (which is where poetry install is pulling the package) to a known working version (5.3.1 or =>6.0.1). I did double check that it was an issue with the PyPi package, installation via pip instelf (not even using poetry), librelingo_yaml_loader installation fails at pyyaml due to it's default use of pyyaml 5.4.1

area_2023_08_28_142247

OR

Change the pyproject.toml files for the build process to install the locally available packages concerning librelingo_json_export and libreling_yaml_loader rather than those found on PyPi. I'm not super familiar with poetry, but upon a cursory look, it appears to be possible. Let me know if you'd like me to take a look and I can see about switching poetry to using the local yaml/json packages rather than those found on PyPi.

@kantord
Copy link
Owner

kantord commented Aug 30, 2023

Actually, I think it should be both solutions at the same time.

The first solution that you suggest (fix dependencies in PyPI for each independent package) is necessary, because other packages/projects depend on these packages and they might also face the same problem.

The second solution is also needed, because we also need to simplify the install process: #2763

sublime-coleslaw added a commit to sublime-coleslaw/LibreLingo that referenced this issue Nov 20, 2023
Using local packages instead of versioned pypi packages allows for
instant updates to sub-packages without needing to create a new release.
Packages can now be installed with one `poetry install` command in the
root librelingo project.

Version drift between sub-packages is also stopped. It's impossible for
librelingo-json-export and librelingo-yaml-loader to depend on different
versions of librelingo-fakes.

kantord#3023
kantord#2763
sublime-coleslaw added a commit to sublime-coleslaw/LibreLingo that referenced this issue Nov 20, 2023
Using local packages instead of versioned pypi packages allows for
instant updates to sub-packages without needing to create a new release.
Packages can now be installed with one `poetry install` command in the
root librelingo project.

Version drift between sub-packages is also stopped. It's impossible for
librelingo-json-export and librelingo-yaml-loader to depend on different
versions of librelingo-fakes.

kantord#3023
kantord#2763
sublime-coleslaw added a commit to sublime-coleslaw/LibreLingo that referenced this issue Nov 20, 2023
Using local packages instead of versioned pypi packages allows for
instant updates to sub-packages without needing to create a new release.
Packages can now be installed with one `poetry install` command in the
root librelingo project.

Version drift between sub-packages is also stopped. It's impossible for
librelingo-json-export and librelingo-yaml-loader to depend on different
versions of librelingo-fakes.

kantord#3023

kantord#2763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants