Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Monkeypatch pkg_resources to always use _markerlib#285

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gsnedders merged 1 commit intohtml5lib:masterfromjayvdb:envmarker-monkeypatching
Jul 26, 2016

Conversation

jayvdb
Copy link
Contributor

Prior to setuptools 20.10.0 there is patchy support for environment markers,
and setup.py fails while parsing them.
html5lib requires at least setuptools 18.5 for its environment markers.

However,@gsnedders developed a way to monkey patch pkg_resources
so that it always uses _markerlib, which allows all environment markers
to be used for any version of setuptools. Some patching of _markerlib
is also required so that it works on Python 3 also.

On removing the dependency for setuptools>=18.5, pip partially fails on
Python 2.6 with an errorDouble requirement given: ordereddict
and does not install the requirements.txt.
Fixed by removing ordereddict from requirements-test.txt

Prior to setuptools 20.10.0 there is patchy support for environment markers,and setup.py fails while parsing them.html5lib requires at least setuptools 18.5 for its environment markers.However,@gsnedders developed a way to monkey patch pkg_resourcesso that it always uses _markerlib, which allows all environment markersto be used for any version of setuptools.  Some patching of _markerlibis also required so that it works on Python 3 also.On removing the dependency for setuptools>=18.5, pip partially fails onPython 2.6 with an error `Double requirement given: ordereddict`and does not install the requirements.txt.Fixed by removing ordereddict from requirements-test.txt
@jayvdb
Copy link
ContributorAuthor

Also fixes#280 as an alternative to#284

@codecov-io
Copy link

codecov-io commentedJul 22, 2016
edited
Loading

Current coverage is 90.47% (diff: 100%)

Merging#285 intomaster will not change coverage

@@             master       #285   diff @@==========================================  Files            50         50            Lines          6930       6930            Methods           0          0            Messages          0          0            Branches       1336       1336          ==========================================  Hits           6270       6270            Misses          500        500            Partials        160        160

Powered byCodecov. Last update14d4851...6cd93c8

@jayvdb
Copy link
ContributorAuthor

@gsnedders and I had a discussion about this general problem atpypa/packaging#72

The long and short of it is that it works on a very large array of Python & setuptools versions (https://travis-ci.org/jayvdb/tox-travis/builds/145144692)

@gsnedders
Copy link
Member

Hey, thanks for this. Can you add a (temporary) commit that tests (on Travis) loads of different pip and setuptools versions? (Let's try down to setuptools 3.3 and pip 6.0?)

I'd much rather test this with all of our relatively complex usage of markers directly.

@jayvdb
Copy link
ContributorAuthor

Sure. Are you happy with the selection of versions being roughly the latest patch release of each minor release?

(that is what I did withhttps://travis-ci.org/jayvdb/tox-travis/builds/145144692 )
I'll start setting that up, and rather randomly mix setuptools and pip versions.

Do you want the commit to be on this PR, so that the record is part of this projects travis builds?

@jayvdb
Copy link
ContributorAuthor

no problems with normal setuptools use; pip 6.0 is definitely the minimum for the environment markers, but otherwise works ok. Doing a large matrix build now with and without optional. Will be a while before they are done.
https://travis-ci.org/jayvdb/html5lib-python/builds/147372074
https://travis-ci.org/jayvdb/html5lib-python/builds/147372330

@gsneddersgsnedders merged commit43aeaef intohtml5lib:masterJul 26, 2016
@gsnedders
Copy link
Member

Awesome, thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jayvdb@codecov-io@gsnedders

[8]ページ先頭

©2009-2025 Movatter.jp