db0 / pythorhead

A python library for interacting with Lemmy
GNU Affero General Public License v3.0
77 stars 25 forks source link

🐛 Python dependency error when building #69

Closed mraniki closed 1 year ago

mraniki commented 1 year ago

The current project's Python requirement (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:

Because pythorhead (0.15.4) requires Python <3.12,>=3.8 and no versions of pythorhead match >0.15.4,<0.16.0, pythorhead is forbidden. So, because iamlistening depends on pythorhead (^0.15.4), version solving failed.

• Check your dependencies Python requirement: The Python requirement can be specified via the python or markers properties

For pythorhead, a possible solution would be to set the `python` property to ">=3.10,<3.12"
db0 commented 1 year ago

Sorry I'm not sure where you're seeing v0.16.0 . This doesn't exist. About python 3.12, we haven't tested it with that version of python. It probably works but we're not sure.

mraniki commented 1 year ago

It's when I build via poetry the way it is define create a conflict

I ended up fixing the dep in the toml:

pythorhead = {version ="^0.15.4", python = ">=3.10,<3.12"}

But anyone else that might use the package might face the issue.

mraniki commented 1 year ago

here the GitHub action trace which got me the failure : https://github.com/mraniki/iamlistening/actions/runs/5788711231/job/15688234986

db0 commented 1 year ago

Are you using python 3.12?

mraniki commented 1 year ago

no the run get's done on the 3.11 but due to the way you declare python, it create that dependency error. Anyway I got a walk around but might be good to review how it is defined. that is the first package that does that to me.

db0 commented 1 year ago

I honestly don't know poetry so I don't know why it's failing. A normal pip install is working for others.

mraniki commented 1 year ago

I solved it with that: https://python-poetry.org/docs/dependency-specification/#multiple-constraints-dependencies

cpressland commented 1 year ago

I'm also running into this error, I solved it with @mraniki's solution https://github.com/db0/pythorhead/issues/69#issuecomment-1669393947