[Python-modules-commits] [python-netaddr] 01/06: New upstream release.

Vincent Bernat bernat at moszumanska.debian.org
Mon Oct 23 14:20:54 UTC 2017


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

bernat pushed a commit to branch debian/master
in repository python-netaddr.

commit 4420d553d0a6ab8e11ae6423c7b805856a12cbb2
Author: Vincent Bernat <bernat at debian.org>
Date:   Mon Oct 23 16:03:39 2017 +0200

    New upstream release.
---
 CHANGELOG                                       |     46 +
 COPYRIGHT                                       |      2 +-
 INSTALL                                         |    120 -
 LICENSE                                         |      2 +-
 MANIFEST.in                                     |     12 +-
 Makefile                                        |     25 +-
 PKG-INFO                                        |     56 +-
 README.md                                       |      7 +-
 THANKS                                          |     49 -
 docs/source/changes.rst                         |      2 +-
 docs/source/conf.py                             |      6 +-
 docs/source/index.rst                           |      9 +-
 docs/source/introduction.rst                    |      2 +-
 PKG-INFO => netaddr.egg-info/PKG-INFO           |     56 +-
 netaddr.egg-info/SOURCES.txt                    |     88 +
 netaddr.egg-info/dependency_links.txt           |      1 +
 netaddr.egg-info/top_level.txt                  |      1 +
 netaddr/__init__.py                             |     46 +-
 netaddr/compat.py                               |      6 +-
 netaddr/contrib/__init__.py                     |     12 +
 netaddr/contrib/subnet_splitter.py              |     46 +
 netaddr/core.py                                 |     21 +-
 netaddr/eui/__init__.py                         |     10 +-
 netaddr/eui/iab.idx                             |   9150 +-
 netaddr/eui/iab.txt                             |  55971 +++--
 netaddr/eui/ieee.py                             |     86 +-
 netaddr/eui/oui.idx                             |  43825 ++--
 netaddr/eui/oui.txt                             | 269530 +++++++++++----------
 netaddr/fbsocket.py                             |      2 +-
 netaddr/ip/__init__.py                          |     12 +-
 netaddr/ip/glob.py                              |      2 +-
 netaddr/ip/iana.py                              |      2 +-
 netaddr/ip/ipv4-address-space.xml               |    784 +-
 netaddr/ip/ipv6-address-space.xml               |     20 +-
 netaddr/ip/ipv6-unicast-address-assignments.xml |     17 +-
 netaddr/ip/multicast-addresses.xml              |    249 +-
 netaddr/ip/nmap.py                              |      2 +-
 netaddr/ip/rfc1924.py                           |      2 +-
 netaddr/ip/sets.py                              |      2 +-
 netaddr/strategy/__init__.py                    |      2 +-
 netaddr/strategy/eui48.py                       |      2 +-
 netaddr/strategy/eui64.py                       |      2 +-
 netaddr/strategy/ipv4.py                        |      2 +-
 netaddr/strategy/ipv6.py                        |      2 +-
 netaddr/tests/eui/test_eui.py                   |     29 +-
 netaddr/tests/ip/test_ip_splitter.py            |     74 +
 netaddr/tests/ip/test_ip_v4.py                  |     10 +-
 netaddr/tests/ip/test_ip_v6.py                  |      9 +-
 netaddr/tools/netaddr                           |      2 +-
 release.py                                      |    150 -
 runtests.py                                     |   2890 -
 setup.cfg                                       |      5 +
 setup.py                                        |    190 +-
 setup_egg.py                                    |     14 -
 54 files changed, 194122 insertions(+), 189542 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 78a8406..d89c6e6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,50 @@
 ---------------
