diff --git a/math/py-pandas/Makefile b/math/py-pandas/Makefile index 60e6f81afca0..ed208f2c761e 100644 --- a/math/py-pandas/Makefile +++ b/math/py-pandas/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= pandas -PORTVERSION= 0.19.2 +PORTVERSION= 0.20.1 CATEGORIES= math devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -25,7 +25,7 @@ TEST_DEPENDS:= ${RUN_DEPENDS} \ ${PYTHON_PKGNAMEPREFIX}tables>=3.0.0:devel/py-tables \ ${PYTHON_PKGNAMEPREFIX}bottleneck>0:math/py-bottleneck \ ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib \ - ${PYTHON_PKGNAMEPREFIX}numexpr>=2.1.0:math/py-numexpr \ + ${PYTHON_PKGNAMEPREFIX}numexpr>=2.4.6:math/py-numexpr \ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy \ ${PYTHON_PKGNAMEPREFIX}openpyxl>=2.2.0:textproc/py-openpyxl \ ${PYTHON_PKGNAMEPREFIX}xlrd>0:textproc/py-xlrd \ @@ -71,7 +71,7 @@ EXCEL_DESC= MS Excel I/O Add-ons MPL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib SCIPY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy BTLNCK_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bottleneck>0:math/py-bottleneck -NUMEXPR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numexpr>=2.1.0:math/py-numexpr +NUMEXPR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numexpr>=2.4.6:math/py-numexpr BOTO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto>0:devel/py-boto TABLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tables>=3.0.0:devel/py-tables diff --git a/math/py-pandas/distinfo b/math/py-pandas/distinfo index 7a45ca1f027c..ae69db771d97 100644 --- a/math/py-pandas/distinfo +++ b/math/py-pandas/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1483953650 -SHA256 (pandas-0.19.2.tar.gz) = 6f0f4f598c2b16746803c8bafef7c721c57e4844da752d36240c0acf97658014 -SIZE (pandas-0.19.2.tar.gz) = 9222964 +TIMESTAMP = 1495907492 +SHA256 (pandas-0.20.1.tar.gz) = 42707365577ef69f7c9c168ddcf045df2957595a9ee71bc13c7997eecb96b190 +SIZE (pandas-0.20.1.tar.gz) = 10307434 diff --git a/math/py-pandas/files/patch-pandas_tests_io_test__html.py b/math/py-pandas/files/patch-pandas_tests_io_test__html.py new file mode 100644 index 000000000000..8950fb711746 --- /dev/null +++ b/math/py-pandas/files/patch-pandas_tests_io_test__html.py @@ -0,0 +1,62 @@ +Reported upstream + +Various py3k test failures in tests.io.test_html with US-ASCII +preferred encoding +https://github.com/pandas-dev/pandas/issues/16525 + +--- pandas/tests/io/test_html.py.orig 2017-05-04 14:53:46 UTC ++++ pandas/tests/io/test_html.py +@@ -20,7 +20,7 @@ from numpy.random import rand + from pandas import (DataFrame, MultiIndex, read_csv, Timestamp, Index, + date_range, Series) + from pandas.compat import (map, zip, StringIO, string_types, BytesIO, +- is_platform_windows) ++ is_platform_windows, PY3) + from pandas.io.common import URLError, urlopen, file_path_to_url + from pandas.io.html import read_html + from pandas._libs.parsers import ParserError +@@ -96,6 +96,9 @@ class ReadHtmlMixin(object): + class TestReadHtml(ReadHtmlMixin): + flavor = 'bs4' + spam_data = os.path.join(DATA_PATH, 'spam.html') ++ spam_data_kwargs = {} ++ if PY3: ++ spam_data_kwargs['encoding'] = 'UTF-8' + banklist_data = os.path.join(DATA_PATH, 'banklist.html') + + @classmethod +@@ -247,10 +250,10 @@ class TestReadHtml(ReadHtmlMixin): + assert_framelist_equal(df1, df2) + + def test_string_io(self): +- with open(self.spam_data) as f: ++ with open(self.spam_data, **self.spam_data_kwargs) as f: + data1 = StringIO(f.read()) + +- with open(self.spam_data) as f: ++ with open(self.spam_data, **self.spam_data_kwargs) as f: + data2 = StringIO(f.read()) + + df1 = self.read_html(data1, '.*Water.*') +@@ -258,7 +261,7 @@ class TestReadHtml(ReadHtmlMixin): + assert_framelist_equal(df1, df2) + + def test_string(self): +- with open(self.spam_data) as f: ++ with open(self.spam_data, **self.spam_data_kwargs) as f: + data = f.read() + + df1 = self.read_html(data, '.*Water.*') +@@ -267,10 +270,10 @@ class TestReadHtml(ReadHtmlMixin): + assert_framelist_equal(df1, df2) + + def test_file_like(self): +- with open(self.spam_data) as f: ++ with open(self.spam_data, **self.spam_data_kwargs) as f: + df1 = self.read_html(f, '.*Water.*') + +- with open(self.spam_data) as f: ++ with open(self.spam_data, **self.spam_data_kwargs) as f: + df2 = self.read_html(f, 'Unit') + + assert_framelist_equal(df1, df2) diff --git a/math/py-pandas/files/patch-pandas_tests_io_test__sql.py b/math/py-pandas/files/patch-pandas_tests_io_test__sql.py new file mode 100644 index 000000000000..bc3b88393b08 --- /dev/null +++ b/math/py-pandas/files/patch-pandas_tests_io_test__sql.py @@ -0,0 +1,21 @@ +Reported upstream + +TestSQLApi/TestSQLApiConn::test_database_uri_string errors if pg8000 +is installed +https://github.com/pandas-dev/pandas/issues/16527 + +--- pandas/tests/io/test_sql.py.orig 2017-05-28 19:28:19 UTC ++++ pandas/tests/io/test_sql.py +@@ -938,6 +938,12 @@ class TestSQLApi(SQLAlchemyMixIn, _TestS + + # using driver that will not be installed on Travis to trigger error + # in sqlalchemy.create_engine -> test passing of this error to user ++ try: ++ import pg8000 ++ pytest.skip("pg8000 is installed") ++ except ImportError: ++ pass ++ + db_uri = "postgresql+pg8000://user:pass@host/dbname" + with tm.assert_raises_regex(ImportError, "pg8000"): + sql.read_sql("select * from table", db_uri) diff --git a/math/py-pandas/scripts/print_skipped.py b/math/py-pandas/scripts/print_skipped.py index 9fb05df64bce..dd2180f6eeb1 100644 --- a/math/py-pandas/scripts/print_skipped.py +++ b/math/py-pandas/scripts/print_skipped.py @@ -30,20 +30,21 @@ def parse_results(filename): i += 1 assert i - 1 == len(skipped) assert i - 1 == len(skipped) - assert len(skipped) == int(root.attrib['skip']) + # assert len(skipped) == int(root.attrib['skip']) return '\n'.join(skipped) def main(args): print('SKIPPED TESTS:') - print(parse_results(args.filename)) + for fn in args.filename: + print(parse_results(fn)) return 0 def parse_args(): import argparse parser = argparse.ArgumentParser() - parser.add_argument('filename', help='XUnit file to parse') + parser.add_argument('filename', nargs='+', help='XUnit file to parse') return parser.parse_args()