Giter Club home page Giter Club logo

Comments (14)

rbtcollins avatar rbtcollins commented on September 4, 2024 1

The absence of a py2 wheel will just cause the source tarball to be downloaded, no? and then it will fail later on; the key metadata is the python-requires field.

from mock.

tirkarthi avatar tirkarthi commented on September 4, 2024

Seems like a duplicate of #478. Mock 4.0.0 is python 3.6+ only and drops support for python 2.7.

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

Mock is no longer compatible with Python 2.

Please see the documentation and the release metadata.

I'd suggest upgrading your installation tools so that they respect the metadata in pypi, and get off Python 2 as soon as possible.

from mock.

ronaldevers avatar ronaldevers commented on September 4, 2024

Totally understand that you are dropping Python 2. However, the 4.0.0 wheel package is published for mock-py2.py3-none-any.whl. I think you should publish that for py3 only. Again, going forward with py3 only, totally understandable. But by publishing v4 like this you also cause a lot of unnecessary breakage... Can you reconsider this ticket please? I'd suggest unpublishing 4.0.0 for py2/py3, and then republishing as 4.0.1 for py3 only.

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

Yep, that's fair.

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

I've pulled the bad .whl's from pypi and #485 should fix things going forwards.

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

https://pypi.org/project/mock/4.0.1/ is now out.

from mock.

ronaldevers avatar ronaldevers commented on September 4, 2024

Thanks!

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

I would direct my honourable(s) colleague to the release metadata I link to above ;-)

python-requires is correct, and has been for all releases I've done, but having a universal wheel up there is wrong, and I'm sure some tools would erroneously download it.

If tooling downloads the source tarball and ignores the python-requires, well, that's on the tool...

from mock.

rbtcollins avatar rbtcollins commented on September 4, 2024

Well, what I was referring to was the near-exact same discussion on the PR on testtools from earlier in the week :0. In that the py3 tag doesn't declare python3 compatibility for all python3, python-requires has to be consulted to determine which releases are relevant, and similarly py2 tag; and really the universal wheel semantics are about deterministic builds.

But shrug :). Ce la vie, I accept your point about broken tools, and mock has a much larger user base than testtools.

from mock.

sshishov avatar sshishov commented on September 4, 2024

This issue broke production-related task in our case. As we are still on py2 and did not pin mock, after installation it just broke. I guess that pip should not just find the incompatible version.
Just IMO, but things should not break like this even if support is ended for py2.

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

@sshishov - I removed the problematic wheels a month ago. What problem(s) are you still seeing?

from mock.

sshishov avatar sshishov commented on September 4, 2024

@cjw296 on our server I can see this still:

(venv)root@1aaf6a2862c7:/home/user# python -V
Python 2.7.6

(venv)root@1aaf6a2862c7:/home/user# pip -V
pip 1.5.4 from /home/user/venv/local/lib/python2.7/site-packages (python 2.7)

(venv)root@1aaf6a2862c7:/home/user# pip install mock==0
Downloading/unpacking mock==0
  Could not find a version that satisfies the requirement mock==0 (from versions: 0.5.0, 0.6.0, 0.6.0, 0.7.0b1, 0.7.0b1, 0.7.0b2, 0.7.0b2, 0.7.0b3, 0.7.0b3, 0.7.0b4, 0.7.0b4, 0.7.0rc1, 0.7.0rc1, 0.7.0, 0.7.0, 0.7.1, 0.7.1, 0.7.2, 0.7.2, 0.8.0, 0.8.0, 1.0b1, 1.0b1, 1.0.0, 1.0.0, 1.0.1, 1.0.1, 1.1.0, 1.1.0, 1.1.1, 1.1.2, 1.1.2, 1.1.3, 1.1.3, 1.1.4, 1.1.4, 1.2.0, 1.2.0, 1.3.0, 1.3.0, 2.0.0, 2.0.0, 3.0.0, 3.0.0, 3.0.1, 3.0.1, 3.0.2, 3.0.2, 3.0.3, 3.0.3, 3.0.4, 3.0.4, 3.0.5, 3.0.5, 4.0.0b1, 4.0.0, 4.0.1)
Cleaning up...
No distributions matching the version for mock==0

As you can see, for python2 versions 4.x.x are available and therefore they are installed in case of not pinned versions.

What can be the reason? Outdated pip, outdated something else?

UPDATE: after updating pip version, the package disappeared. Sorry for disturbing.

(venv)root@1aaf6a2862c7:/home/user# pip -V
pip 20.0.2 from /home/user/venv/local/lib/python2.7/site-packages/pip (python 2.7)

(venv)root@1aaf6a2862c7:/home/user# pip install moc
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Could not find a version that satisfies the requirement mock==0 (from versions: 0.5.0, 0.6.0, 0.7.0b1, 0.7.0b2, 0.7.0b3, 0.7.0b4, 0.7.0rc1, 0.7.0, 0.7.1, 0.7.2, 0.8.0, 1.0b1, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.3.0, 2.0.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5)
ERROR: No matching distribution found for mock==0

from mock.

cjw296 avatar cjw296 commented on September 4, 2024

pip 1.5.4 is really ancient, so yeah, that'll be your problem ;-)

from mock.

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.