No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= Enabling Python Generators = | |||
= | |||
== Summary == | == Summary == | ||
This change enables the ability to choose to use the Python module dependency generator for packages that provide Python Egg/Wheel metadata. | |||
== Owner == | == Owner == | ||
* Name: [[User:ignatenkobrain|Igor Gnatenko]], [[User:ngompa|Neal Gompa]] | * Name: [[User:ignatenkobrain|Igor Gnatenko]], [[User:ngompa|Neal Gompa]] | ||
* Email: ignatenkobrain@fedoraproject.org, ngompa13@gmail.com | * Email: ignatenkobrain@fedoraproject.org, ngompa13@gmail.com | ||
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> --> | * Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> --> | ||
Line 57: | Line 30: | ||
== Detailed Description == | == Detailed Description == | ||
... | |||
For F28 this is opt-in, in F29 we plan to propose to make this opt-out. | |||
<!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. --> | <!-- Expand on the summary, if appropriate. A couple sentences suffices to explain the goal, but the more details you can provide the better. --> | ||
== Benefit to Fedora == | == Benefit to Fedora == | ||
* Packagers do not need to specify runtime dependencies manually anymore | |||
* No more errors in runtime due to missing dependencies (see example below) | |||
Packager of python-fasteners forgot to add Requires: python3-monotonic >= 0.1 so when anyone does "import fasteners", it fails with traceback: | |||
Traceback (most recent call last): | |||
File "/builddir/build/BUILD/jenkins-job-builder-2.0.0/tests/yamlparser/test_yamlparser.py", line 42, in test_incorrect_template_dimensions | |||
reg = registry.ModuleRegistry(config) | |||
File "/builddir/build/BUILD/jenkins-job-builder-2.0.0/jenkins_jobs/registry.py", line 50, in __init__ | |||
Mod = entrypoint.load() | |||
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2407, in load | |||
self.require(*args, **kwargs) | |||
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2430, in require | |||
items = working_set.resolve(reqs, env, installer, extras=self.extras) | |||
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 870, in resolve | |||
raise DistributionNotFound(req, requirers) | |||
pkg_resources.DistributionNotFound: The 'monotonic>=0.1' distribution was not found and is required by fasteners | |||
With automatic dependency management this should never happen. | |||
<!-- What is the benefit to the platform? If this is a major capability update, what has changed? If this is a new functionality, what capabilities does it bring? Why will Fedora become a better distribution or project because of this proposal?--> | <!-- What is the benefit to the platform? If this is a major capability update, what has changed? If this is a new functionality, what capabilities does it bring? Why will Fedora become a better distribution or project because of this proposal?--> | ||
Line 80: | Line 70: | ||
* Policies and guidelines: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | * Policies and guidelines: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | ||
Packaging:Python Guidelines need to reference how to turn on the feature (simple variable override). | |||
<!-- Do the packaging guidelines or other documents need to be updated for this feature? If so, does it need to happen before or after the implementation is done? If a FPC ticket exists, add a link here. --> | <!-- Do the packaging guidelines or other documents need to be updated for this feature? If so, does it need to happen before or after the implementation is done? If a FPC ticket exists, add a link here. --> | ||
Line 86: | Line 77: | ||
== Upgrade/compatibility impact == | == Upgrade/compatibility impact == | ||
Some new dependencies might be automatically added, but this is rather good because it fixes real bugs. | |||
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? --> | <!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? --> | ||
Line 92: | Line 84: | ||
== How To Test == | == How To Test == | ||
1. Remove all requires for python modules | |||
2. Add following line to spec: %python_enable_depgen | |||
3. Rebuild package | |||
Every dependency mentioned in egg/wheel (e.g. generated by setuptools/distutils from setup.py) should be automatically added. | |||
<!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them. The more specific you can be, the better the community testing can be. | <!-- This does not need to be a full-fledged document. Describe the dimensions of tests that this change implementation is expected to pass when it is done. If it needs to be tested with different hardware or software configurations, indicate them. The more specific you can be, the better the community testing can be. | ||
Revision as of 14:39, 19 January 2018
Enabling Python Generators
Summary
This change enables the ability to choose to use the Python module dependency generator for packages that provide Python Egg/Wheel metadata.
Owner
- Name: Igor Gnatenko, Neal Gompa
- Email: ignatenkobrain@fedoraproject.org, ngompa13@gmail.com
- Release notes owner:
Current status
- Targeted release: Fedora 28
- Last updated: 2018-01-19
- Tracker bug: <will be assigned by the Wrangler>
Detailed Description
... For F28 this is opt-in, in F29 we plan to propose to make this opt-out.
Benefit to Fedora
- Packagers do not need to specify runtime dependencies manually anymore
- No more errors in runtime due to missing dependencies (see example below)
Packager of python-fasteners forgot to add Requires: python3-monotonic >= 0.1 so when anyone does "import fasteners", it fails with traceback:
Traceback (most recent call last):
File "/builddir/build/BUILD/jenkins-job-builder-2.0.0/tests/yamlparser/test_yamlparser.py", line 42, in test_incorrect_template_dimensions reg = registry.ModuleRegistry(config) File "/builddir/build/BUILD/jenkins-job-builder-2.0.0/jenkins_jobs/registry.py", line 50, in __init__ Mod = entrypoint.load() File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2407, in load self.require(*args, **kwargs) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2430, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 870, in resolve raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'monotonic>=0.1' distribution was not found and is required by fasteners
With automatic dependency management this should never happen.
Scope
- Proposal owners:
- Other developers: N/A (not a System Wide Change)
- Release engineering: #Releng issue number (a check of an impact with Release Engineering is needed)
- List of deliverables: N/A (not a System Wide Change)
- Policies and guidelines: N/A (not a System Wide Change)
Packaging:Python Guidelines need to reference how to turn on the feature (simple variable override).
- Trademark approval: N/A (not needed for this Change)
Upgrade/compatibility impact
Some new dependencies might be automatically added, but this is rather good because it fixes real bugs.
N/A (not a System Wide Change)
How To Test
1. Remove all requires for python modules 2. Add following line to spec: %python_enable_depgen 3. Rebuild package
Every dependency mentioned in egg/wheel (e.g. generated by setuptools/distutils from setup.py) should be automatically added.
N/A (not a System Wide Change)
User Experience
N/A (not a System Wide Change)
Dependencies
N/A (not a System Wide Change)
Contingency Plan
- Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
- Contingency deadline: N/A (not a System Wide Change)
- Blocks release? N/A (not a System Wide Change), Yes/No
- Blocks product? product
Documentation
N/A (not a System Wide Change)