[Python-modules-commits] [python-uritools] 01/05: Import python-uritools_1.0.2.orig.tar.gz

Stein Magnus Jodal jodal at moszumanska.debian.org
Tue Aug 9 20:59:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

jodal pushed a commit to branch master
in repository python-uritools.

commit 1f4a349a5b1719fa1b6d6a6907f42e8eed030f8e
Author: Stein Magnus Jodal <jodal at debian.org>
Date:   Tue Aug 9 22:50:44 2016 +0200

    Import python-uritools_1.0.2.orig.tar.gz
---
 .gitignore                             |   7 -
 .travis.yml                            |  12 --
 CHANGES.rst                            |  95 ++++++------
 LICENSE                                |   2 +-
 MANIFEST.in                            |   4 +
 PKG-INFO                               | 121 ++++++++++++++++
 README.rst                             |  29 ++--
 docs/conf.py                           | 257 ++-------------------------------
 docs/index.rst                         |  16 +-
 setup.cfg                              |  20 +--
 setup.py                               |  40 ++---
 tests/test_encoding.py                 |   5 +-
 tox.ini                                |  32 ++++
 uritools.egg-info/PKG-INFO             | 121 ++++++++++++++++
 uritools.egg-info/SOURCES.txt          |  30 ++++
 uritools.egg-info/dependency_links.txt |   1 +
 uritools.egg-info/requires.txt         |   7 +
 uritools.egg-info/top_level.txt        |   1 +
 uritools/__init__.py                   |   2 +-
 uritools/compose.py                    |  19 ++-
 uritools/encoding.py                   |   4 +-
 21 files changed, 451 insertions(+), 374 deletions(-)

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index e9c535c..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-*.egg-info
-*.pyc
-*.swp
-.coverage
-MANIFEST
-build/
-dist/
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 81a8f8a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: python
-python:
-- 2.7
-- 3.2
-- 3.3
-- 3.4
-install:
-- pip install . coverage coveralls
-script:
-- python setup.py nosetests
-after_success:
-- coveralls
diff --git a/CHANGES.rst b/CHANGES.rst
index fc561b6..95ff010 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,11 +1,18 @@
-1.0.1 2015-07-09
-----------------
+v1.0.2 (2016-04-08)
+-------------------
+
+- Fix ``uriencode()`` documentation and unit tests requiring the
+  ``safe`` parameter to be a ``bytes`` object.
+
+
+v1.0.1 (2015-07-09)
+-------------------
 
 - Encode semicolon in query values passed to ``uricompose()``.
 
 
-1.0.0 2015-06-12
-----------------
+v1.0.0 (2015-06-12)
+-------------------
 
 - Fix use of URI references as base URIs in ``urijoin()`` and
   ``SplitResult.transform()``.
@@ -17,7 +24,7 @@
 - Remove ``SplitResult.gethostip()``; return ``ipaddress`` address
 objects from ``SplitResult.gethost()`` instead.
 
-- Remove ``SplitResult.gethost()`` `encoding` parameter.
+- Remove ``SplitResult.gethost()`` ``encoding`` parameter.
 
 - Remove query delimiter parameters.
 
@@ -26,63 +33,63 @@ objects from ``SplitResult.gethost()`` instead.
 - Convert character constants to strings.
 
 
-0.12.0 2015-04-03
------------------
+v0.12.0 (2015-04-03)
+--------------------
 
 - Deprecate ``SplitResult.getaddrinfo()``.
 
 - Deprecate ``SplitResult.getauthority()``.
 
 - Deprecate ``SplitResult.gethost()`` and ``SplitResult.gethostip()``
-  `encoding` parameter; always use `utf-8` instead.
+  ``encoding`` parameter; always use ``utf-8`` instead.
 
 - Drop support for "bytes-like objects".
 
 - Remove ``DefragResult.base``.
 
 
-0.11.1 2015-03-25
------------------
+v0.11.1 (2015-03-25)
+--------------------
 
 - Fix ``uricompose()`` for relative-path references with colons in the
   first path segment.
 
 
-0.11.0 2014-12-16
------------------
+v0.11.0 (2014-12-16)
+--------------------
 
-- Support `encoding=None` for ``uriencode()`` and ``uridecode()``.
+- Support ``encoding=None`` for ``uriencode()`` and ``uridecode()``.
 
