objgraph-3.4.0/ 0000755 0001750 0001750 00000000000 13240601153 012335 5 ustar mg mg 0000000 0000000 objgraph-3.4.0/appveyor.yml 0000644 0001750 0001750 00000001064 13206044552 014734 0 ustar mg mg 0000000 0000000 version: build-{build}-{branch}
environment:
matrix:
# 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"
init:
- "echo %PYTHON%"
install:
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
- pip install tox
- choco install graphviz
- "set PATH=c:\\Program Files (x86)\\graphviz2.38\\bin;%PATH%"
- dot -V
build: off
test_script:
- tox -e py
objgraph-3.4.0/.travis.yml 0000644 0001750 0001750 00000000523 13040353275 014455 0 ustar mg mg 0000000 0000000 language: python
sudo: false
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
addons:
apt:
packages:
- graphviz
install:
- pip install coverage coveralls flake8 -e .
before_script:
- make lint
script:
- coverage run --source=objgraph tests.py
after_success:
- coveralls
notifications:
email: false
objgraph-3.4.0/PKG-INFO 0000644 0001750 0001750 00000033734 13240601153 013444 0 ustar mg mg 0000000 0000000 Metadata-Version: 1.1
Name: objgraph
Version: 3.4.0
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
====================
.. image:: https://travis-ci.org/mgedmin/objgraph.svg?branch=master
:target: https://travis-ci.org/mgedmin/objgraph
:alt: Build Status
.. image:: https://ci.appveyor.com/api/projects/status/github/mgedmin/objgraph?branch=master&svg=true
:target: https://ci.appveyor.com/project/mgedmin/objgraph
:alt: Build Status (Windows)
.. image:: https://coveralls.io/repos/mgedmin/objgraph/badge.svg?branch=master
:target: https://coveralls.io/r/mgedmin/objgraph?branch=master
:alt: Test Coverage
.. image:: https://readthedocs.org/projects/objgraph/badge/?version=latest
:target: https://readthedocs.org/projects/objgraph/?badge=latest
:alt: Documentation Status
``objgraph`` is a module that lets you visually explore Python object graphs.
You'll need `graphviz `_ if you want to draw
the pretty graphs.
I recommend `xdot `_ for interactive use.
``pip install xdot`` should suffice; objgraph will automatically look for it
in your ``PATH``.
Installation and Documentation
------------------------------
``pip install objgraph`` or `download it from PyPI
`_.
Documentation lives at https://mg.pov.lt/objgraph.
.. _history:
History
-------
I've developed a set of functions that eventually became objgraph when I
was hunting for memory leaks in a Python program. The whole story -- with
illustrated examples -- is in this series of blog posts:
* `Hunting memory leaks in Python
`_
* `Python object graphs
`_
* `Object graphs with graphviz
`_
.. _devel:
Support and Development
-----------------------
The source code can be found in this Git repository:
https://github.com/mgedmin/objgraph.
To check it out, use ``git clone https://github.com/mgedmin/objgraph``.
Report bugs at https://github.com/mgedmin/objgraph/issues.
Changes
=======
3.4.0 (2018-02-13)
------------------
- New functions: `get_new_ids`, `at_addrs`.
Contributed by Justin Black in `PR 36
`_.
3.3.0 (2017-12-28)
------------------
- New function: `growth`.
3.2.0 (2017-12-20)
------------------
- New ``filter`` argument for `typestats`, `most_common_types`,
`show_most_common_types`, `show_growth`.
- Show lambda functions in a more human-friendly way.
3.1.2 (2017-11-27)
------------------
- Correct UTF-8 mojibake in the changelog and switch all links to HTTPS.
3.1.1 (2017-10-30)
------------------
- Add support for Python 3.6.
- Replace bare ``except:`` in ``safe_repr()`` with ``except Exception:``.
3.1.0 (2016-12-07)
------------------
- Support displaying graphs inline in IPython/Jupyter notebooks (`issue 28
`).
3.0.1 (2016-09-17)
------------------
- The ``file`` argument of `show_most_common_types` and
`show_growth` now defaults to ``None`` instead of ``sys.stdout``.
``None`` is interpreted to be the same as ``sys.stdout``, which means
the right stdout will be used if you change it at runtime (which happens,
in doctests).
3.0.0 (2016-04-13)
------------------
- `show_most_common_types` and `show_growth` now accept a ``file``
argument if you want to redirect the output elsewhere.
Fixes `issue 24 `_. Contributed
by "d-sun-d".
- Don't trust ``__class__`` to be accurate and ``__name__`` to be a string.
Fixes errors in some convoluted corner cases when mocks are involved.
Contributed by Andrew Shannon Brown in `PR 26
`_.
- Drop support for Python 2.4, 2.5, and 2.6.
- Drop support for Python 3.1 and 3.2.
- Add support for Python 3.5.
2.0.1 (2015-07-28)
------------------
- Avoid creating reference cycles between the stack frame and the local
``objects`` variable in `by_type`, `count`, and
`typestats`.
Fixes `issue 22 `_. Contributed
by Erik Bray.
2.0.0 (2015-04-18)
------------------
- `show_refs` and `show_backrefs` now accept a file-like object
(via the new ``output`` argument) as an alternative to a filename.
- Made internal helper methods private. This includes `find_chain`,
`show_graph`, `obj_node_id`, `obj_label`, `quote`,
`long_typename`, `safe_repr`, `short_repr`,
`gradient`, `edge_label`, and `_program_in_path`.
- Correctly determine the name of old-style classes in `count`,
`by_type`, and graph drawing functions.
Fixes `issue 16 `_. Contributed
by Mike Lambert.
1.8.1 (2014-05-15)
------------------
- Do not expect file objects to have an ``encoding`` attribute. Makes objgraph
compatible with Eventlet's monkey-patching.
Fixes `issue 6 `_. Contributed
by Jakub Stasiak.
1.8.0 (2014-02-13)
------------------
- Moved to GitHub.
- Python 3.4 support (`LP#1270872 `_).
- New function: `is_proper_module`.
- New ``shortnames`` argument for `typestats`, `most_common_types`,
`show_most_common_types`, `show_growth`, `show_refs`,
and `show_backrefs`.
`count` and `by_type` accept fully-qualified type names now.
Fixes `issue 4 `_.
1.7.2 (2012-10-23)
------------------
- Bugfix: setup.py sdist was broken on Python 2.7 (UnicodeDecodeError in
tarfile).
- The ``filename`` argument for `show_refs` and `show_backrefs` now
allows arbitrary image formats, not just PNG. Patch by `Riccardo
Murri `_.
- Temporary dot files are now named `objgraph-*.dot` instead of `tmp*.dot`.
- Python 3.3 support: no code changes, but some tests started failing because
the new and improved dictionary implementation no longer holds references to
str objects used as dict keys.
- Added a tox.ini for convenient multi-Python testing.
1.7.1 (2011-12-11)
------------------
- Bugfix: non-ASCII characters in object representations would break graph
generation on Python 3.x, in some locales (e.g. with LC_ALL=C). Reported and
fixed by `Stefano Rivera `_.
- Bugfix: setup.py was broken on Python 3.x
- Bugfix: dot.exe/xdot.exe were not found on Windows (`LP#767239
`_).
- Documentation updates: document the forgotten `find_ref_chain`,
update `show_chain` prototype.
1.7.0 (2011-03-11)
------------------
- New function: `find_ref_chain`.
- New ``backrefs`` argument for `show_chain`.
- New function: `get_leaking_objects`, based on `a blog post by
Kristján Valur
`_.
- New ``objects`` argument for `count`, `typestats`,
`most_common_types`, `show_most_common_types`, and
`by_type`.
- Edges pointing to function attributes such as __defaults__ or __globals__
are now labeled.
- Edge labels that are not simple strings now show the type.
- Bugfix: '\0' and other unsafe characters used in a dictionary key could
break graph generation.
- Bugfix: show_refs(..., filename='graph.dot') would then go to complain
about unrecognized file types and then produce a png.
1.6.0 (2010-12-18)
------------------
- Python 3 support, thanks to Stefano Rivera (fixes `LP#687601
`_).
- Removed weird weakref special-casing.
1.5.1 (2010-12-09)
------------------
- Avoid test failures in uncollectable-garbage.txt (fixes `LP#686731
`_).
- Added HACKING.txt (later renamed to HACKING.rst).
1.5.0 (2010-12-05)
------------------
- Show frame objects as well (fixes `LP#361704
`_).
- New functions: `show_growth`, `show_chain`.
- `find_backref_chain` returns ``[obj]`` instead of ``None`` when a chain
could not be found. This makes ``show_chain(find_backref_chain(...), ...)``
not break.
- Show how many references were skipped from the output of
`show_refs`/`show_backrefs` by specifying ``too_many``.
- Make `show_refs` descend into modules.
- Do not highlight classes that define a ``__del__``, highlight only instances of
those classes.
- Option to show reference counts in `show_refs`/`show_backrefs`.
- Add `Sphinx `_ documentation and a PyPI
long description.
1.4.0 (2010-11-03)
------------------
- Compatibility with Python 2.4 and 2.5 (``tempfile.NamedTemporaryFile`` has no
``delete`` argument).
- New function: `most_common_types`.
1.3.1 (2010-07-17)
------------------
- Rebuild an sdist with no missing files (fixes `LP#606604
`_).
- Added MANIFEST.in and a Makefile to check that setup.py sdist generates
source distributions with no files missing.
1.3 (2010-07-13)
----------------
- Highlight objects with a ``__del__`` method.
- Fixes `LP#483411 `_: suggest always passing
``[obj]`` to `show_refs`, `show_backrefs`, since obj might be a
list/tuple.
- Fixes `LP#514422 `_: `show_refs`,
`show_backrefs` don't create files in the current working directory any
more. Instead they accept a filename argument, which can be a .dot file or a
.png file. If None or not specified, those functions will try to spawn xdot
as before.
- New extra_info argument to graph-generating functions (patch by Thouis Jones,
`LP#558914 `_).
- setup.py should work with distutils now (`LP#604430
`_, thanks to Randy Heydon).
1.2 (2009-03-25)
----------------
- Project website, public source repository, uploaded to PyPI.
- No code changes.
1.1 (2008-09-10)
----------------
- New function: `show_refs` for showing forward references.
- New functions: `typestats` and `show_most_common_types`.
- Object boxes are less crammed with useless information (such as IDs).
- Spawns `xdot `_ if it is available.
1.0 (2008-06-14)
----------------
- First public release.
Keywords: object graph visualization graphviz garbage collection
Platform: UNKNOWN
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
objgraph-3.4.0/tox.ini 0000664 0001750 0001750 00000000263 13032433022 013650 0 ustar mg mg 0000000 0000000 [tox]
envlist = py27, py33, py34, py35, py36
[testenv]
deps = mock
commands =
python tests.py {posargs}
[testenv:py]
commands =
python --version
python tests.py {posargs}
objgraph-3.4.0/LICENSE 0000664 0001750 0001750 00000002060 12770713271 013356 0 ustar mg mg 0000000 0000000 MIT License
Copyright (c) 2016 Marius Gedminas
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 the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
objgraph-3.4.0/.gitignore 0000644 0001750 0001750 00000000213 13240555502 014327 0 ustar mg mg 0000000 0000000 dist/
objects.dot
objgraph.egg-info/
tmp/
.coverage
_build/
tags
build/
temp/
__pycache__/
.tox/
.toxbox/
*.py[co]
.cache
*.DS_Store
venv/
objgraph-3.4.0/.gitattributes 0000664 0001750 0001750 00000000023 12765062074 015243 0 ustar mg mg 0000000 0000000 *.png diff=imgdiff
objgraph-3.4.0/CHANGES.rst 0000644 0001750 0001750 00000021033 13240600443 014137 0 ustar mg mg 0000000 0000000 Changes
=======
.. currentmodule:: objgraph
3.4.0 (2018-02-13)
------------------
- New functions: :func:`get_new_ids`, :func:`at_addrs`.
Contributed by Justin Black in `PR 36
`_.
3.3.0 (2017-12-28)
------------------
- New function: :func:`growth`.
3.2.0 (2017-12-20)
------------------
- New ``filter`` argument for :func:`typestats`, :func:`most_common_types`,
:func:`show_most_common_types`, :func:`show_growth`.
- Show lambda functions in a more human-friendly way.
3.1.2 (2017-11-27)
------------------
- Correct UTF-8 mojibake in the changelog and switch all links to HTTPS.
3.1.1 (2017-10-30)
------------------
- Add support for Python 3.6.
- Replace bare ``except:`` in ``safe_repr()`` with ``except Exception:``.
3.1.0 (2016-12-07)
------------------
- Support displaying graphs inline in IPython/Jupyter notebooks (`issue 28
`).
3.0.1 (2016-09-17)
------------------
- The ``file`` argument of :func:`show_most_common_types` and
:func:`show_growth` now defaults to ``None`` instead of ``sys.stdout``.
``None`` is interpreted to be the same as ``sys.stdout``, which means
the right stdout will be used if you change it at runtime (which happens,
in doctests).
3.0.0 (2016-04-13)
------------------
- :func:`show_most_common_types` and :func:`show_growth` now accept a ``file``
argument if you want to redirect the output elsewhere.
Fixes `issue 24 `_. Contributed
by "d-sun-d".
- Don't trust ``__class__`` to be accurate and ``__name__`` to be a string.
Fixes errors in some convoluted corner cases when mocks are involved.
Contributed by Andrew Shannon Brown in `PR 26
`_.
- Drop support for Python 2.4, 2.5, and 2.6.
- Drop support for Python 3.1 and 3.2.
- Add support for Python 3.5.
2.0.1 (2015-07-28)
------------------
- Avoid creating reference cycles between the stack frame and the local
``objects`` variable in :func:`by_type`, :func:`count`, and
:func:`typestats`.
Fixes `issue 22 `_. Contributed
by Erik Bray.
2.0.0 (2015-04-18)
------------------
- :func:`show_refs` and :func:`show_backrefs` now accept a file-like object
(via the new ``output`` argument) as an alternative to a filename.
- Made internal helper methods private. This includes :func:`find_chain`,
:func:`show_graph`, :func:`obj_node_id`, :func:`obj_label`, :func:`quote`,
:func:`long_typename`, :func:`safe_repr`, :func:`short_repr`,
:func:`gradient`, :func:`edge_label`, and :func:`_program_in_path`.
- Correctly determine the name of old-style classes in :func:`count`,
:func:`by_type`, and graph drawing functions.
Fixes `issue 16 `_. Contributed
by Mike Lambert.
1.8.1 (2014-05-15)
------------------
- Do not expect file objects to have an ``encoding`` attribute. Makes objgraph
compatible with Eventlet's monkey-patching.
Fixes `issue 6 `_. Contributed
by Jakub Stasiak.
1.8.0 (2014-02-13)
------------------
- Moved to GitHub.
- Python 3.4 support (`LP#1270872 `_).
- New function: :func:`is_proper_module`.
- New ``shortnames`` argument for :func:`typestats`, :func:`most_common_types`,
:func:`show_most_common_types`, :func:`show_growth`, :func:`show_refs`,
and :func:`show_backrefs`.
:func:`count` and :func:`by_type` accept fully-qualified type names now.
Fixes `issue 4 `_.
1.7.2 (2012-10-23)
------------------
- Bugfix: setup.py sdist was broken on Python 2.7 (UnicodeDecodeError in
tarfile).
- The ``filename`` argument for :func:`show_refs` and :func:`show_backrefs` now
allows arbitrary image formats, not just PNG. Patch by `Riccardo
Murri `_.
- Temporary dot files are now named `objgraph-*.dot` instead of `tmp*.dot`.
- Python 3.3 support: no code changes, but some tests started failing because
the new and improved dictionary implementation no longer holds references to
str objects used as dict keys.
- Added a tox.ini for convenient multi-Python testing.
1.7.1 (2011-12-11)
------------------
- Bugfix: non-ASCII characters in object representations would break graph
generation on Python 3.x, in some locales (e.g. with LC_ALL=C). Reported and
fixed by `Stefano Rivera `_.
- Bugfix: setup.py was broken on Python 3.x
- Bugfix: dot.exe/xdot.exe were not found on Windows (`LP#767239
`_).
- Documentation updates: document the forgotten :func:`find_ref_chain`,
update :func:`show_chain` prototype.
1.7.0 (2011-03-11)
------------------
- New function: :func:`find_ref_chain`.
- New ``backrefs`` argument for :func:`show_chain`.
- New function: :func:`get_leaking_objects`, based on `a blog post by
Kristján Valur
`_.
- New ``objects`` argument for :func:`count`, :func:`typestats`,
:func:`most_common_types`, :func:`show_most_common_types`, and
:func:`by_type`.
- Edges pointing to function attributes such as __defaults__ or __globals__
are now labeled.
- Edge labels that are not simple strings now show the type.
- Bugfix: '\0' and other unsafe characters used in a dictionary key could
break graph generation.
- Bugfix: show_refs(..., filename='graph.dot') would then go to complain
about unrecognized file types and then produce a png.
1.6.0 (2010-12-18)
------------------
- Python 3 support, thanks to Stefano Rivera (fixes `LP#687601
`_).
- Removed weird weakref special-casing.
1.5.1 (2010-12-09)
------------------
- Avoid test failures in uncollectable-garbage.txt (fixes `LP#686731
`_).
- Added HACKING.txt (later renamed to HACKING.rst).
1.5.0 (2010-12-05)
------------------
- Show frame objects as well (fixes `LP#361704
`_).
- New functions: :func:`show_growth`, :func:`show_chain`.
- :func:`find_backref_chain` returns ``[obj]`` instead of ``None`` when a chain
could not be found. This makes ``show_chain(find_backref_chain(...), ...)``
not break.
- Show how many references were skipped from the output of
:func:`show_refs`/:func:`show_backrefs` by specifying ``too_many``.
- Make :func:`show_refs` descend into modules.
- Do not highlight classes that define a ``__del__``, highlight only instances of
those classes.
- Option to show reference counts in :func:`show_refs`/:func:`show_backrefs`.
- Add `Sphinx `_ documentation and a PyPI
long description.
1.4.0 (2010-11-03)
------------------
- Compatibility with Python 2.4 and 2.5 (``tempfile.NamedTemporaryFile`` has no
``delete`` argument).
- New function: :func:`most_common_types`.
1.3.1 (2010-07-17)
------------------
- Rebuild an sdist with no missing files (fixes `LP#606604
`_).
- Added MANIFEST.in and a Makefile to check that setup.py sdist generates
source distributions with no files missing.
1.3 (2010-07-13)
----------------
- Highlight objects with a ``__del__`` method.
- Fixes `LP#483411 `_: suggest always passing
``[obj]`` to :func:`show_refs`, :func:`show_backrefs`, since obj might be a
list/tuple.
- Fixes `LP#514422 `_: :func:`show_refs`,
:func:`show_backrefs` don't create files in the current working directory any
more. Instead they accept a filename argument, which can be a .dot file or a
.png file. If None or not specified, those functions will try to spawn xdot
as before.
- New extra_info argument to graph-generating functions (patch by Thouis Jones,
`LP#558914 `_).
- setup.py should work with distutils now (`LP#604430
`_, thanks to Randy Heydon).
1.2 (2009-03-25)
----------------
- Project website, public source repository, uploaded to PyPI.
- No code changes.
1.1 (2008-09-10)
----------------
- New function: :func:`show_refs` for showing forward references.
- New functions: :func:`typestats` and :func:`show_most_common_types`.
- Object boxes are less crammed with useless information (such as IDs).
- Spawns `xdot `_ if it is available.
1.0 (2008-06-14)
----------------
- First public release.
objgraph-3.4.0/other-requirements.txt 0000664 0001750 0001750 00000000011 12765064040 016743 0 ustar mg mg 0000000 0000000 graphviz
objgraph-3.4.0/setup.cfg 0000664 0001750 0001750 00000000266 13240601153 014164 0 ustar mg mg 0000000 0000000 [flake8]
ignore = E226
[zest.releaser]
python-file-with-version = objgraph.py
[bdist_wheel]
universal = 1
[metadata]
license_file = LICENSE
[egg_info]
tag_build =
tag_date = 0
objgraph-3.4.0/Makefile 0000664 0001750 0001750 00000006542 13240600644 014012 0 ustar mg mg 0000000 0000000 PYTHON = python
FILE_WITH_VERSION = objgraph.py
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
ALLSPHINXOPTS = -d $(SPHINXBUILDDIR)/doctrees $(SPHINXOPTS) docs/
.PHONY: default
default:
@echo "Nothing to build here"
.PHONY: images
images:
$(PYTHON) setup.py --build-images
.PHONY: docs
docs:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
@echo
@echo "Now look at $(SPHINXBUILDDIR)/html/index.html"
.PHONY: clean
clean:
-rm -rf $(SPHINXBUILDDIR)/* build
.PHONY: test
test:
$(PYTHON) tests.py
.PHONY:
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
.PHONY: preview-pypi-description
preview-pypi-description:
# pip install restview, if missing
restview --long-description
.PHONY: coverage
coverage:
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
# Make sure $(VCS_DIFF_IMAGES) can work
.PHONY: config-imgdiff
config-imgdiff:
@test -z "`git config diff.imgdiff.command`" && git config diff.imgdiff.command 'f() { imgdiff --eog -H $$1 $$2; }; f' || true
.PHONY: imgdiff
imgdiff: config-imgdiff
$(VCS_DIFF_IMAGES)
.PHONY: releasechecklist
releasechecklist: check-date # also release.mk will add other checks
include release.mk
.PHONY: check-date
check-date:
@date_line="__date__ = '`date +%Y-%m-%d`'" && \
grep -q "^$$date_line$$" $(FILE_WITH_VERSION) || { \
echo "$(FILE_WITH_VERSION) doesn't specify $$date_line"; \
echo "Please run make update-date"; exit 1; }
.PHONY: update-date
update-date:
sed -i -e "s/^__date__ = '.*'/__date__ = '`date +%Y-%m-%d`'/" $(FILE_WITH_VERSION)
.PHONY: do-release
do-release: config-imgdiff
define release_recipe =
# I'm chicken so I won't actually do these things yet
@echo "It is a good idea to run"
@echo
@echo " make test-all-pythons"
@echo " make clean images docs"
@echo
@echo "about now. Then sanity-check the images with"
@echo
@echo " make imgdiff"
@echo
@echo "then either revert or commit the new images and run"
@echo
@echo " $(PYPI_PUBLISH)"
@echo " $(VCS_TAG)"
@echo " make publish-docs"
@echo
@echo "Please increment the version number in $(FILE_WITH_VERSION)"
@echo "and add a new empty entry at the top of the changelog in $(FILE_WITH_CHANGELOG), then"
@echo
@echo ' $(VCS_COMMIT_AND_PUSH)'
@echo
endef
.PHONY: publish-docs
publish-docs:
test -d ~/www/objgraph || { \
echo "There's no ~/www/objgraph, do you have the website checked out?"; exit 1; }
make clean docs
cp -r docs/_build/html/* ~/www/objgraph/
cd ~/www/objgraph && git add . && git status
@echo
@echo "If everything looks fine, please run"
@echo
@echo " cd ~/www/ && git commit -m \"Released objgraph `$(PYTHON) setup.py --version`\" && git push"
@echo " ssh fridge 'cd www && git pull'"
@echo
objgraph-3.4.0/docs/ 0000755 0001750 0001750 00000000000 13240601153 013265 5 ustar mg mg 0000000 0000000 objgraph-3.4.0/docs/forward-chain.png 0000644 0001750 0001750 00000035650 13240601137 016532 0 ustar mg mg 0000000 0000000 PNG
IHDR d ka bKGD IDATx}\?tR.Q2Zgb0|l>|̶kc0j}*W͌0DRtuz8sTNt'֭~<^A ""R` H$L] DDD2p@2G?~<٣2{n}AS5\1c@~i5f2H0DLD$d""` H$d8