From 82b1c1cca63b6d94e28db6f1625be59efbe93c6f Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Fri, 4 Sep 2020 16:24:53 +0200 Subject: update links in doc --- CHANGES | 3 +++ README.rst | 9 ++++++--- __init__.py | 39 +++++++++++++++++++-------------------- _doc/_static/pypi.svg | 2 +- _doc/conf.py | 2 +- _doc/contributing.ryd | 8 ++++---- _doc/index.ryd | 8 ++++---- representer.py | 23 +++++++++++------------ util.py | 6 +++--- 9 files changed, 52 insertions(+), 48 deletions(-) diff --git a/CHANGES b/CHANGES index 04afa52..4f783c7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +[0, 16, 12]: 2020-09-04 + - update links in doc + [0, 16, 11]: 2020-09-03 - workaround issue with setuptools 0.50 and importing pip ( fix by jaraco https://github.com/pypa/setuptools/issues/2355#issuecomment-685159580 ) diff --git a/README.rst b/README.rst index 0ff1188..f757911 100644 --- a/README.rst +++ b/README.rst @@ -4,10 +4,10 @@ ruamel.yaml ``ruamel.yaml`` is a YAML 1.2 loader/dumper package for Python. -:version: 0.16.11 -:updated: 2020-09-03 +:version: 0.16.12 +:updated: 2020-09-04 :documentation: http://yaml.readthedocs.io -:repository: https://bitbucket.org/ruamel/yaml +:repository: https://sourceforge.net/projects/ruamel-yaml/ :pypi: https://pypi.org/project/ruamel.yaml/ @@ -54,6 +54,9 @@ ChangeLog .. should insert NEXT: at the beginning of line for next key (with empty line) +0.16.12 (2020-09-04): + - update links in doc + 0.16.11 (2020-09-03): - workaround issue with setuptools 0.50 and importing pip ( fix by jaraco https://github.com/pypa/setuptools/issues/2355#issuecomment-685159580 ) diff --git a/__init__.py b/__init__.py index 7cb014b..5bd0d3d 100644 --- a/__init__.py +++ b/__init__.py @@ -7,32 +7,31 @@ if False: # MYPY _package_data = dict( full_package_name='ruamel.yaml', - version_info=(0, 16, 11), - __version__='0.16.11', + version_info=(0, 16, 12), + __version__='0.16.12', author='Anthon van der Neut', author_email='a.van.der.neut@ruamel.eu', description='ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order', # NOQA entry_points=None, since=2014, - extras_require={':platform_python_implementation=="CPython" and python_version<="2.7"': [ - 'ruamel.ordereddict', - ], ':platform_python_implementation=="CPython" and python_version<"3.9"': [ - 'ruamel.yaml.clib>=0.1.2', - ], 'jinja2': ['ruamel.yaml.jinja2>=0.2'], 'docs': ['ryd']}, - # NOQA - # test='#include "ext/yaml.h"\n\nint main(int argc, char* argv[])\n{\nyaml_parser_t parser;\nparser = parser; /* prevent warning */\nreturn 0;\n}\n', # NOQA + extras_require={ + ':platform_python_implementation=="CPython" and python_version<="2.7"': ['ruamel.ordereddict'], # NOQA + ':platform_python_implementation=="CPython" and python_version<"3.9"': ['ruamel.yaml.clib>=0.1.2'], # NOQA + 'jinja2': ['ruamel.yaml.jinja2>=0.2'], + 'docs': ['ryd'], + }, classifiers=[ - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Programming Language :: Python :: Implementation :: Jython', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Text Processing :: Markup', - 'Typing :: Typed', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Programming Language :: Python :: Implementation :: Jython', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: Text Processing :: Markup', + 'Typing :: Typed', ], keywords='yaml 1.2 parser round-trip preserve quotes order config', read_the_docs='yaml', diff --git a/_doc/_static/pypi.svg b/_doc/_static/pypi.svg index 1bb63c1..89b8585 100644 --- a/_doc/_static/pypi.svg +++ b/_doc/_static/pypi.svg @@ -1 +1 @@ - pypipypi0.16.110.16.11 + pypipypi0.16.120.16.12 diff --git a/_doc/conf.py b/_doc/conf.py index 610eecb..3875b47 100644 --- a/_doc/conf.py +++ b/_doc/conf.py @@ -57,7 +57,7 @@ try: from ruamel.yaml import __version__, version_info # NOQA # The short X.Y version. - version = '.'.join([str(l) for l in version_info[:3]]) + version = '.'.join([str(ch) for ch in version_info[:3]]) # The full version, including alpha/beta/rc tags. release = version # = __version__ except Exception as e: diff --git a/_doc/contributing.ryd b/_doc/contributing.ryd index 702cd2e..a2ad397 100644 --- a/_doc/contributing.ryd +++ b/_doc/contributing.ryd @@ -9,14 +9,14 @@ Contributing Any contribution to ``ruamel.yaml`` is welcome, be it in the form of an email, a question on stackoverflow (I'll get notified of that when you tag it -with ``ruamel.yaml``), an issue or pull-request (PR) on bitbucket. +with ``ruamel.yaml``), an issue or pull-request (PR) on sourceforge. Contributing via stackoverflow is, for most, easiest to make. When I answer your question there and the answer warrants an extension to the documentation or code, I will include it in a documnetation update and/or future (normally the next) release of ``ruamel.yaml``. -Please don't post support questions as an issue on Bitbucket. +Please don't post support questions as an issue on sourceforge. Documentation ============= @@ -30,7 +30,7 @@ will be clear how that works. If you want to contribute to the documentation, you can sent me a clear description of the needed changes, e.g. as a unified diff. If the changes encompass multiple documents in a ``.ryd`` file, it is best to install ``ryd`` -(use a virtualenv!), clone the ``ruamel.yaml`` repository on Bitbucket, edit +(use a virtualenv!), clone the ``ruamel.yaml`` repository on sourceforge, edit documentation, run ``ryd``:: ryd --pdf '**/*.ryd' @@ -107,7 +107,7 @@ Generated files I use a minimal environment when developing, void of most artifacts needed for packaging, testing etc. These artifact files are *generated*, just before committing to -Bitbucket and pushing to PyPI, with nuances coming from the ``_package_data`` +sourceforge and pushing to PyPI, with nuances coming from the ``_package_data`` information in ``__init__.py``. Including changes in these files will automatically be reverted, even assuming your PR is accepted as is. diff --git a/_doc/index.ryd b/_doc/index.ryd index 296d263..a539e65 100644 --- a/_doc/index.ryd +++ b/_doc/index.ryd @@ -17,7 +17,7 @@ Sections, subsections, etc. in .ryd files ruamel.yaml *********** -`BitBucket `_ | +`SoureForge `_ | `PyPI `_ @@ -42,13 +42,13 @@ Contents: .. image:: https://bestpractices.coreinfrastructure.org/projects/1128/badge :target: https://bestpractices.coreinfrastructure.org/projects/1128 -.. image:: https://bitbucket.org/ruamel/yaml/raw/default/_doc/_static/license.svg +.. image:: https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/license.svg?format=raw :target: https://opensource.org/licenses/MIT -.. image:: https://bitbucket.org/ruamel/yaml/raw/default/_doc/_static/pypi.svg +.. image:: https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree/_doc/_static/pypi.svg?format=raw :target: https://pypi.org/project/ruamel.yaml/ -.. image:: https://bitbucket.org/ruamel/oitnb/raw/default/_doc/_static/oitnb.svg +.. image:: https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw :target: https://pypi.org/project/oitnb/ .. image:: http://www.mypy-lang.org/static/mypy_badge.svg diff --git a/representer.py b/representer.py index f0ad89f..1b5185a 100644 --- a/representer.py +++ b/representer.py @@ -15,6 +15,17 @@ from ruamel.yaml.scalarstring import ( DoubleQuotedScalarString, PlainScalarString, ) +from ruamel.yaml.comments import ( + CommentedMap, + CommentedOrderedMap, + CommentedSeq, + CommentedKeySeq, + CommentedKeyMap, + CommentedSet, + comment_attrib, + merge_attrib, + TaggedScalar, +) from ruamel.yaml.scalarint import ScalarInt, BinaryInt, OctalInt, HexInt, HexCapsInt from ruamel.yaml.scalarfloat import ScalarFloat from ruamel.yaml.scalarbool import ScalarBoolean @@ -644,18 +655,6 @@ Representer.add_multi_representer(object, Representer.represent_object) Representer.add_multi_representer(type, Representer.represent_name) -from ruamel.yaml.comments import ( - CommentedMap, - CommentedOrderedMap, - CommentedSeq, - CommentedKeySeq, - CommentedKeyMap, - CommentedSet, - comment_attrib, - merge_attrib, - TaggedScalar, -) # NOQA - class RoundTripRepresenter(SafeRepresenter): # need to add type here and write out the .comment diff --git a/util.py b/util.py index 3eb7d76..1788254 100644 --- a/util.py +++ b/util.py @@ -68,11 +68,11 @@ def load_yaml_guess_indent(stream, **kw): """ from .main import round_trip_load - # load a yaml file guess the indentation, if you use TABs ... - def leading_spaces(l): + # load a YAML document, guess the indentation, if you use TABs you're on your own + def leading_spaces(line): # type: (Any) -> int idx = 0 - while idx < len(l) and l[idx] == ' ': + while idx < len(line) and line[idx] == ' ': idx += 1 return idx -- cgit v1.2.1