-- Add optional `errors` parameter to decoding methods.
+- Add optional ``errors`` parameter to decoding methods.
 
 
-0.10.1 2014-11-30
------------------
+v0.10.1 (2014-11-30)
+--------------------
 
 - Make ``uricompose()`` return ``str`` on all Python versions.
 
 
-0.10.0 2014-11-30
------------------
+v0.10.0 (2014-11-30)
+--------------------
 
 - Use ``ipaddress`` module for handling IPv4/IPv6 host addresses.
 
-- Add `userinfo`, `host` and `port` keyword arguments to
+- Add ``userinfo``, ``host`` and ``port`` keyword arguments to
   ``uricompose()``.
 
 - Deprecate ``DefragResult.base``.
 
-- Feature freeze for `v1.0`.
+- Feature freeze for v1.0.
 
 
-0.9.0 2014-11-21
-----------------
+v0.9.0 (2014-11-21)
+-------------------
 
 - Improve Python 3 support.
 
 
-0.8.0 2014-11-04
-----------------
+v0.8.0 (2014-11-04)
+-------------------
 
 - Fix ``uriencode()`` and ``uridecode()``.
 
@@ -91,16 +98,16 @@ objects from ``SplitResult.gethost()`` instead.
 - Support non-string query values in ``uricompose()``.
 
 
-0.7.0 2014-10-12
-----------------
+v0.7.0 (2014-10-12)
+-------------------
 
 - Add optional port parameter to ``SplitResult.getaddrinfo()``.
 
 - Cache ``SplitResult.authority`` subcomponents.
 
 
-0.6.0 2014-09-17
-----------------
+v0.6.0 (2014-09-17)
+-------------------
 
 - Add basic IPv6 support.
 
@@ -114,52 +121,52 @@ objects from ``SplitResult.gethost()`` instead.
 - Improve Python 3 support.
 
 
-0.5.2 2014-08-06
-----------------
+v0.5.2 (2014-08-06)
+-------------------
 
 - Fix empty port handling.
 
 
-0.5.1 2014-06-22
-----------------
+v0.5.1 (2014-06-22)
+-------------------
 
 - Add basic Python 3 support.
 
 
-0.5.0 2014-06-21
-----------------
+v0.5.0 (2014-06-21)
+-------------------
 
 - Add ``SplitResult.getaddrinfo()``.
 
 - Support query mappings and sequences in ``uricompose()``.
 
 
-0.4.0 2014-03-20
-----------------
+v0.4.0 (2014-03-20)
+-------------------
 
 - Fix ``SplitResult.port`` to return int (matching urlparse).
 
 - Add ``SplitResult.getquerylist(), SplitResult.getquerydict()``.
 
 
-0.3.0 2014-03-02
-----------------
+v0.3.0 (2014-03-02)
+-------------------
 
 - Add result object accessor methods.
 
 - Update documentation.
 
 
-0.2.1 2014-02-24
-----------------
+v0.2.1 (2014-02-24)
+-------------------
 
 - Fix IndexError in ``urinormpath()``.
 
 - Integrate Python 2.7.6 ``urlparse`` unit tests.
 
 
-0.2.0 2014-02-18
-----------------
+v0.2.0 (2014-02-18)
+-------------------
 
 - Add authority subcomponent attributes.
 
@@ -168,7 +175,7 @@ objects from ``SplitResult.gethost()`` instead.
 - Improve edge case behavior.
 
 
-0.1.0 2014-02-14
-----------------
+v0.1.0 (2014-02-14)
+-------------------
 
 - Initial beta release.
diff --git a/LICENSE b/LICENSE
index 380c344..73c1611 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2014 Thomas Kemmer
+Copyright (c) 2014-2016 Thomas Kemmer
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of
 this software and associated documentation files (the "Software"), to deal in
diff --git a/MANIFEST.in b/MANIFEST.in
index 8b3684f..de1c916 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -2,5 +2,9 @@ include CHANGES.rst
 include LICENSE
 include MANIFEST.in
 include README.rst
