Commit b50e2e96 authored by Stefano Rivera's avatar Stefano Rivera

New upstream version 3.4.1

parent 18493e23
language: python
sudo: false
dist: xenial
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- 3.7
addons:
apt:
packages:
- graphviz
apt:
packages:
- graphviz
install:
- pip install coverage coveralls flake8 -e .
before_script:
......
......@@ -3,6 +3,14 @@ Changes
.. currentmodule:: objgraph
3.4.1 (2019-04-23)
------------------
- Add support for Python 3.7.
- Drop support for Python 3.3 and 3.4.
3.4.0 (2018-02-13)
------------------
......
......@@ -5,8 +5,6 @@ FILE_WITH_CHANGELOG = CHANGES.rst
VCS_DIFF_IMAGES = git diff docs/*.png
SUPPORTED_PYTHON_VERSIONS = 2.7 3.3 3.4 3.5 3.6
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXBUILDDIR = docs/_build
......@@ -40,16 +38,7 @@ check: coverage
.PHONY: test-all-pythons
test-all-pythons:
set -e; \
for ver in $(SUPPORTED_PYTHON_VERSIONS); do \
if which python$$ver > /dev/null; then \
$(MAKE) test PYTHON=python$$ver; \
else \
echo "=================================="; \
echo "Skipping python$$ver, not available."; \
echo "=================================="; \
fi; \
done
tox
.PHONY: preview-pypi-description
preview-pypi-description:
......@@ -58,14 +47,13 @@ preview-pypi-description:
.PHONY: coverage
coverage:
coverage run --source=objgraph tests.py
python2 -m coverage run --source=objgraph tests.py
python3 -m coverage run -a --source=objgraph tests.py
coverage report -m --fail-under=100
.PHONY: lint
lint:
flake8 --exclude=build,docs/conf.py --ignore=E226
flake8 --exclude=build,docs/conf.py --doctests --ignore=E226,F821
flake8
# Make sure $(VCS_DIFF_IMAGES) can work
.PHONY: config-imgdiff
......
Metadata-Version: 1.1
Name: objgraph
Version: 3.4.0
Version: 3.4.1
Summary: Draws Python object reference graphs with graphviz
Home-page: https://mg.pov.lt/objgraph/
Author: Marius Gedminas
Author-email: marius@gedmin.as
License: MIT
Description-Content-Type: UNKNOWN
Description: Python Object Graphs
====================
......@@ -82,6 +81,14 @@ Description: Python Object Graphs
3.4.1 (2019-04-23)
------------------
- Add support for Python 3.7.
- Drop support for Python 3.3 and 3.4.
3.4.0 (2018-02-13)
------------------
......@@ -394,10 +401,7 @@ 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.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
......@@ -5,10 +5,9 @@ environment:
# https://www.appveyor.com/docs/installed-software#python lists available
# versions
- PYTHON: "C:\\Python27"
- PYTHON: "C:\\Python33"
- PYTHON: "C:\\Python34"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python37"
init:
- "echo %PYTHON%"
......
Metadata-Version: 1.1
Name: objgraph
Version: 3.4.0
Version: 3.4.1
Summary: Draws Python object reference graphs with graphviz
Home-page: https://mg.pov.lt/objgraph/
Author: Marius Gedminas
Author-email: marius@gedmin.as
License: MIT
Description-Content-Type: UNKNOWN
Description: Python Object Graphs
====================
......@@ -82,6 +81,14 @@ Description: Python Object Graphs
3.4.1 (2019-04-23)
------------------
- Add support for Python 3.7.
- Drop support for Python 3.3 and 3.4.
3.4.0 (2018-02-13)
------------------
......@@ -394,10 +401,7 @@ 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.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
......@@ -56,8 +56,8 @@ except ImportError:
__author__ = "Marius Gedminas (marius@gedmin.as)"
__copyright__ = "Copyright (c) 2008-2017 Marius Gedminas and contributors"
__license__ = "MIT"
__version__ = '3.4.0'
__date__ = '2018-02-13'
__version__ = '3.4.1'
__date__ = '2019-04-23'
try:
......@@ -847,8 +847,10 @@ def is_proper_module(obj):
.. versionadded:: 1.8
"""
return (inspect.ismodule(obj) and
obj is sys.modules.get(getattr(obj, '__name__', None)))
return (
inspect.ismodule(obj)
and obj is sys.modules.get(getattr(obj, '__name__', None))
)
#
......@@ -1171,8 +1173,8 @@ def _gradient(start_color, end_color, depth, max_depth):
def _edge_label(source, target, shortnames=True):
if (_isinstance(target, dict) and
target is getattr(source, '__dict__', None)):
if (_isinstance(target, dict)
and target is getattr(source, '__dict__', None)):
return ' [label="__dict__",weight=10]'
if _isinstance(source, types.FrameType):
if target is source.f_locals:
......
# Makefile.rules version 1.1 (2017-12-20)
# release.mk version 1.4 (2019-04-23)
#
# Helpful Makefile rules for releasing Python packages.
# https://github.com/mgedmin/python-project-skel
......@@ -8,10 +8,13 @@ FILE_WITH_VERSION ?= setup.py
FILE_WITH_CHANGELOG ?= CHANGES.rst
CHANGELOG_DATE_FORMAT ?= %Y-%m-%d
CHANGELOG_FORMAT ?= $(changelog_ver) ($(changelog_date))
DISTCHECK_DIFF_OPTS ?= $(DISTCHECK_DIFF_DEFAULT_OPTS)
# These should be fine
PYTHON ?= python
PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine upload dist/*
PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine check dist/* && twine upload dist/*
LATEST_RELEASE_MK_URL = https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk
DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -I'^\#'
# These should be fine, as long as you use Git
VCS_GET_LATEST ?= git pull
......@@ -54,7 +57,7 @@ distcheck-sdist:
$(VCS_EXPORT) && \
cd tmp && \
tar -xzf ../dist/$$pkg_and_version.tar.gz && \
diff -ur $$pkg_and_version tree -x PKG-INFO -x setup.cfg -x '*.egg-info' && \
diff -ur $$pkg_and_version tree $(DISTCHECK_DIFF_OPTS) && \
cd $$pkg_and_version && \
make dist check && \
cd .. && \
......@@ -64,13 +67,16 @@ distcheck-sdist:
cd ../two/ && \
tar -xzf ../$$pkg_and_version/dist/$$pkg_and_version.tar.gz && \
cd .. && \
diff -ur one two -x SOURCES.txt && \
diff -ur one two -x SOURCES.txt -I'^#:' && \
cd .. && \
rm -rf tmp && \
echo "sdist seems to be ok"
# NB: do not use $(MAKE) because then make -n releasechecklist will
# actually run the distcheck instead of just printing what it does
.PHONY: check-latest-rules
check-latest-rules:
ifndef FORCE
@curl -s $(LATEST_RELEASE_MK_URL) | cmp -s release.mk || { printf "\nYour release.mk does not match the latest version at\n$(LATEST_RELEASE_MK_URL)\n\n" 1>&2; exit 1; }
endif
.PHONY: check-latest-version
check-latest-version:
......@@ -91,8 +97,11 @@ check-changelog:
grep -q "^$$ver_and_date$$" $(FILE_WITH_CHANGELOG) || { \
echo "$(FILE_WITH_CHANGELOG) has no entry for $$ver_and_date"; exit 1; }
# NB: do not use $(MAKE) because then make -n releasechecklist will
# actually run the distcheck instead of just printing what it does
.PHONY: releasechecklist
releasechecklist: check-latest-version check-version-number check-long-description check-changelog
releasechecklist: check-latest-rules check-latest-version check-version-number check-long-description check-changelog
make distcheck
.PHONY: release
......
[flake8]
ignore = E226
exclude = .tox,build,dist,docs/conf.py
doctests = yes
builtins = obj, obj1, obj2, MyClass
ignore = E226,W503
[zest.releaser]
python-file-with-version = objgraph.py
......
......@@ -72,13 +72,10 @@ setup(
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
keywords='object graph visualization graphviz garbage collection',
py_modules=['objgraph'],
......
......@@ -12,11 +12,11 @@ import textwrap
import types
import unittest
# distutils imports `imp`, which triggers a DeprecationWarning starting with
# setuptools imports `imp`, which triggers a DeprecationWarning starting with
# Python 3.4 in the middle of my pristine test suite. But if I do the import
# upfront, there's no warning. I cannot explain this, I'm just happy there's
# no warning.
import distutils # noqa
import setuptools # noqa
try:
from unittest import mock
......@@ -409,7 +409,7 @@ class StringRepresentationTest(GarbageCollectedMixin,
self.assertRegex(
objgraph._obj_label(x, shortnames=False),
'mymodule\.MyClass\\\\n<mymodule\.MyClass object at .*')
r'mymodule\.MyClass\\n<mymodule\.MyClass object at .*')
def test_long_typename_with_no_module(self):
x = type('MyClass', (), {'__module__': None})()
......@@ -478,8 +478,6 @@ class StringRepresentationTest(GarbageCollectedMixin,
(0.2, 0.3, 0.4), 0, 0))
@skipIf(sys.version_info[0] > 2, "Python 3 has no unbound methods")
@skipIf(sys.version_info[:2] < (2, 6),
"Python 2.5 and older has no __func__")
def test_edge_label_unbound_method(self):
class MyClass(object):
def a_method(self):
......@@ -494,7 +492,7 @@ class StringRepresentationTest(GarbageCollectedMixin,
self.assertRegex(
objgraph._edge_label(d, 1, shortnames=False),
' [label="mymodule\.MyClass\\n<mymodule\.MyClass object at .*"]')
r' [label="mymodule\.MyClass\n<mymodule\.MyClass object at .*"]')
def test_short_repr_lambda(self):
f = lambda x: x # noqa
......@@ -618,7 +616,7 @@ class RandomOutputChecker(doctest.OutputChecker):
class IgnoreNodeCountChecker(RandomOutputChecker):
_r = re.compile('\(\d+ nodes\)$', re.MULTILINE)
_r = re.compile(r'\(\d+ nodes\)$', re.MULTILINE)
def check_output(self, want, got, optionflags):
if optionflags & NODES_VARY:
......
[tox]
envlist = py27, py33, py34, py35, py36
envlist = py27, py35, py36, py37
[testenv]
deps = mock
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment