Skip to content

Commit

Permalink
Drop Python 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Jul 2, 2023
1 parent bf8452c commit 85dca4e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 42 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ source = du2webtreemap

[report]
exclude_lines =
pragma: PY2
pragma: nocover
if __name__ == .__main__.:
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions du2webtreemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


__author__ = 'Marius Gedminas <marius@gedmin.as>'
__version__ = '2.0.1'
__version__ = '2.1.0'


def fmt_size(kb):
Expand Down Expand Up @@ -83,8 +83,6 @@ def parse_du(input):
size = int(size)
except ValueError:
raise InputSyntaxError('size is not a number: %r' % size)
if isinstance(filename, bytes): # pragma: PY2
filename = filename.decode('UTF-8', 'replace')
filename = filename.rstrip('\r\n/')
# Process
node = root
Expand Down
6 changes: 1 addition & 5 deletions tests.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# -*- coding: utf-8 -*-
import json
import sys
try:
from cStringIO import StringIO
except ImportError: # pragma: PY3
from io import StringIO
from io import StringIO

import pytest

Expand Down
9 changes: 1 addition & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py37,py38,py39,py310,py311,pypy,pypy3
envlist = py37,py38,py39,py310,py311,pypy3

[testenv]
skip_install = true
Expand All @@ -13,10 +13,3 @@ deps =
commands =
coverage run -m pytest {posargs}
coverage report -m --fail-under=100

[testenv:coverage2]
basepython = python2
deps =
{[testenv:coverage]deps}
commands =
{[testenv:coverage]commands}

0 comments on commit 85dca4e

Please sign in to comment.