+include tox.ini
+
+recursive-include docs *
+prune docs/_build
 
 recursive-include tests *.py
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..3283cb3
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,121 @@
+Metadata-Version: 1.1
+Name: uritools
+Version: 1.0.2
+Summary: RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse
+Home-page: https://github.com/tkem/uritools/
+Author: Thomas Kemmer
+Author-email: tkemmer at computer.org
+License: MIT
+Description: uritools
+        ========================================================================
+        
+        This module defines RFC 3986 compliant replacements for the most
+        commonly used functions of the Python 2.7 Standard Library
+        ``urlparse`` and Python 3 ``urllib.parse`` modules.
+        
+        .. code-block:: pycon
+        
+            >>> from uritools import urisplit, uriunsplit, urijoin, uridefrag
+            >>> parts = urisplit('foo://user@example.com:8042/over/there?name=ferret#nose')
+            >>> parts
+            SplitResult(scheme='foo', authority='user at example.com:8042', path='/over/there', query='name=ferret', fragment='nose')
+            >>> parts.scheme
+            'foo'
+            >>> parts.authority
+            'user at example.com:8042'
+            >>> parts.userinfo
+            'user'
+            >>> parts.host
+            'example.com'
+            >>> parts.port
+            '8042'
+            >>> uriunsplit(parts[:3] + ('name=swallow&type=African', 'beak'))
+            'foo://user@example.com:8042/over/there?name=swallow&type=African#beak'
+            >>> urijoin('http://www.cwi.nl/~guido/Python.html', 'FAQ.html')
+            'http://www.cwi.nl/~guido/FAQ.html'
+            >>> uridefrag('http://pythonhosted.org/uritools/index.html#constants')
+            DefragResult(uri='http://pythonhosted.org/uritools/index.html', fragment='constants')
+        
+        For various reasons, the Python 2 ``urlparse`` module is not compliant
+        with current Internet standards, does not include Unicode support, and
+        is generally unusable with proprietary URI schemes.  Python 3's
+        ``urllib.parse`` improves on Unicode support, but the other issues still
+        remain.  As stated in `Lib/urllib/parse.py
+        <https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py>`_::
+        
+            RFC 3986 is considered the current standard and any future changes
+            to urlparse module should conform with it.  The urlparse module is
+            currently not entirely compliant with this RFC due to defacto
+            scenarios for parsing, and for backward compatibility purposes,
+            some parsing quirks from older RFCs are retained.
+        
+        This module aims to provide fully RFC 3986 compliant replacements for
+        some commonly used functions found in ``urlparse`` and
+        ``urllib.parse``, plus additional functions for conveniently composing
+        URIs from their individual components.
+        
+        
+        Installation
+        ------------------------------------------------------------------------
+        
+        Install uritools using pip::
+        
+            pip install uritools
+        
+        
+        Project Resources
+        ------------------------------------------------------------------------
+        
+        .. image:: http://img.shields.io/pypi/v/uritools.svg?style=flat
+            :target: https://pypi.python.org/pypi/uritools/
+            :alt: Latest PyPI version
+        
+        .. image:: http://img.shields.io/pypi/dm/uritools.svg?style=flat
+            :target: https://pypi.python.org/pypi/uritools/
+            :alt: Number of PyPI downloads
+        
+        .. image:: http://img.shields.io/travis/tkem/uritools/master.svg?style=flat
+            :target: https://travis-ci.org/tkem/uritools/
+            :alt: Travis CI build status
+        
+        .. image:: http://img.shields.io/coveralls/tkem/uritools/master.svg?style=flat
+           :target: https://coveralls.io/r/tkem/uritools
+           :alt: Test coverage
+        
+        - `Documentation`_
+        - `Issue Tracker`_
+        - `Source Code`_
+        - `Change Log`_
+        
+        
+        License
+        ------------------------------------------------------------------------
+        
+        Copyright (c) 2014-2016 Thomas Kemmer.
+        
+        Licensed under the `MIT License`_.
+        
+        
+        .. _Documentation: http://pythonhosted.org/uritools/
+        .. _Issue Tracker: https://github.com/tkem/uritools/issues/
+        .. _Source Code: https://github.com/tkem/uritools/
+        .. _Change Log: https://github.com/tkem/uritools/blob/master/CHANGES.rst
+        .. _MIT License: http://raw.github.com/tkem/uritools/master/LICENSE
+        
+Keywords: uri url urlparse urlsplit urljoin urldefrag
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Other Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Topic :: Internet
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/README.rst b/README.rst
index 725366b..fb4c1ca 100644
--- a/README.rst
+++ b/README.rst
@@ -2,16 +2,15 @@ uritools
 ========================================================================
 
 This module defines RFC 3986 compliant replacements for the most
