Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python version in actions #768

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, pypy-2.7, pypy-3.6, pypy-3.7]
python-version: [3.7, 3.8, 3.9, 3.10, 3.11, pypy-3.6, pypy-3.7]
exclude:
# UnicodeDecodeError on test_to_csv
- os: windows-latest
python-version: 2.7
- os: windows-latest
python-version: pypy-2.7
- os: windows-latest
python-version: 3.6
- os: windows-latest
python-version: pypy-3.6
- os: windows-latest
Expand Down Expand Up @@ -48,7 +42,7 @@ jobs:
- run: flake8 .
- run: isort . --check-only
- run: pip install .[test]
- run: nosetests --with-coverage --cover-package=agate
- run: pytest --with-coverage --cover-package=agate
# UnicodeDecodeError on print_bars
- if: matrix.os != 'windows-latest' && matrix.python-version != '2.7' && matrix.python-version != 'pypy-2.7'
run: python example.py
Expand Down
5 changes: 1 addition & 4 deletions agate/testcase.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

import agate

Expand Down
7 changes: 1 addition & 6 deletions benchmarks/test_joins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@

from random import shuffle
from timeit import Timer

try:
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import six
from six.moves import range

Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@
'coverage>=3.7.1',
'cssselect>=0.9.1',
'lxml>=3.6.0',
'nose>=1.1.2',
'pytest>=7.0.0',
'pytest-cov>=3.0.0',
# CI is not configured to install PyICU on macOS and Windows.
'PyICU>=2.4.2;sys_platform=="linux"',
'pytz>=2015.4',
'mock>=1.3.0;python_version<"3"',
'unittest2>=1.1.0;python_version<"3"',
],
'docs': [
'Sphinx>=1.2.2',
Expand Down
6 changes: 1 addition & 5 deletions tests/test_agate.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/env python

try:
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import six

import agate
Expand Down
6 changes: 1 addition & 5 deletions tests/test_aggregations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
import sys
import warnings
from decimal import Decimal

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate import Table
from agate.aggregations import (IQR, MAD, All, Any, Count, Deciles, First, HasNulls, Max, MaxLength, MaxPrecision,
Expand Down
5 changes: 1 addition & 4 deletions tests/test_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
except ImportError: # pragma: no cover
from decimal import Decimal

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate import Table
from agate.data_types import Number, Text
Expand Down
6 changes: 1 addition & 5 deletions tests/test_computations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import datetime
import warnings
from decimal import Decimal

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate import Table
from agate.computations import Change, Formula, Percent, PercentChange, PercentileRank, Rank, Slug
Expand Down
6 changes: 1 addition & 5 deletions tests/test_data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
import datetime
import pickle
from decimal import Decimal

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

import parsedatetime
import pytz
Expand Down
5 changes: 1 addition & 4 deletions tests/test_fixed.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate import csv, fixed

Expand Down
6 changes: 1 addition & 5 deletions tests/test_mapped_sequence.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/usr/bin/env python

try:
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import six

from agate.mapped_sequence import MappedSequence
Expand Down
6 changes: 1 addition & 5 deletions tests/test_py2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

import csv
import os

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

import six

Expand Down
7 changes: 1 addition & 6 deletions tests/test_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import csv
import os
import platform

try:
import unittest2 as unittest
except ImportError:
import unittest

import unittest
import six

from agate import csv_py3
Expand Down
5 changes: 1 addition & 4 deletions tests/test_type_tester.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf8 -*-

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate.data_types import Boolean, Date, DateTime, Number, Text, TimeDelta
from agate.type_tester import TypeTester
Expand Down
5 changes: 1 addition & 4 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
except ImportError: # pragma: no cover
from decimal import Decimal

try:
import unittest2 as unittest
except ImportError:
import unittest
import unittest

from agate.utils import Quantiles, letter_name, round_limits

Expand Down