+Release: 0.7.19
+---------------
+Date: 11 Jan 2017
+
+^^^^^^^^^^^^^^^^^^^^
+Changes since 0.7.18
+^^^^^^^^^^^^^^^^^^^^
+
+* added a new SubnetSplitter class for those looking to divide up subnets.
+  Thanks alanwill and RyPeck and those on (Stack Overflow discussion).
+
+* removed bundled pytest dependency code for "python setup.py test".
+
+* setup.py now uses setuptools only (no more distutils) and setup_egg.py removed.
+
+* cleaned up INSTALL docs so they accurately reflect current Python packaging.
+
+* fixed broken parsing, generating and reading of IEEE index files when switching
+  between Python 2.x and 3.x.
+
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Specific bug fixes addressed in this release
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+FIXED Issue 133: https://github.com/drkjam/netaddr/issues/133
+    - Splitting a single network into multiple prefixed networks
+
+FIXED Issue 129: https://github.com/drkjam/netaddr/issues/129
+    - fix IPAddress().netmask_bits to return 0 for 0.0.0.0 and [::] addresses
+
+FIXED Issue 117: https://github.com/drkjam/netaddr/issues/117
+    - (python setup.py test) failing with python3 >= 3.5
+
+FIXED Issue 137: https://github.com/drkjam/netaddr/issues/137
+    - API reference is broken on ReadTheDocs
+
+FIXED Issue 143: https://github.com/drkjam/netaddr/issues/143
+    - Please refresh the bundled IANA and IEEE databases
+
+^^^^^^^^^^^
+Miscellanea
+^^^^^^^^^^^
+
+- Goodbye to NYSE Euronext (good times), hello Intercontinental Exchange ...
+
+---------------
 Release: 0.7.18
 ---------------
 Date: 4 Sep 2015
diff --git a/COPYRIGHT b/COPYRIGHT
index f6edc11..2aeb473 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -4,7 +4,7 @@ Here are the copyright notices applicable to the netaddr library.
 netaddr
 -------
 
-Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 
 Released under the BSD license. See the LICENSE file for details.
 
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index ca52b80..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,120 +0,0 @@
-netaddr is available in various packaged and non-packaged forms :
-
-- source code repository access
-- source release packages (tarball and zip formats)
-- Python eggs
-- Windows install packages
-
-Linux distribution specific :
-
-- Ubuntu and Debian (.deb packages)
-- Fedora (.rpm packages)
-
-Please see these Linux projects for availability and installation details.
-
-You can also build your own RPM packages, using bdist_rpm with setup.py
-available in the source tarball.
-
----------------------
-Locating the software
----------------------
-
-netaddr is available directly from the public subversion source code 
-repository.
-
-Details on how to check out the source code can be found here :
-
-    http://github.com/drkjam/netaddr/
-
-Official milestone releases can be found here :
-
-    http://github.com/drkjam/netaddr/downloads
-
------------------------
-Source Release Packages
------------------------
-
-Download the latest release tarball/zip file and extract it to a temporary
-location or check out the source from the code hosting site into a local
-working copy directory.
-
-Run the setup file in the root directory like this::
-
-    python setup.py install
-
-This automatically places the required files in the ``lib/site-packages``
-directory of the Python version you used to run the setup script, may be
-part of a virtualenv or similar.
-
------------
-Python Eggs
------------
-
-You can build and install eggs with netaddr using the ``setup_egg.py``
-file provided in the source distribution.
-
-All the usual commands are supported e.g.::
-
-    python setup_egg.py develop
-    python setup_egg.py bdist_egg
-    ...
-
-This requires that you install distribute or setuptools which is not part of
-the Python standard library.
-
-See the following URL for details :-
-
-    - ``distribute`` - http://guide.python-distribute.org/
-
-    - ``setuptools`` (old) - http://peak.telecommunity.com/DevCenter/setuptools
-
-.. warning:: ``setuptools`` is now very long in the tooth and full of bugs! \
-    Just use distribute, or pip instead.
-
-Download and install the latest easy_install script and run the following
-command ::
-
-    easy_install netaddr
-
-This will go to the Python Package Index and automatically find the 
-appropriate version of netaddr for your Python setup.
-
-Alternatively, you can use pip instead of easy_install.
-
-Just download the latest version of pip from PyPI found here -
-http://pypi.python.org/pypi/pip and run the following command ::
-
-    pip install netaddr
-
-------------------------
-Windows Install Packages
-------------------------
-
-On Windows, it is usually more convenient to use the binary install packages. 
-Please note that you may want to download a source zip file as well if you
-want local access to the API documentation and unit tests as these are not
-distributed along with the code in the Windows install packages.
-
-^^^^^^^^^^^^
-Security Tip
-^^^^^^^^^^^^
-
-.. warning:: while efforts are made to ensure that the Windows executables \
-    produced are virus free, they cannot be guaranteed to always be 100% free of \ 
-    possible nasties. Use them solely at your own risk!
-
-If you are either
-
-a) paranoid, or
-b) properly and correctly security conscious
-
-either run your own virus checking software against the setup executable
-before installing it or just download the .zip file and install netaddr using
-Python's ``setup.py`` script to mitigate any potential problems.
-
------------
-Final Words
------------
-
-Always be sure you verify your downloads against the checksums on the code 
-hosting site's download page!
diff --git a/LICENSE b/LICENSE
index 8522e99..995457a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -6,7 +6,7 @@ netaddr
 
 COPYRIGHT AND LICENSE
 
-Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
diff --git a/MANIFEST.in b/MANIFEST.in
index 4ed1799..6beed81 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -3,28 +3,23 @@ include CHANGELOG
 include COPYRIGHT
 include README.md
 include REFERENCES
-include THANKS
-include INSTALL
 include LICENSE
 include Makefile
 include MANIFEST.in
 include release.py
 include setup.cfg
 include setup.py
-include setup_egg.py
-include runtests.py
 
-recursive-include docs/source *
+recursive-include docs/source *.rst *.py
 
 include netaddr/__init__.py
 include netaddr/core.py
 include netaddr/compat.py
 include netaddr/fbsocket.py
 
+recursive-include netaddr/contrib *.py
 recursive-include netaddr/eui *.py *.txt *.idx
-
 recursive-include netaddr/ip *.py *.xml
-
 recursive-include netaddr/strategy *.py
 
 include netaddr/tests/__init__.py
@@ -34,6 +29,3 @@ recursive-include netaddr/tests/ip *.py
 recursive-include netaddr/tests/strategy *.py
 
 include netaddr/tools/netaddr
-
-global-exclude *.svn*
-global-exclude *.git*
diff --git a/Makefile b/Makefile
index 9f5d92e..2fee338 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,17 @@
 #-----------------------------------------------------------------------------
-#   Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 #
 #   Released under the BSD license. See the LICENSE file for details.
 #-----------------------------------------------------------------------------
 #
-# Unified build script for the netaddr library
+# netaddr library build script
 #
 SHELL = /bin/bash
 
-.PHONY = all clean dist doc download test
+.PHONY = default clean dist doc download test
 
-all:
-	@echo 'default target does nothing. try clean'
+default:
+	@echo 'Please select a build target.'
 
 clean:
 	@echo 'cleaning up temporary files'
@@ -24,27 +24,25 @@ clean:
 
 dist: clean doc
 	@echo 'building netaddr release'
-	python setup_egg.py develop
+	python setup.py develop
 	@echo 'building source distributions'
 	python setup.py sdist --formats=gztar,zip
-	@echo 'building egg package'
-	python setup_egg.py bdist_egg
 	@echo 'building wheel package'
 	pip install --upgrade pip
 	pip install wheel
-	python setup_egg.py bdist_wheel --universal
+	python setup.py bdist_wheel --universal
 
 doc:
 	@echo 'building documentation'
 	pip install sphinx
-	python setup_egg.py develop
+	python setup.py develop
 	cd docs/ && $(MAKE) -f Makefile clean html
 	cd docs/build/html && zip -r ../netaddr.zip *
 
 download:
 	@echo 'downloading latest IEEE data'
-	cd netaddr/eui/ && wget -N http://standards.ieee.org/develop/regauth/oui/oui.txt
-	cd netaddr/eui/ && wget -N http://standards.ieee.org/develop/regauth/iab/iab.txt
+	cd netaddr/eui/ && wget -N http://standards-oui.ieee.org/oui/oui.txt
+	cd netaddr/eui/ && wget -N http://standards-oui.ieee.org/iab/iab.txt
 	@echo 'rebuilding IEEE data file indices'
 	python netaddr/eui/ieee.py
 	@echo 'downloading latest IANA data'
@@ -63,7 +61,8 @@ push_tags:
 
 test: clean
 	@echo 'running test suite'
-	python setup.py test
+	pip install -r requirements.txt
+	py.test netaddr/tests
 	@echo 'running doc tests (tutorials)'
 	python tutorials/run_doctests.py
 
diff --git a/PKG-INFO b/PKG-INFO
index 5f5e01b..ab64a56 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,42 +1,47 @@
 Metadata-Version: 1.1
 Name: netaddr
-Version: 0.7.18
+Version: 0.7.19
 Summary: A network address manipulation library for Python
 Home-page: https://github.com/drkjam/netaddr/
-Author: David P. D. Moss
-Author-email: drkjam at gmail.com
+Author: Stefan Nordhausen
+Author-email: stefan.nordhausen at immobilienscout24.de
 License: BSD License
 Download-URL: https://pypi.python.org/pypi/netaddr/
-Description: Provides provides support for:
+Description: 
+                Provides support for:
         
-        Layer 3 addresses
+                Layer 3 addresses
+                -----------------
         
-            - IPv4 and IPv6 addresses, subnets, masks, prefixes
-            - iterating, slicing, sorting, summarizing and classifying IP networks
-            - dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)
-            - set based operations (unions, intersections etc) over IP addresses and subnets
-            - parsing a large variety of different formats and notations
-            - looking up IANA IP block information
-            - generating DNS reverse lookups
-            - supernetting and subnetting
+                - IPv4 and IPv6 addresses, subnets, masks, prefixes
+                - iterating, slicing, sorting, summarizing and classifying IP networks
+                - dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)
+                - set based operations (unions, intersections etc) over IP addresses and subnets
+                - parsing a large variety of different formats and notations
+                - looking up IANA IP block information
+                - generating DNS reverse lookups
+                - supernetting and subnetting
         
-        Layer 2 addresses
+                Layer 2 addresses
+                -----------------
         
-            - representation and manipulation MAC addresses and EUI-64 identifiers
-            - looking up IEEE organisational information (OUI, IAB)
-            - generating derived IPv6 addresses
+                - representation and manipulation MAC addresses and EUI-64 identifiers
+                - looking up IEEE organisational information (OUI, IAB)
+                - generating derived IPv6 addresses
         
-        Changes
-        -------
+                Changes
+                -------
         
-        For details on the latest updates and changes, see
+                For details on the latest changes and updates, see :-
         
-            https://github.com/drkjam/netaddr/blob/rel-0.7.x/CHANGELOG
+                http://netaddr.readthedocs.io/en/latest/changes.html
         
-        Documentation
-        -------------
-            - https://pythonhosted.org/netaddr/
-            - https://netaddr.readthedocs.org/en/latest/
+                Requirements
+                ------------
+        
+                Supports Python version 2.5 through 3.5
+        
+                Share and enjoy!
         
 Keywords: Networking,Systems Administration,IANA,IEEE,CIDR,IP,IPv4,IPv6,CIDR,EUI,MAC,MAC-48,EUI-48,EUI-64
 Platform: OS Independent
@@ -64,6 +69,7 @@ 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: Programming Language :: Python :: 3.6
 Classifier: Topic :: Communications
 Classifier: Topic :: Documentation
 Classifier: Topic :: Education