-commonly used functions of the Python 2.7 Standard Library urlparse_
-and Python 3 `urllib.parse`_ modules.
+commonly used functions of the Python 2.7 Standard Library
+``urlparse`` and Python 3 ``urllib.parse`` modules.
 
 .. code-block:: pycon
 
     >>> from uritools import urisplit, uriunsplit, urijoin, uridefrag
     >>> parts = urisplit('foo://user@example.com:8042/over/there?name=ferret#nose')
     >>> parts
-    SplitResult(scheme='foo', authority='user at example.com:8042',
-                path='/over/there', query='name=ferret', fragment='nose')
+    SplitResult(scheme='foo', authority='user at example.com:8042', path='/over/there', query='name=ferret', fragment='nose')
     >>> parts.scheme
     'foo'
     >>> parts.authority
@@ -27,14 +26,14 @@ and Python 3 `urllib.parse`_ modules.
     >>> urijoin('http://www.cwi.nl/~guido/Python.html', 'FAQ.html')
     'http://www.cwi.nl/~guido/FAQ.html'
     >>> uridefrag('http://pythonhosted.org/uritools/index.html#constants')
-    DefragResult(uri='http://pythonhosted.org/uritools/index.html',
-                 fragment='constants')
+    DefragResult(uri='http://pythonhosted.org/uritools/index.html', fragment='constants')
 
-For various reasons, the Python 2 urlparse_ module is not compliant
+For various reasons, the Python 2 ``urlparse`` module is not compliant
 with current Internet standards, does not include Unicode support, and
 is generally unusable with proprietary URI schemes.  Python 3's
-`urllib.parse`_ improves on Unicode support, but the other issues
-still remain.  As stated in `Lib/urllib/parse.py`_::
+``urllib.parse`` improves on Unicode support, but the other issues still
+remain.  As stated in `Lib/urllib/parse.py
+<https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py>`_::
 
     RFC 3986 is considered the current standard and any future changes
     to urlparse module should conform with it.  The urlparse module is
@@ -43,9 +42,9 @@ still remain.  As stated in `Lib/urllib/parse.py`_::
     some parsing quirks from older RFCs are retained.
 
 This module aims to provide fully RFC 3986 compliant replacements for
-some commonly used functions found in urlparse_ and `urllib.parse`_,
-plus additional functions for conveniently composing URIs from their
-individual components.
+some commonly used functions found in ``urlparse`` and
+``urllib.parse``, plus additional functions for conveniently composing
+URIs from their individual components.
 
 
 Installation
@@ -84,15 +83,11 @@ Project Resources
 License
 ------------------------------------------------------------------------
 
-Copyright (c) 2014, 2015 Thomas Kemmer.
+Copyright (c) 2014-2016 Thomas Kemmer.
 
 Licensed under the `MIT License`_.
 
 
-.. _urlparse: http://docs.python.org/2/library/urlparse.html
-.. _urllib.parse: http://docs.python.org/3/library/urllib.parse.html
-.. _Lib/urllib/parse.py: https://hg.python.org/cpython/file/3.4/Lib/urllib/parse.py
-
 .. _Documentation: http://pythonhosted.org/uritools/
 .. _Issue Tracker: https://github.com/tkem/uritools/issues/
 .. _Source Code: https://github.com/tkem/uritools/
diff --git a/docs/conf.py b/docs/conf.py
index 8b155b8..0164550 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,245 +1,20 @@
-# -*- coding: utf-8 -*-
-#
-# uritools documentation build configuration file, created by
-# sphinx-quickstart on Mon Feb 10 09:15:34 2014.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys
-import os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-sys.path.insert(0, os.path.abspath('..'))
-from uritools import __version__
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'uritools'
-copyright = u'2014, Thomas Kemmer'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = __version__
-# The full version, including alpha/beta/rc tags.
+def get_version(filename):
+    from re import findall
+    with open(filename) as f:
+        metadata = dict(findall(r"__([a-z]+)__ = '([^']+)'", f.read()))
+    return metadata['version']
+
+project = 'uritools'
+copyright = '2014-2016 Thomas Kemmer'
+version = get_version(b'../uritools/__init__.py')
 release = version
 
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.coverage',
+    'sphinx.ext.doctest',
+    'sphinx.ext.todo'
+]
 exclude_patterns = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
+master_doc = 'index'
 html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'uritoolsdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-latex_elements = {
