Comments (14)
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.
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.
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.
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.
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.
Why would you install smart-open 3.x or 4.x, rather than the latest? What's the motivation here?
from smart_open.
Same here, it happens with pip install smart_open==4.0.1
from smart_open.
fixed as of v5.2.0 ref 0f89902
from smart_open.
@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.
@gerardorosiles what's the import chain = which library pins smart_open to an older version?
from smart_open.
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.
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.
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.
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)
- Copiyng and decompressing huge files on the fly HOT 3
- Slow performance due to lack of buffering for GzipFile.write HOT 6
- S3Path or PureS3Path returns NoSuchKeyExists on open('rb') handle intermittently HOT 5
- S3 multipart uploads to text streams are committed on exception
- Error when opening docstring HOT 1
- GCS permission denied 'storage.buckets.get' when using 'open' HOT 2
- python 3.11 support?
- Support for type annotations HOT 3
- Suggeted - allowing cache mechanism for files
- Getting OSError in s3 when permission for kms:Decrypt are missing HOT 4
- S3 open fails on files that contain '@' in their path HOT 5
- Writing to FTP fails with error "503 ASCII (Text) data type is not supported for file transfer operations. Please configure your FTP client to use IMAGE (Binary) type and try again" HOT 1
- Test failures with urllib3 2.0.4
- Compatibility issue with soundfile HOT 1
- Add OAuth2 support HOT 1
- Feature request: zstandard compression HOT 1
- Incompatibility with moto 5 HOT 8
- Version 7.0.0 issue - import botocore error HOT 5
- Inconsistent python_requires minimum version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smart_open.