Guenter Milde
2017-05-29 15:48:26 UTC
Dear David, dear Engelbert, dear Docutils developers,
line 17, in sphinx/util/compat.py
So, while I agree that it is their fault (as long as our version complies
with PEP 440), it could also be considered an API change, as the
docstring says::
__version__ = ...
"""``major.minor.micro`` version number.
without referencing PEP440.
downstream packages.
However, Sphinx users are our "main customers" and excluding them from the
prerelease test sample goes against the very intention of the prerelease :-(
Fortunately, there is a chance to eat the cake and have it:
We can push the non-interger part of the pre-release segment into the
__version_details__:
Index: __init__.py
===================================================================
--- __init__.py (Revision 8090)
+++ __init__.py (Arbeitskopie)
@@ -52,7 +52,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.14rc2'
+__version__ = '0.14'
"""``major.minor.micro`` version number.
The major number will be bumped when the project is feature-complete, and
later if there is a major change in the design or API.
@@ -60,7 +60,7 @@
The micro number is bumped for bug-fix releases.
"""
-__version_details__ = 'repository'
+__version_details__ = 'rc2'
"""Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository',
'prerelease', 'release'), modified automatically & manually."""
With a small change to the "version template", the output of `rst2* --version`
remains PEP440-compliant, e.g.
``rst2html (Docutils 0.14-rc2, Python 2.7.13, on linux2)``
Index: frontend.py
===================================================================
--- frontend.py (Revision 8090)
+++ frontend.py (Arbeitskopie)
@@ -570,7 +570,7 @@
config_section = 'general'
- version_template = ('%%prog (Docutils %s [%s], Python %s, on %s)'
+ version_template = ('%%prog (Docutils %s-%s, Python %s, on %s)'
% (docutils.__version__, docutils.__version_details__,
sys.version.split()[0], sys.platform))
"""Default version message."""
However, functional test fail with this approach:
-<meta name="generator" content="Docutils 0.14rc2: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
so we would need to either change the expected output or use the
"version_template" also in the "generator" generation.
David, Engelbert, what do you think?
Günter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-develop mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-develop
Please u
docutils latest package version is 0.14rc1
while other packages try to parse the version (such as sphinx), it fails
due to parse error for int()
...while other packages try to parse the version (such as sphinx), it fails
due to parse error for int()
line 17, in sphinx/util/compat.py
docutils_version = tuple(int(x) for x in _du_version.split('.')[:2])
ValueError: invalid literal for int() with base 10: '14rc1'
Unfortunately, our friends as Sphinx still use this method.ValueError: invalid literal for int() with base 10: '14rc1'
So, while I agree that it is their fault (as long as our version complies
with PEP 440), it could also be considered an API change, as the
docstring says::
__version__ = ...
"""``major.minor.micro`` version number.
without referencing PEP440.
Can you please update docutils version to contains only integers (as
universal format)
We may decide that pre-releases are not important for users of "broken"universal format)
downstream packages.
However, Sphinx users are our "main customers" and excluding them from the
prerelease test sample goes against the very intention of the prerelease :-(
Fortunately, there is a chance to eat the cake and have it:
We can push the non-interger part of the pre-release segment into the
__version_details__:
Index: __init__.py
===================================================================
--- __init__.py (Revision 8090)
+++ __init__.py (Arbeitskopie)
@@ -52,7 +52,7 @@
__docformat__ = 'reStructuredText'
-__version__ = '0.14rc2'
+__version__ = '0.14'
"""``major.minor.micro`` version number.
The major number will be bumped when the project is feature-complete, and
later if there is a major change in the design or API.
@@ -60,7 +60,7 @@
The micro number is bumped for bug-fix releases.
"""
-__version_details__ = 'repository'
+__version_details__ = 'rc2'
"""Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository',
'prerelease', 'release'), modified automatically & manually."""
With a small change to the "version template", the output of `rst2* --version`
remains PEP440-compliant, e.g.
``rst2html (Docutils 0.14-rc2, Python 2.7.13, on linux2)``
Index: frontend.py
===================================================================
--- frontend.py (Revision 8090)
+++ frontend.py (Arbeitskopie)
@@ -570,7 +570,7 @@
config_section = 'general'
- version_template = ('%%prog (Docutils %s [%s], Python %s, on %s)'
+ version_template = ('%%prog (Docutils %s-%s, Python %s, on %s)'
% (docutils.__version__, docutils.__version_details__,
sys.version.split()[0], sys.platform))
"""Default version message."""
However, functional test fail with this approach:
-<meta name="generator" content="Docutils 0.14rc2: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
so we would need to either change the expected output or use the
"version_template" also in the "generator" generation.
David, Engelbert, what do you think?
Günter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-develop mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-develop
Please u