Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable interpolation on config file parsing #889

Open
jaraco opened this issue Dec 14, 2016 · 9 comments
Open

Disable interpolation on config file parsing #889

jaraco opened this issue Dec 14, 2016 · 9 comments

Comments

@jaraco
Copy link
Member

@jaraco jaraco commented Dec 14, 2016

In Python 20754, we've observed that interpolation was inadvertently turned on for setup.cfg parsing in the update to Python 3. A patch is being drafted to fix the issue for bugfix versions of Python 3.5 and 3.6 and for Python 3.7, but the issue will persist for older Pythons. Setuptools can provide forward compatibility.

jaraco added a commit that referenced this issue Dec 14, 2016
@jaraco jaraco closed this in 1802d13 Dec 24, 2016
jaraco added a commit that referenced this issue Dec 24, 2016
@jaraco
Copy link
Member Author

@jaraco jaraco commented Dec 24, 2016

Looks like maybe I shouldn't have merged this functionality quite yet. The tests aren't passing on Python 3.

@jaraco
Copy link
Member Author

@jaraco jaraco commented Dec 24, 2016

The test that's failing is an integration test where the unpatched Distribution class isn't being resolved correctly now that Distribution has multiple bases.

@jaraco jaraco reopened this Dec 24, 2016
jaraco added a commit that referenced this issue Dec 24, 2016
@jaraco
Copy link
Member Author

@jaraco jaraco commented Dec 24, 2016

Aha. The tests would have been failing on Python 2 except that the integration tests are skipped in environments with pbr installed... and since setuptools depends on mock on those older pythons and mock depends on pbr, those tests are skipped regularly.

@jaraco
Copy link
Member Author

@jaraco jaraco commented Dec 24, 2016

That latest commit addresses the issue. I've re-tagged v32.3.0 and the release is pending now.

@jaraco jaraco closed this Dec 24, 2016
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 13, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 13, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jun 15, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jul 18, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jul 18, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jul 26, 2017
benoit-pierre added a commit to benoit-pierre/setuptools that referenced this issue Jul 27, 2017
@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 27, 2017

I'm re-opening this issue. After correcting the two issues with the implementation, I see (due to failing tests) that interpolation has been enabled for setup.cfg parsing even in Python 2. So disabling config parsing is a backward-incompatible change and not merely a re-alignment with past expectations as I'd originally thought.

@jaraco jaraco reopened this Jul 27, 2017
@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 27, 2017

I've done a force-push of master back to de05e93 while this issue gets resolved in the issue-889 branch.

@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 27, 2017

I've also deleted the v36.2.5 tag as it was never released. Big thanks to Sviatoslav and Travis-CI for setting up build stages and preventing a broken release.

jaraco added a commit that referenced this issue Jul 27, 2017
@jaraco jaraco changed the title Disable interpolation on config file parsing on Python 3 Disable interpolation on config file parsing Jul 27, 2017
jaraco added a commit that referenced this issue Jul 27, 2017
@jaraco
Copy link
Member Author

@jaraco jaraco commented Jul 27, 2017

Based on my new understanding, I've updated the changelog in 4688a68 to reflect a backward-incompatible release. I'm reluctant to make this release because I'm unsure of the impact it will have, and more importantly, it will break existing packages that contain a setup.cfg that either depends on interpolation or escapes percent characters... and for those projects to be compatible, they'll become incompatible with prior releases of setuptools.

Without more data or feedback, I'm not sure what to do.

@benoit-pierre
Copy link
Member

@benoit-pierre benoit-pierre commented Jul 27, 2017

With the change in fbcbb51 to disable interpolation for .pypirc, I'd expect setup.cfg (and others) to be handled the same. But I agree that if interpolation has been allowed all this time, there are bound to be some projects that will break because they worked-around this by doubling %.

leorochael added a commit to buildout/buildout that referenced this issue Aug 15, 2017
It breaks setuptools/distutils parsing:
pypa/setuptools#889

This reverts commit e2c7980.
jwodder added a commit to jwodder/qypi that referenced this issue Sep 29, 2017
jwodder added a commit to jwodder/ghutil that referenced this issue Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants