Giter Site home page Giter Site logo

Comments (14)

ddelange avatar ddelange commented on June 1, 2024 3

Have you guys tried downgrading your pip just to install smart_open 3.0 or 4.0?

good idea @mpenkov!

I can confirm it's not pip but rather setuptools 67.0.0 which introduced this check:

$ pip install -U pip setuptools==66.1.1 wheel
...
$ pip install smart_open==3.0.0
Collecting smart_open==3.0.0
  Downloading smart_open-3.0.0.tar.gz (113 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 113.0/113.0 kB 773.2 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done 🎉
...
Successfully installed smart_open-3.0.0

from smart_open.

ddelange avatar ddelange commented on June 1, 2024 2

you can always make a public fork of smart_open, branch off a specific version, manually change that line in setup.py, and add to your requirements.txt smart_open @ https://github.com/<owner>/smart_open/archive/refs/heads/<branch>.zip (and should be compatible with the other legacy projects pinning v3).

from smart_open.

CloudNiner avatar CloudNiner commented on June 1, 2024 1

You're likely running into #639

In order to fix this our org had to fork this repo, push the same fix to a new branch there and then install from our fork instead, for smart_open versions <5.1.0.

@piskvorky is there any chance this fix could be backported to the 4.0 release series as a 4.2.1 release?

from smart_open.

CloudNiner avatar CloudNiner commented on June 1, 2024 1

I can't speak for @gerardorosiles but for our case smart open is being pulled transitively by another dependency in our project that locks to smart_open<5. It would be significant effort for us to update that parent dependency, which is lower priority than lots of other things on our roadmap, hence the workaround described above.

from smart_open.

gerardorosiles avatar gerardorosiles commented on June 1, 2024 1

Downgrading is the only option at the moment.

Re: pathy. In order to work with smart_open==5.0.0 I had to upgrade it to pathy=0.6.0 but refactoring to account for any breaking changes would not be possible since this is just s lift-and-shift project.

Thanks

from smart_open.

piskvorky avatar piskvorky commented on June 1, 2024

Why would you install smart-open 3.x or 4.x, rather than the latest? What's the motivation here?

from smart_open.

cfloressuazo avatar cfloressuazo commented on June 1, 2024

Same here, it happens with pip install smart_open==4.0.1

from smart_open.

ddelange avatar ddelange commented on June 1, 2024

fixed as of v5.2.0 ref 0f89902

from smart_open.

gerardorosiles avatar gerardorosiles commented on June 1, 2024

@piskvorky This is legacy code that we are tasked with deploying. As per the documentation I am reading, moving to > 5.0.0 introduces breaking changes, and we are not authorized (e.g., under contract) to refactor the code.

As a test I did try updating to version 5.2.0 (we can tweak the requirements.txt file) and as mentioned by @CloudNiner other dependencies are also locked into version 3.0.0. So this issue creates a domino effec.

from smart_open.

piskvorky avatar piskvorky commented on June 1, 2024

@gerardorosiles what's the import chain = which library pins smart_open to an older version?

from smart_open.

mpenkov avatar mpenkov commented on June 1, 2024

The workaround described by @CloudNiner and @ddelange sounds like it would work, although it is a bit ugly.

The alternatives are:

  • Update dependencies so that more recent smart_open versions are used (as suggested by @piskvorky): burden for @CloudNiner and @gerardorosiles, other priorities
  • Backport the fix, release smart_open 3.0.1 and 4.0.1 (effort for @mpenkov, we've never done this before, uncharted territory, other priorities)

from smart_open.

mpenkov avatar mpenkov commented on June 1, 2024

Have you guys tried downgrading your pip just to install smart_open 3.0 or 4.0?

version 3.0 and 4.0 pip-installed successfully back in the day, so this strict python_requires check must be a relatively recently added thing.

from smart_open.

gerardorosiles avatar gerardorosiles commented on June 1, 2024

Thanks for your attention and suggestions.

@mpenkov I tried downgrading pip as suggested and did not work. I found the smart-open issue also discussed in setuptools project here:
[https://github.com/pypa/setuptools/issues/1049]

@ddelange Thanks very much for the solution. So this issue will happen for setuptools >=67 (I was using 68.0.0)

@piskvorky When updating to smart-open 5.0.0 I got this error for the pathy library.

`ERROR: Cannot install -r requirements.txt (line 51) and smart-open==5.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
The user requested smart-open==5.0.0
pathy 0.4.0 depends on smart-open<4.0.0 and >=2.2.0
`

Thanks again for all your help.

from smart_open.

piskvorky avatar piskvorky commented on June 1, 2024

Current pathy requires smart-open>=5.2.1,<7.0.0: https://github.com/justindujardin/pathy/blob/master/requirements.txt https://github.com/justindujardin/pathy/blob/master/requirements.txt

Which seems fine. So this moves the real problem higher up your dependency chain – what's pulling pathy 0.4.0, rather than the latest pathy 0.11.0? The problem is not smart_open, and it's not pathy.

I'd suggest contacting the maintainer of the ultimate culprit to upgrade their dependencies. Unless it's you, "under contract not to upgrade", in which case you're out of luck. Downgrading setuptools as @mpenkov found might be the only option (but comes with its own downsides, no doubt).

from smart_open.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.