-    # The paper size ('letterpaper' or 'a4paper').
-    #'papersize': 'letterpaper',
-
-    # The font size ('10pt', '11pt' or '12pt').
-    #'pointsize': '10pt',
-
-    # Additional stuff for the LaTeX preamble.
-    #'preamble': '',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
-    ('index', 'uritools.tex', u'uritools Documentation',
-     u'Thomas Kemmer', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
-    ('index', 'uritools', u'uritools Documentation',
-     [u'Thomas Kemmer'], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output ------------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-#  dir menu entry, description, category)
-texinfo_documents = [
-    ('index', 'uritools', u'uritools Documentation',
-     u'Thomas Kemmer', 'uritools', 'One line description of project.',
-     'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
diff --git a/docs/index.rst b/docs/index.rst
index 53b9bc0..c6e7112 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -12,8 +12,7 @@ commonly used functions of the Python 2.7 Standard Library
     >>> from uritools import urisplit, uriunsplit, urijoin, uridefrag
     >>> parts = urisplit('foo://user@example.com:8042/over/there?name=ferret#nose')
     >>> parts
-    SplitResult(scheme='foo', authority='user at example.com:8042',
-                path='/over/there', query='name=ferret', fragment='nose')
+    SplitResult(scheme='foo', authority='user at example.com:8042', path='/over/there', query='name=ferret', fragment='nose')
     >>> parts.scheme
     'foo'
     >>> parts.authority
@@ -29,14 +28,14 @@ commonly used functions of the Python 2.7 Standard Library
     >>> urijoin('http://www.cwi.nl/~guido/Python.html', 'FAQ.html')
     'http://www.cwi.nl/~guido/FAQ.html'
     >>> uridefrag('http://pythonhosted.org/uritools/index.html#constants')
-    DefragResult(uri='http://pythonhosted.org/uritools/index.html',
-                 fragment='constants')
+    DefragResult(uri='http://pythonhosted.org/uritools/index.html', fragment='constants')
 
 For various reasons, the Python 2 :mod:`urlparse` module is not
 compliant with current Internet standards, does not include Unicode
 support, and is generally unusable with proprietary URI schemes.
 Python 3's :mod:`urllib.parse` improves on Unicode support, but the
-other issues still remain.  As stated in `Lib/urllib/parse.py`_::
+other issues still remain.  As stated in `Lib/urllib/parse.py
+<https://hg.python.org/cpython/file/3.5/Lib/urllib/parse.py>`_::
 
     FC 3986 is considered the current standard and any future changes
     to urlparse module should conform with it.  The urlparse module is
@@ -155,10 +154,6 @@ URI Encoding
    Otherwise, encode `uristring` using the codec registered for
    `encoding` before replacing any percent encodings.
 
-   Note that `uristring` may be either a Unicode string or a
-   :class:`bytes` object, while `safe` must be a :class:`bytes` object
-   containg ASCII characters only.
-
 
 Character Constants
 ------------------------------------------------------------------------
@@ -197,6 +192,3 @@ convenience methods.
 
 .. autoclass:: SplitResult
    :members:
-
-
-.. _Lib/urllib/parse.py: https://hg.python.org/cpython/file/3.4/Lib/urllib/parse.py
diff --git a/setup.cfg b/setup.cfg
index bf3b416..3a76231 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,17 +1,19 @@
-[bdist_wheel]
-universal = 1
-
 [flake8]
-exclude = .git,build,docs,setup.py
+exclude = .git,.tox
 
-[nosetests]
-with-coverage = 1
-cover-package = uritools
+[wheel]
+universal = 1
 
 [build_sphinx]
 source-dir = docs/
-build-dir  = docs/_build
-all_files  = 1
+build-dir = docs/_build
+all_files = 1
 
 [upload_sphinx]
 upload-dir = docs/_build/html
+
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.py b/setup.py
index 3d0ca4f..425e0c9 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
-import codecs, os.path, re, sys
+import sys
 
-from setuptools import setup
+from setuptools import find_packages, setup
 
 # environment markers require a recent setuptools and/or pip version
 if sys.version_info >= (3, 3) or 'bdist_wheel' in sys.argv:
@@ -10,20 +10,32 @@ elif sys.version_info >= (3, 0):
 else:
     install_requires = ['ipaddress>=1.0.6']
 
-with codecs.open(os.path.join(os.path.dirname(__file__), 'uritools', '__init__.py'),
-                 encoding='utf8') as f:
-    metadata = dict(re.findall(r"__([a-z]+)__ = '([^']+)", f.read()))
+
+def get_version(filename):
+    from re import findall
+    with open(filename) as f:
+        metadata = dict(findall("__([a-z]+)__ = '([^']+)'", f.read()))
+    return metadata['version']
 
 setup(
     name='uritools',
-    version=metadata['version'],
-    author='Thomas Kemmer',
-    author_email='tkemmer at computer.org',
+    version=get_version('uritools/__init__.py'),
     url='https://github.com/tkem/uritools/',
     license='MIT',
-    description='RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse',
+    author='Thomas Kemmer',
+    author_email='tkemmer at computer.org',
+    description=(
+        'RFC 3986 compliant, Unicode-aware, scheme-agnostic '
+        'replacement for urlparse'
+    ),
     long_description=open('README.rst').read(),
     keywords='uri url urlparse urlsplit urljoin urldefrag',
+    packages=find_packages(exclude=['tests', 'tests.*']),
+    install_requires=install_requires,
+    extras_require={
+        ':python_version == "2.7"': ['ipaddress>=1.0.6'],
+        ':python_version == "3.2"': ['ipaddress>=1.0.7']
+    },
     classifiers=[
         'Development Status :: 4 - Beta',
         'Environment :: Other Environment',
@@ -37,14 +49,8 @@ setup(
         'Programming Language :: Python :: 3.2',
         'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Topic :: Internet',
         'Topic :: Software Development :: Libraries :: Python Modules'
-    ],
-    packages=['uritools'],
-    install_requires=install_requires,
-    extras_require={
-        ':python_version == "2.7"': ['ipaddress>=1.0.6'],
-        ':python_version == "3.2"': ['ipaddress>=1.0.7']
-    },
-    test_suite='tests'
+    ]
 )
diff --git a/tests/test_encoding.py b/tests/test_encoding.py
index c500a9f..1bba487 100644
--- a/tests/test_encoding.py
+++ b/tests/test_encoding.py
@@ -7,7 +7,7 @@ from uritools import RESERVED, UNRESERVED, uridecode, uriencode
 
 class EncodingTest(unittest.TestCase):
 
-    def check(self, decoded, encoded, safe=b'', encoding='utf-8'):
+    def check(self, decoded, encoded, safe='', encoding='utf-8'):
         self.assertEqual(uriencode(decoded, safe, encoding), encoded)
         self.assertEqual(uridecode(encoded, encoding), decoded)
         # swap bytes/string types
@@ -28,8 +28,11 @@ class EncodingTest(unittest.TestCase):
     def test_safe_encoding(self):
         cases = [
             ('', b'', ''),
+            ('', b'', b''),
             (' ', b' ', ' '),
+            (' ', b' ', b' '),
             ('%', b'%', '%'),
+            ('%', b'%', b'%'),
             (RESERVED, RESERVED.encode('ascii'), RESERVED)
         ]
         for decoded, encoded, safe in cases:
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..1c9cf82
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,32 @@
+[tox]
+envlist = check-manifest,docs,flake8,py
+
+[testenv]
+# coverage 4.0 drops Python 3.2 compatibility
+deps =
+    coverage<4
+    pytest
+    pytest-cov
+commands =
+    py.test --basetemp={envtmpdir} --cov=uritools {posargs}
+
+[testenv:check-manifest]
+deps =
+    check-manifest
+commands =
+    check-manifest
+skip_install = true
+
+[testenv:docs]
+deps =
+     sphinx
+commands =
+     sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
+
+[testenv:flake8]
+deps =
+    flake8
+    flake8-import-order
+commands =
+    flake8
+skip_install = true
diff --git a/uritools.egg-info/PKG-INFO b/uritools.egg-info/PKG-INFO
new file mode 100644
index 0000000..3283cb3
--- /dev/null
+++ b/uritools.egg-info/PKG-INFO
@@ -0,0 +1,121 @@
+Metadata-Version: 1.1
+Name: uritools
+Version: 1.0.2
+Summary: RFC 3986 compliant, Unicode-aware, scheme-agnostic replacement for urlparse
+Home-page: https://github.com/tkem/uritools/
+Author: Thomas Kemmer
+Author-email: tkemmer at computer.org
+License: MIT
... 258 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-uritools.git



More information about the Python-modules-commits mailing list