Commit 789cb4c3 authored by Stefano Rivera's avatar Stefano Rivera

Import objgraph_3.0.1.orig.tar.gz

parent 93656a11
language: python
sudo: false
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
- nightly
addons:
apt:
packages:
......
......@@ -3,6 +3,16 @@ Changes
.. currentmodule:: objgraph
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)
------------------
......
......@@ -10,3 +10,6 @@ include docs/_static/*.css
include .gitignore
include .gitattributes
include *.yml
# added by check_manifest.py
include *.txt
......@@ -131,7 +131,7 @@ release: releasechecklist config-imgdiff
@echo
@echo "then either revert or commit the new images and run"
@echo
@echo " rm -rf dist && $(PYTHON) setup.py sdist && twine upload dist/* && $(VCS_TAG) `$(PYTHON) setup.py --version`"
@echo " rm -rf dist && $(PYTHON) setup.py sdist bdist_wheel && twine upload dist/* && $(VCS_TAG) `$(PYTHON) setup.py --version`"
@echo " make publish-docs"
@echo
@echo "Please increment the version number in $(FILE_WITH_VERSION)"
......
Metadata-Version: 1.1
Name: objgraph
Version: 3.0.0
Version: 3.0.1
Summary: Draws Python object reference graphs with graphviz
Home-page: http://mg.pov.lt/objgraph/
Author: Marius Gedminas
......@@ -81,6 +81,16 @@ Description: Python Object Graphs
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)
------------------
......
......@@ -4,7 +4,6 @@ environment:
matrix:
# http://www.appveyor.com/docs/installed-software#python lists available
# versions
- PYTHON: "C:\\Python26"
- PYTHON: "C:\\Python27"
- PYTHON: "C:\\Python33"
- PYTHON: "C:\\Python34"
......
Metadata-Version: 1.1
Name: objgraph
Version: 3.0.0
Version: 3.0.1
Summary: Draws Python object reference graphs with graphviz
Home-page: http://mg.pov.lt/objgraph/
Author: Marius Gedminas
......@@ -81,6 +81,16 @@ Description: Python Object Graphs
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)
------------------
......
......@@ -8,6 +8,7 @@ Makefile
README.rst
appveyor.yml
objgraph.py
other-requirements.txt
setup.cfg
setup.py
tests.py
......
{"is_release": false, "git_version": "7b448f7"}
\ No newline at end of file
{"is_release": false, "git_version": "689225b"}
\ No newline at end of file
......@@ -48,8 +48,8 @@ except ImportError:
__author__ = "Marius Gedminas (marius@gedmin.as)"
__copyright__ = "Copyright (c) 2008-2016 Marius Gedminas and contributors"
__license__ = "MIT"
__version__ = "3.0.0"
__date__ = "2016-04-13"
__version__ = "3.0.1"
__date__ = "2016-09-17"
try:
......@@ -196,7 +196,7 @@ def show_most_common_types(
limit=10,
objects=None,
shortnames=True,
file=sys.stdout):
file=None):
"""Print the table of types of most common instances.
The caveats documented in :func:`typestats` apply.
......@@ -218,17 +218,19 @@ def show_most_common_types(
.. versionchanged:: 1.8
New parameter: ``shortnames``.
.. versionchanged:: 2.1
.. versionchanged:: 3.0
New parameter: ``file``.
"""
if file is None:
file = sys.stdout
stats = most_common_types(limit, objects, shortnames=shortnames)
width = max(len(name) for name, count in stats)
for name, count in stats:
file.write('%-*s %i\n' % (width, name, count))
def show_growth(limit=10, peak_stats={}, shortnames=True, file=sys.stdout):
def show_growth(limit=10, peak_stats={}, shortnames=True, file=None):
"""Show the increase in peak object counts since last call.
Limits the output to ``limit`` largest deltas. You may set ``limit`` to
......@@ -270,6 +272,8 @@ def show_growth(limit=10, peak_stats={}, shortnames=True, file=sys.stdout):
if limit:
deltas = deltas[:limit]
if deltas:
if file is None:
file = sys.stdout
width = max(len(name) for name, count in deltas)
for name, delta in deltas:
file.write('%-*s%9d %+9d\n' % (width, name, stats[name], delta))
......
......@@ -488,7 +488,7 @@ class RandomOutputChecker(doctest.OutputChecker):
def check_output(self, want, got, optionflags):
if optionflags & RANDOM_OUTPUT:
return True
return got != ""
return doctest.OutputChecker.check_output(self, want, got, optionflags)
......
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