diff --git a/README.md b/README.md
index 4d766a4..d51e776 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,6 @@ A network address manipulation library for Python
 
 [![Circle CI](https://circleci.com/gh/drkjam/netaddr.png?style=shield)](https://circleci.com/gh/drkjam/netaddr) 
 [![Latest Version](https://img.shields.io/pypi/v/netaddr.svg)](https://pypi.python.org/pypi/netaddr)
-[![Documentation Status](https://readthedocs.org/projects/netaddr/badge/?version=latest)](http://netaddr.readthedocs.org/en/latest/)
 [![PyPI Downloads](https://img.shields.io/pypi/dm/netaddr.svg)](https://pypi.python.org/pypi/netaddr)
 
 Provides support for:
@@ -27,6 +26,12 @@ Layer 2 addresses
 - looking up IEEE organisational information (OUI, IAB)
 - generating derived IPv6 addresses
 
+
+Documentation
+-------------
+
+Latest documentation https://netaddr.readthedocs.io/en/latest/
+
 Requirements
 ------------
 [![Versions](https://img.shields.io/pypi/pyversions/netaddr.svg)](pypi.python.org/pypi/netaddr)
diff --git a/THANKS b/THANKS
deleted file mode 100644
index 0910cee..0000000
--- a/THANKS
+++ /dev/null
@@ -1,49 +0,0 @@
-netaddr is written and maintained by David P. D. Moss
-
-It is released under the BSD License.
-
-Many people further contributed to netaddr by reporting problems, suggesting
-various improvements or submitting actual code. Here is a list of these people
-(in alphabetical order). Help me keep it complete and free of errors.
-
-    Vincent Bernat <bernat AT debian.org>
-
-    Sebastien Douche <sdouche AT gmail.com>
-
-    John Eckersberg <john DOT eckersberg AT gmail.com>
-
-    Yi-Jheng Lin <yzlin AT cs.nctu.edu.tw>
-
-    Clay McClure <clay AT daemons.net> 
-
-    Duncan McGreggor <duncan DOT mcgreggor AT gmail.com> 
-
-    Stefan Nordhausen <stefan DOT nordhausen AT axiros.com> 
-
-    Brian F. Peters <brianfpeters AT gmail.com>
-
-    James William Pye <jwp AT gmail.com>
-
-    Chaitan Rogers <chaitan DOT rogers AT gmail.com>
-
-    Victor Stinner <victor DOT stinner AT haypocalc.com>
-
-    Andrew Stromnov <stromnov AT gmail.com>
-
-Thanks to everyone on the netaddr mailing list, those who raised bug reports
-and to all those who have, directly and indirectly, guided and influenced the 
-development and distribution of this library.
-
-Thanks also for the use of the following code contributions :-
-
-a) Python Cookbook recipe 18.11: "Formatting Integers as Binary Strings"
-
-    Python Cookbook 2d ed. (O'Reilly Media 2005) ISBN 0596-00797-3
-    Alex Martelli, Anna Martelli Ravenscroft and David Ascher 
-
-b) ASPN Cookbook Recipe 466286: "Integer set type" by Heiko Wundram
-
-    http://code.activestate.com/recipes/466286/
-
-And last but not least, thanks to Guido van Rossum for his encouraging words
-and for giving us all Python.
diff --git a/docs/source/changes.rst b/docs/source/changes.rst
index d26644a..3488d12 100644
--- a/docs/source/changes.rst
+++ b/docs/source/changes.rst
@@ -1,5 +1,5 @@
 ============================
-What's new in netaddr 0.7.18
+What's new in netaddr 0.7.19
 ============================
 
 .. include:: ../../CHANGELOG
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 1c6d72f..6c8a22e 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -41,16 +41,16 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'netaddr'
-copyright = u'2008-2015, David P. D. Moss. All rights reserved'
+copyright = u'Copyright (c) 2008 by David P. D. Moss. All rights reserved.'
 
 # 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 = '0.7.16'
+version = '0.7.19'
 # The full version, including alpha/beta/rc tags.
-release = '0.7.18'
+release = '0.7.19'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/docs/source/index.rst b/docs/source/index.rst
index a8e7cb5..ba36f41 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,14 +1,7 @@
 ============================
-netaddr 0.7.18 documentation
+netaddr 0.7.19 documentation
 ============================
 
-.. image:: https://circleci.com/gh/drkjam/netaddr.png?style=shield
-    :target: https://circleci.com/gh/drkjam/netaddr
-.. image:: https://readthedocs.org/projects/netaddr/badge/?version=latest
-    :target: https://netaddr.readthedocs.org/en/latest/
-.. image:: https://img.shields.io/pypi/dm/netaddr.svg
-    :target: https://pypi.python.org/pypi/netaddr
-
 .. toctree::
     :maxdepth: 1
 
diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst
index c3fdb8b..192b3f1 100644
--- a/docs/source/introduction.rst
+++ b/docs/source/introduction.rst
@@ -53,7 +53,7 @@ This library has comprehensive docstrings and a full set of project
 documentation (including tutorials):
 
 - http://pythonhosted.org/netaddr/
-- http://readthedocs.org/docs/netaddr/en/latest/
+- http://netaddr.readthedocs.io/en/latest/
 
 Tests
 -----
diff --git a/PKG-INFO b/netaddr.egg-info/PKG-INFO
similarity index 69%
copy from PKG-INFO
copy to netaddr.egg-info/PKG-INFO
index 5f5e01b..ab64a56 100644
--- a/PKG-INFO
+++ b/netaddr.egg-info/PKG-INFO
@@ -1,42 +1,47 @@
 Metadata-Version: 1.1
 Name: netaddr
-Version: 0.7.18
+Version: 0.7.19
 Summary: A network address manipulation library for Python
 Home-page: https://github.com/drkjam/netaddr/
-Author: David P. D. Moss
-Author-email: drkjam at gmail.com
+Author: Stefan Nordhausen
+Author-email: stefan.nordhausen at immobilienscout24.de
 License: BSD License
 Download-URL: https://pypi.python.org/pypi/netaddr/
-Description: Provides provides support for:
+Description: 
+                Provides support for:
         
-        Layer 3 addresses
+                Layer 3 addresses
+                -----------------
         
-            - IPv4 and IPv6 addresses, subnets, masks, prefixes
-            - iterating, slicing, sorting, summarizing and classifying IP networks
-            - dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)
-            - set based operations (unions, intersections etc) over IP addresses and subnets
-            - parsing a large variety of different formats and notations
-            - looking up IANA IP block information
-            - generating DNS reverse lookups
-            - supernetting and subnetting
+                - IPv4 and IPv6 addresses, subnets, masks, prefixes
+                - iterating, slicing, sorting, summarizing and classifying IP networks
+                - dealing with various ranges formats (CIDR, arbitrary ranges and globs, nmap)
+                - set based operations (unions, intersections etc) over IP addresses and subnets
+                - parsing a large variety of different formats and notations
+                - looking up IANA IP block information
+                - generating DNS reverse lookups
+                - supernetting and subnetting
         
-        Layer 2 addresses
+                Layer 2 addresses
+                -----------------
         
-            - representation and manipulation MAC addresses and EUI-64 identifiers
-            - looking up IEEE organisational information (OUI, IAB)
-            - generating derived IPv6 addresses
+                - representation and manipulation MAC addresses and EUI-64 identifiers
+                - looking up IEEE organisational information (OUI, IAB)
+                - generating derived IPv6 addresses
         
-        Changes
-        -------
+                Changes
+                -------
         
-        For details on the latest updates and changes, see
+                For details on the latest changes and updates, see :-
         
-            https://github.com/drkjam/netaddr/blob/rel-0.7.x/CHANGELOG
+                http://netaddr.readthedocs.io/en/latest/changes.html
         
-        Documentation
-        -------------
-            - https://pythonhosted.org/netaddr/
-            - https://netaddr.readthedocs.org/en/latest/
+                Requirements
+                ------------
+        
+                Supports Python version 2.5 through 3.5
+        
+                Share and enjoy!
         
 Keywords: Networking,Systems Administration,IANA,IEEE,CIDR,IP,IPv4,IPv6,CIDR,EUI,MAC,MAC-48,EUI-48,EUI-64
 Platform: OS Independent
@@ -64,6 +69,7 @@ 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: Programming Language :: Python :: 3.6
 Classifier: Topic :: Communications
 Classifier: Topic :: Documentation
 Classifier: Topic :: Education
diff --git a/netaddr.egg-info/SOURCES.txt b/netaddr.egg-info/SOURCES.txt
new file mode 100644
index 0000000..59dcda1
--- /dev/null
+++ b/netaddr.egg-info/SOURCES.txt
@@ -0,0 +1,88 @@
+AUTHORS
+CHANGELOG
+COPYRIGHT
+LICENSE
+MANIFEST.in
+Makefile
+README.md
+REFERENCES
+setup.cfg
+setup.py
+docs/source/api.rst
+docs/source/authors.rst
+docs/source/changes.rst
+docs/source/conf.py
+docs/source/contributors.rst
+docs/source/copyright.rst
+docs/source/index.rst
+docs/source/installation.rst
+docs/source/introduction.rst
+docs/source/license.rst
+docs/source/references.rst
+docs/source/tutorial_01.rst
+docs/source/tutorial_02.rst
+docs/source/tutorial_03.rst
+netaddr/__init__.py
+netaddr/compat.py
+netaddr/core.py
+netaddr/fbsocket.py
+netaddr.egg-info/PKG-INFO
+netaddr.egg-info/SOURCES.txt
+netaddr.egg-info/dependency_links.txt
+netaddr.egg-info/top_level.txt
+netaddr/contrib/__init__.py
+netaddr/contrib/subnet_splitter.py
+netaddr/eui/__init__.py
+netaddr/eui/iab.idx
+netaddr/eui/iab.txt
+netaddr/eui/ieee.py
+netaddr/eui/oui.idx
+netaddr/eui/oui.txt
+netaddr/ip/__init__.py
+netaddr/ip/glob.py
+netaddr/ip/iana.py
+netaddr/ip/ipv4-address-space.xml
+netaddr/ip/ipv6-address-space.xml
+netaddr/ip/ipv6-unicast-address-assignments.xml
+netaddr/ip/multicast-addresses.xml
+netaddr/ip/nmap.py
+netaddr/ip/rfc1924.py
+netaddr/ip/sets.py
+netaddr/strategy/__init__.py
+netaddr/strategy/eui48.py
+netaddr/strategy/eui64.py
+netaddr/strategy/ipv4.py
+netaddr/strategy/ipv6.py
+netaddr/tests/__init__.py
+netaddr/tests/core/__init__.py
+netaddr/tests/core/test_compat.py
+netaddr/tests/core/test_pubsub.py
+netaddr/tests/eui/__init__.py
+netaddr/tests/eui/sample_iab.txt
+netaddr/tests/eui/sample_oui.txt
+netaddr/tests/eui/test_eui.py
+netaddr/tests/eui/test_ieee_parsers.py
+netaddr/tests/ip/__init__.py
+netaddr/tests/ip/test_cidr_v4.py
+netaddr/tests/ip/test_cidr_v6.py
+netaddr/tests/ip/test_dns.py
+netaddr/tests/ip/test_ip_categories.py
+netaddr/tests/ip/test_ip_comparisons.py
+netaddr/tests/ip/test_ip_globs.py
+netaddr/tests/ip/test_ip_ranges.py
+netaddr/tests/ip/test_ip_rfc1924.py
+netaddr/tests/ip/test_ip_sets.py
+netaddr/tests/ip/test_ip_splitter.py
+netaddr/tests/ip/test_ip_v4.py
+netaddr/tests/ip/test_ip_v4_v6_conversions.py
+netaddr/tests/ip/test_ip_v6.py
+netaddr/tests/ip/test_network_ops.py
+netaddr/tests/ip/test_nmap.py
+netaddr/tests/ip/test_old_specs.py
+netaddr/tests/ip/test_platform_osx.py
+netaddr/tests/ip/test_socket_module_fallback.py
+netaddr/tests/strategy/__init__.py
+netaddr/tests/strategy/test_eui48_strategy.py
+netaddr/tests/strategy/test_ipv4_strategy.py
+netaddr/tests/strategy/test_ipv6_strategy.py
+netaddr/tools/netaddr
\ No newline at end of file
diff --git a/netaddr.egg-info/dependency_links.txt b/netaddr.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/netaddr.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/netaddr.egg-info/top_level.txt b/netaddr.egg-info/top_level.txt
new file mode 100644
index 0000000..4f6a277
--- /dev/null
+++ b/netaddr.egg-info/top_level.txt
@@ -0,0 +1 @@
+netaddr
diff --git a/netaddr/__init__.py b/netaddr/__init__.py
index b2615d8..61e88ac 100644
--- a/netaddr/__init__.py
+++ b/netaddr/__init__.py
@@ -1,12 +1,12 @@
 #-----------------------------------------------------------------------------
-#   Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 #
 #   Released under the BSD license. See the LICENSE file for details.
 #-----------------------------------------------------------------------------
 """A Python library for manipulating IP and EUI network addresses."""
 
 #: Version info (major, minor, maintenance, status)
-VERSION = (0, 7, 18)
+VERSION = (0, 7, 19)
 STATUS = ''
 __version__ = '%d.%d.%d' % VERSION[0:3] + STATUS
 
@@ -45,44 +45,4 @@ from netaddr.strategy.eui48 import (mac_eui48, mac_unix, mac_unix_expanded,
 from netaddr.strategy.eui64 import (eui64_base, eui64_unix, eui64_unix_expanded,
         eui64_cisco, eui64_bare, valid_str as valid_eui64)
 
-__all__ = [
-    #   Constants.
-    'ZEROFILL', 'Z', 'INET_PTON', 'P', 'NOHOST', 'N',
-
-    #   Custom Exceptions.
-    'AddrConversionError', 'AddrFormatError', 'NotRegisteredError',
-
-    #   IP classes.
-    'IPAddress', 'IPNetwork', 'IPRange', 'IPSet',
-
-    #   IPv6 dialect classes.
-    'ipv6_compact', 'ipv6_full', 'ipv6_verbose',
-
-    #   IP functions and generators.
-    'all_matching_cidrs', 'cidr_abbrev_to_verbose', 'cidr_exclude',
-    'cidr_merge', 'iprange_to_cidrs', 'iter_iprange', 'iter_unique_ips',
-    'largest_matching_cidr', 'smallest_matching_cidr', 'spanning_cidr',
-
-    #   IP globbing class.
-    'IPGlob',
-
-    #   IP globbing functions.
-    'cidr_to_glob', 'glob_to_cidrs', 'glob_to_iprange', 'glob_to_iptuple',
-    'iprange_to_globs',
-
-    #   IEEE EUI classes.
-    'EUI', 'IAB', 'OUI',
-
-    #   EUI-48 (MAC) dialect classes.
-    'mac_bare', 'mac_cisco', 'mac_eui48', 'mac_pgsql', 'mac_unix',
-    'mac_unix_expanded',
-
-    #   Validation functions.
-    'valid_ipv4', 'valid_ipv6', 'valid_glob', 'valid_mac',
-
-    #   nmap-style range functions.
-    'valid_nmap_range', 'iter_nmap_range',
-
-    #   RFC 1924 functions.
-    'base85_to_ipv6', 'ipv6_to_base85',
-]
+from netaddr.contrib.subnet_splitter import SubnetSplitter
diff --git a/netaddr/compat.py b/netaddr/compat.py
index 7e39ed7..0fe69ee 100644
--- a/netaddr/compat.py
+++ b/netaddr/compat.py
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-#   Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 #
 #   Released under the BSD license. See the LICENSE file for details.
 #-----------------------------------------------------------------------------
@@ -19,6 +19,8 @@ if _sys.version_info[0] == 3:
 
     _str_type = str
 
+    _bytes_type = lambda x: bytes(x, 'UTF-8')
+
     _is_str = lambda x: isinstance(x, (str, type(''.encode())))
 
     _is_int = lambda x: isinstance(x, int)
@@ -67,6 +69,8 @@ elif _sys.version_info[0:2] > [2, 3]:
 
     _str_type = basestring
 
+    _bytes_type = str
+
     _is_str = lambda x: isinstance(x, basestring)
 
     _is_int = lambda x: isinstance(x, (int, long))
diff --git a/netaddr/contrib/__init__.py b/netaddr/contrib/__init__.py
new file mode 100644
index 0000000..7449cd6
--- /dev/null
+++ b/netaddr/contrib/__init__.py
@@ -0,0 +1,12 @@
+#-----------------------------------------------------------------------------
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
+#
+#   Released under the BSD license. See the LICENSE file for details.
+#-----------------------------------------------------------------------------
+"""
+The netaddr.contrib namespace for non-core code contributed by users.
+
+It is a testing ground for new ideas. Depending on the interest in
+functionality found here, code may find its way into the core in various
+ways, either as is or as additions to existing APIs.
+"""
diff --git a/netaddr/contrib/subnet_splitter.py b/netaddr/contrib/subnet_splitter.py
new file mode 100644
index 0000000..875b113
--- /dev/null
+++ b/netaddr/contrib/subnet_splitter.py
@@ -0,0 +1,46 @@
+#-----------------------------------------------------------------------------
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
+#
+#   Released under the BSD license. See the LICENSE file for details.
+#-----------------------------------------------------------------------------
+from netaddr.ip import IPNetwork, cidr_exclude, cidr_merge
+
+
+class SubnetSplitter(object):
+    """
+    A handy utility class that takes a single (large) subnet and allows
+    smaller subnet within its range to be extracted by CIDR prefix. Any
+    leaving address space is available for subsequent extractions until
+    all space is exhausted.
+    """
+    def __init__(self, base_cidr):
+        """
+        Constructor.
+
+        :param base_cidr: an IPv4 or IPv6 address with a CIDR prefix.
+            (see IPNetwork.__init__ for full details).
+        """
+        self._subnets = set([IPNetwork(base_cidr)])
+
+    def extract_subnet(self, prefix, count=None):
+        """Extract 1 or more subnets of size specified by CIDR prefix."""
+        for cidr in self.available_subnets():
+            subnets = list(cidr.subnet(prefix, count=count))
+            if not subnets:
+                continue
+            self.remove_subnet(cidr)
+            self._subnets = self._subnets.union(
+                set(
+                    cidr_exclude(cidr, cidr_merge(subnets)[0])
+                )
+            )
+            return subnets
+        return []
+
+    def available_subnets(self):
+        """Returns a list of the currently available subnets."""
+        return sorted(self._subnets, key=lambda x: x.prefixlen, reverse=True)
+
+    def remove_subnet(self, ip_network):
+        """Remove a specified IPNetwork from available address space."""
+        self._subnets.remove(ip_network)
diff --git a/netaddr/core.py b/netaddr/core.py
index 895506a..f17eaba 100644
--- a/netaddr/core.py
+++ b/netaddr/core.py
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-#   Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
+#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
 #
 #   Released under the BSD license. See the LICENSE file for details.
 #-----------------------------------------------------------------------------
@@ -204,22 +204,3 @@ class DictDotLookup(object):
 
     def __repr__(self):
         return _pprint.pformat(self.__dict__)
-
-
-def dos2unix(filename):
-    """
-    Replace DOS line endings (CRLF) with UNIX line endings (LF) in file.
-
-    """
-    fh = open(filename, "rb")
-    data = fh.read()
-    fh.close()
... 385549 lines suppressed ...

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



More information about the Python-modules-commits mailing list