diff --git a/.travis.yml b/.travis.yml
index cef4100..e99e66d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,19 @@
+os: linux
language: python
-
+cache: pip
+dist: xenial
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
-
+ - "3.7"
+ - "3.8"
install:
- - pip install -U tox-travis
-
+ - pip install -U pip setuptools
+ - pip install tox-travis
script:
- tox
-
notifications:
email:
- stix-commits-list@groups.mitre.org
diff --git a/CHANGES.txt b/CHANGES.txt
index 587bbc0..6c2de9a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,15 @@
+Version 4.1.0.17
+2020-11-16
+- Remove deprecation warning for collections module
+
+Version 4.1.0.16
+2019-09-17
+- [#96] Fix problem when installing from Python 2.7
+
+Version 4.1.0.15
+2019-09-06
+- Update project requirements
+
Version 4.1.0.14
2018-08-03
- Drop support for Python 2.6, 3.3
diff --git a/README.rst b/README.rst
index dea7835..2ef5d63 100644
--- a/README.rst
+++ b/README.rst
@@ -1,10 +1,10 @@
python-maec
===========
-A Python library for parsing, manipulating, and generating `Malware Attribute Enumeration and Characterization (MAECâ„¢) `_ content.
+A Python library for parsing, manipulating, and generating `Malware Attribute Enumeration and Characterization (MAECâ„¢) `_ v4.1 content.
:Source: https://github.com/MAECProject/python-maec
-:Documentation: http://maec.readthedocs.org
+:Documentation: https://maec.readthedocs.io/
:Information: https://maecproject.github.io/
:Download: https://pypi.python.org/pypi/maec/
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index ed5570e..069c224 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -23,7 +23,7 @@ Once you have installed python-maec, you can begin writing Python applications t
.. note::
- The *python-maec* library provides **bindings** and **APIs**, both of which can be used to parse and write MAEC XML files. For in-depth description of the *APIs, bindings, and the differences between the two*, please refer to :doc:`api_vs_bindings/index`
+ The *python-maec* library provides **bindings** and **APIs**, both of which can be used to parse and write MAEC XML files. For in-depth description of the *APIs, bindings, and the differences between the two*, please refer to :doc:`api_vs_bindings/index`
Creating a MAEC Package
***********************
diff --git a/docs/index.rst b/docs/index.rst
index f667181..47a49af 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -15,13 +15,13 @@ version of MAEC.
============ ===================
MAEC Version python-maec Version
============ ===================
-4.1 4.1.0.12 (`PyPI`__) (`GitHub`__)
+4.1 4.1.0.17 (`PyPI`__) (`GitHub`__)
4.0 4.0.1.0 (`PyPI`__) (`GitHub`__)
3.0 3.0.0b1 (`PyPI`__) (`GitHub`__)
============ ===================
-__ https://pypi.python.org/pypi/maec/4.1.0.12
-__ https://github.com/MAECProject/python-maec/tree/v4.1.0.12
+__ https://pypi.python.org/pypi/maec/4.1.0.17
+__ https://github.com/MAECProject/python-maec/tree/v4.1.0.17
__ https://pypi.python.org/pypi/maec/4.0.1.0
__ https://github.com/MAECProject/python-maec/tree/v4.0.1.0
__ https://pypi.python.org/pypi/maec/3.0.0b1
diff --git a/maec/utils/comparator.py b/maec/utils/comparator.py
index 50e43fd..8aea9aa 100644
--- a/maec/utils/comparator.py
+++ b/maec/utils/comparator.py
@@ -1,5 +1,5 @@
# MAEC Comparator Classes
-import collections
+from mixbox import compat
class ComparisonResult(object):
def __init__(self, bundle_list, lookup_table):
@@ -154,7 +154,7 @@ def get_val(cls, obj, typed_field, hash_val, nested_elements = None):
val = getattr(obj.properties, str(typed_field))
if val is not None:
hash_val += str(typed_field) + ":"
- if isinstance(val, collections.MutableSequence):
+ if isinstance(val, compat.MutableSequence):
for list_item in val:
if '/' in str(nested_elements[0]):
hash_val += '['
diff --git a/maec/utils/deduplicator.py b/maec/utils/deduplicator.py
index b10f1d0..7b96fa3 100644
--- a/maec/utils/deduplicator.py
+++ b/maec/utils/deduplicator.py
@@ -4,9 +4,9 @@
# See LICENSE.txt for complete terms
-import collections
import copy
+from mixbox import compat
from mixbox import entities
from cybox.core import RelatedObject, AssociatedObject
@@ -179,7 +179,7 @@ def get_typedfield_values(cls, val, name, values, ignoreCase=False):
# If the value is a mutable sequence, attempt to find TypedFields as
# in each item. EntityLists are Entity subclasses that can have
# TypedFields, so we don't make this an elif.
- if isinstance(val, collections.MutableSequence):
+ if isinstance(val, compat.MutableSequence):
for list_item in val:
cls.get_typedfield_values(list_item, name, values, ignoreCase)
diff --git a/maec/version.py b/maec/version.py
index 57eb63f..b87b594 100644
--- a/maec/version.py
+++ b/maec/version.py
@@ -1,4 +1,4 @@
# Copyright (c) 2018, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
-__version__ = "4.1.0.14"
+__version__ = "4.1.0.17"
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..395669c
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,17 @@
+[bumpversion]
+current_version = 4.1.0.17
+parse = (?P\d+)\.(?P\d+)\.(?P\d+).(?P\d+)
+serialize = {major}.{minor}.{patch}.{revision}
+commit = True
+tag = True
+
+[bumpversion:file:maec/version.py]
+
+[bumpversion:file:docs/index.rst]
+
+[metadata]
+license_file = LICENSE.txt
+
+[bdist_wheel]
+universal = True
+
diff --git a/setup.py b/setup.py
index a7b2a60..da68f08 100644
--- a/setup.py
+++ b/setup.py
@@ -12,6 +12,7 @@
BASE_DIR = dirname(abspath(__file__))
VERSION_FILE = join(BASE_DIR, 'maec', 'version.py')
+
def get_version():
with open(VERSION_FILE) as f:
for line in f.readlines():
@@ -21,14 +22,16 @@ def get_version():
raise AttributeError("Package does not have a __version__")
-with open('README.rst', encoding='utf-8') as f:
- readme = f.read()
+def get_long_description():
+ with open('README.rst', encoding='utf-8') as f:
+ return f.read()
install_requires = [
- 'lxml>=2.2.3',
- 'mixbox>=0.0.13',
- 'cybox>=2.1.0.13.dev1,<2.1.1.0',
+ 'lxml>=2.2.3 ; python_version == "2.7" or python_version >= "3.5"',
+ 'lxml>=2.2.3,<4.4.0 ; python_version > "2.7" and python_version < "3.5"',
+ 'mixbox>=1.0.4',
+ 'cybox>=2.1.0.13,<2.1.1.0',
]
extras_require = {
@@ -48,21 +51,29 @@ def get_version():
author="MAEC Project",
author_email="maec@mitre.org",
description="An API for parsing and creating MAEC content.",
- long_description=readme,
- url="http://maec.mitre.org",
+ long_description=get_long_description(),
+ url="https://maecproject.github.io/",
packages=find_packages(),
install_requires=install_requires,
extras_require=extras_require,
+ license="BSD",
classifiers=[
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
+ "Programming Language :: Python :: 2",
+ "Programming Language :: Python :: 2.7",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.4",
+ "Programming Language :: Python :: 3.5",
+ "Programming Language :: Python :: 3.6",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
- ]
+ ],
+ project_urls={
+ 'Documentation': 'https://maec.readthedocs.io/',
+ 'Source Code': 'https://github.com/MAECProject/python-maec/',
+ 'Bug Tracker': 'https://github.com/MAECProject/python-maec/issues/',
+ },
)
diff --git a/tox.ini b/tox.ini
index bf42ae9..d50a0b4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,18 +1,28 @@
[tox]
-envlist = py27,py34,py35,py36
+envlist = py27, py34, py35, py36, py37, py38, docs, packaging
[testenv]
commands =
nosetests maec
- sphinx-build -b doctest docs docs/_build/doctest
- sphinx-build -b html docs docs/_build/html
deps =
-rrequirements.txt
+[testenv:docs]
+commands =
+ sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs {envtmpdir}/doctest
+ sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
+
+[testenv:packaging]
+deps =
+ readme_renderer
+commands =
+ python setup.py check -r -s
[travis]
python =
- 2.7: py27
+ 2.7: py27, docs, packaging
3.4: py34
3.5: py35
- 3.6: py36
+ 3.6: py36, docs, packaging
+ 3.7: py37
+ 3.8: py38