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

tests: Update US/Eastern timezone to America/New_York #8153

Merged
merged 3 commits into from
Sep 8, 2023

Conversation

LocutusOfBorg
Copy link
Contributor

Reason is that US/Eastern symlink moved from tzdata to tzdata-legacy package, causing FTBFS. Since America/New_York is better supported by tzdata, the switch makes the package stronger against future failures

Reason is that US/Eastern symlink moved from tzdata to tzdata-legacy package,
causing FTBFS. Since America/New_York is better supported by tzdata,
the switch makes the package stronger against future failures
@welcome
Copy link

welcome bot commented Sep 7, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@LocutusOfBorg
Copy link
Contributor Author

Example of failure

copying xarray/tests/data/example.grib -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build/xarray/tests/data
copying xarray/tests/data/bears.nc -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build/xarray/tests/data
copying xarray/static/css/style.css -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build/xarray/static/css
copying xarray/static/html/icons-svg-inline.html -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build/xarray/static/html
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_test -O--buildsystem=pybuild
	pybuild --test --test-pytest -i python{version} -p 3.11
I: pybuild base:291: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build; python3.11 -m pytest -vv -k 'not test_open_mfdataset_manyfiles'
============================= test session starts ==============================
platform linux -- Python 3.11.5, pytest-7.4.0, pluggy-1.2.0 -- /usr/bin/python3.11
cachedir: .pytest_cache
rootdir: /<<PKGBUILDDIR>>
configfile: setup.cfg
collecting ... collected 14165 items / 2 errors / 80 deselected / 2 skipped / 14085 selected

==================================== ERRORS ====================================
_ ERROR collecting .pybuild/cpython3_3.11_xarray/build/xarray/tests/test_units.py _
/usr/lib/python3/dist-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3/dist-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3/dist-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/usr/lib/python3/dist-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/usr/lib/python3/dist-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/usr/lib/python3/dist-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/usr/lib/python3/dist-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/lib/python3/dist-packages/_pytest/pathlib.py:565: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
xarray/tests/test_units.py:23: in <module>
    from xarray.tests.test_variable import _PAD_XR_NP_ARGS
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
xarray/tests/test_variable.py:2907: in <module>
    (pd.date_range("2000", periods=1, tz=pytz.timezone("US/Eastern")), False),
/usr/lib/python3/dist-packages/pytz/__init__.py:200: in timezone
    raise UnknownTimeZoneError(zone)
E   pytz.exceptions.UnknownTimeZoneError: 'US/Eastern'
_ ERROR collecting .pybuild/cpython3_3.11_xarray/build/xarray/tests/test_variable.py _
/usr/lib/python3/dist-packages/_pytest/runner.py:341: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3/dist-packages/_pytest/runner.py:372: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3/dist-packages/_pytest/python.py:531: in collect
    self._inject_setup_module_fixture()
/usr/lib/python3/dist-packages/_pytest/python.py:545: in _inject_setup_module_fixture
    self.obj, ("setUpModule", "setup_module")
/usr/lib/python3/dist-packages/_pytest/python.py:310: in obj
    self._obj = obj = self._getobj()
/usr/lib/python3/dist-packages/_pytest/python.py:528: in _getobj
    return self._importtestmodule()
/usr/lib/python3/dist-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/lib/python3/dist-packages/_pytest/pathlib.py:565: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
xarray/tests/test_variable.py:2907: in <module>
    (pd.date_range("2000", periods=1, tz=pytz.timezone("US/Eastern")), False),
/usr/lib/python3/dist-packages/pytz/__init__.py:200: in timezone
    raise UnknownTimeZoneError(zone)
E   pytz.exceptions.UnknownTimeZoneError: 'US/Eastern'
=========================== short test summary info ============================
ERROR xarray/tests/test_units.py - pytz.exceptions.UnknownTimeZoneError: 'US/...
ERROR xarray/tests/test_variable.py - pytz.exceptions.UnknownTimeZoneError: '...
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
================= 2 skipped, 80 deselected, 2 errors in 9.83s ==================
E: pybuild pybuild:395: test: plugin distutils failed with: exit code=2: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_xarray/build; python3.11 -m pytest -vv -k 'not test_open_mfdataset_manyfiles'

@dcherian
Copy link
Contributor

dcherian commented Sep 8, 2023

Seems OK to me. Thank you!

@dcherian dcherian merged commit a7ab5a2 into pydata:main Sep 8, 2023
@welcome
Copy link

welcome bot commented Sep 8, 2023

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

@LocutusOfBorg LocutusOfBorg deleted the fix-tests branch September 9, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants