Skip to content

Commit

Permalink
Merge pull request #10 from jathanism/v6
Browse files Browse the repository at this point in the history
Python 3 support, dropping Python 2
  • Loading branch information
jathanism authored Mar 31, 2021
2 parents 77588c4 + f106aa3 commit 2994632
Show file tree
Hide file tree
Showing 13 changed files with 1,195 additions and 406 deletions.
7 changes: 0 additions & 7 deletions .hgignore

This file was deleted.

6 changes: 0 additions & 6 deletions .hgtags

This file was deleted.

18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python
matrix:
include:
- python: "3.7"
- python: "3.8"
- python: "3.9"
before_install:
- pip install poetry
install:
- poetry config virtualenvs.create false
# Poetry 1.1.0 added parallel installation as an option;
# unfortunately it seems to have some issues with installing/updating "requests" and "certifi"
# while simultaneously atttempting to *use* those packages to install other packages.
# For now we disable it.
- poetry config installer.parallel false
- poetry install --no-ansi
script:
- poetry run pytest
12 changes: 8 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
Changelog
=========

0.7.0 -
- Python3 support via six
- Python2.6 required
2.0.0 - 2021-03-03
==================

- Python3 required
- Python2 dropped
- Implemented black and pytest and pylint
- Switched from setuptools + ``setup.py`` to Poetry + ``pyproject.toml``

0.6.5 - 2015-08-11
==================
Expand Down Expand Up @@ -41,7 +45,7 @@ Changelog
- Other housekeeping within setup.py

0.6 - 2012-04-10
==================
================

- IPv6 addresses are now supported!
- Enhanced dump output to display IP version
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

42 changes: 28 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
=======
CIDRIZE
Cidrize
=======

Intelligently parse IPv4/IPv6 addresses, CIDRs, ranges, and wildcard matches to
IP address parsing for humans.

Cidrize takes IP address inputs that people tend to use in practice, validates
them, and converts them to objects.

Intelligently parses IPv4/IPv6 addresses, CIDRs, ranges, and wildcard matches to
attempt return a valid list of IP addresses.

The ``cidrize()`` function does all the work trying to parse IP addresses correctly.

============
Installation
============

You can install ``cidrize`` via Pip::

pip install cidrize

============
Dependencies
============

Cidrize is basically a thin veneer around `netaddr <http://pypi.python.org/pypi/netaddr/>`_ to provide a human layer for parsing IP addresses.

=====
Usage
=====

Supported input formats
-----------------------

Expand All @@ -31,23 +54,15 @@ Network mask (e.g. 192.0.2.0 255.255.255.0) and host mask (aka reverse mask,

The cidrize function returns a list of consolidated ``netaddr.IPNetwork``
objects. By default parsing exceptions will raise a ``CidrizeError`` (with
default argument of ``modular=True``). You may pass ``modular=False`` to cause
default argument of ``raise_errors=True``). You may pass ``raise_errors=False`` to cause
exceptions to be stripped and the error text will be returned as a list. This
is intended for use with scripts or APIs where receiving exceptions would not
be preferred.

The module may also be run as a script for debugging purposes.

============
Dependencies
============

:`netaddr <http://pypi.python.org/pypi/netaddr/>`_: Pythonic manipulation of
IPv4, IPv6, CIDR, EUI and MAC network addresses

=====
Usage
=====
The cidrize function
--------------------

Fire up your trusty old Python interpreter and follow along!

Expand Down Expand Up @@ -148,7 +163,6 @@ Verbose output::

And that's that!


=======
License
=======
Expand Down
Loading

0 comments on commit 2994632

Please sign in to comment.