Skip to content

Alternate Ubuntu CI fix #50117

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

Merged
merged 6 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/32-bit-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:

jobs:
pytest:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- if: github.event.comment.body == 'take'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/asv-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: "Run benchmarks"
# TODO: Support more benchmarking options later, against different branches, against self, etc
if: startsWith(github.event.comment.body, '@github-actions benchmark')
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoupdate-pre-commit-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pull-requests: write # for technote-space/create-pr-action to create a PR
if: github.repository_owner == 'pandas-dev'
name: Autoupdate pre-commit config
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Python
uses: actions/setup-python@v4
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:
jobs:
pre_commit:
name: pre-commit
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-pre-commit
Expand All @@ -41,7 +41,7 @@ jobs:

docstring_typing_pylint:
name: Docstring validation, typing, and pylint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:

asv-benchmarks:
name: ASV Benchmarks
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

build_docker_dev_environment:
name: Build Docker Dev Environment
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
Expand All @@ -162,7 +162,7 @@ jobs:

requirements-dev-text-installable:
name: Test install requirements-dev.txt
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:

jobs:
analyze:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:
jobs:
web_and_docs:
name: Doc Build and Upload
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

concurrency:
# https://github.community/t/concurrecy-not-work-for-push/183068/7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
jobs:
pip:
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
extra: ["test", "performance", "timezone", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-latest, windows-latest]
os: [ubuntu-22.04, macOS-latest, windows-latest]

name: actions-311-dev
timeout-minutes: 120
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:
jobs:
build:
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 60
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
stale:
permissions:
pull-requests: write
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:

jobs:
pytest:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -el {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Build')) ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
Expand Down
4 changes: 3 additions & 1 deletion pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4132,7 +4132,9 @@ def shift_months(

cnp.broadcast mi = cnp.PyArray_MultiIterNew2(out, dtindex)

if day_opt not in [None, "start", "end", "business_start", "business_end"]:
if day_opt is not None and day_opt not in {
"start", "end", "business_start", "business_end"
}:
raise ValueError("day must be None, 'start', 'end', "
"'business_start', or 'business_end'")

Expand Down
26 changes: 3 additions & 23 deletions pandas/_libs/tslibs/parsing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ from cpython.datetime cimport (
datetime,
datetime_new,
import_datetime,
tzinfo,
)
from cpython.object cimport PyObject_Str
from cython cimport Py_ssize_t
Expand Down Expand Up @@ -44,7 +43,6 @@ from dateutil.relativedelta import relativedelta
from dateutil.tz import (
tzlocal as _dateutil_tzlocal,
tzoffset,
tzstr as _dateutil_tzstr,
tzutc as _dateutil_tzutc,
)

Expand Down Expand Up @@ -444,7 +442,7 @@ cdef parse_datetime_string_with_reso(
try:
parsed, reso = dateutil_parse(date_string, _DEFAULT_DATETIME,
dayfirst=dayfirst, yearfirst=yearfirst,
ignoretz=False, tzinfos=None)
ignoretz=False)
except (ValueError, OverflowError) as err:
# TODO: allow raise of errors within instead
raise DateParseError(err)
Expand Down Expand Up @@ -636,7 +634,6 @@ cdef dateutil_parse(
str timestr,
object default,
bint ignoretz=False,
object tzinfos=None,
bint dayfirst=False,
bint yearfirst=False,
):
Expand All @@ -645,7 +642,7 @@ cdef dateutil_parse(
cdef:
str attr
datetime ret
object res, tzdata
object res
object reso = None
dict repl = {}

Expand Down Expand Up @@ -674,24 +671,7 @@ cdef dateutil_parse(
if res.weekday is not None and not res.day:
ret = ret + relativedelta.relativedelta(weekday=res.weekday)
if not ignoretz:
if callable(tzinfos) or tzinfos and res.tzname in tzinfos:
# Note: as of 1.0 this is not reached because
# we never pass tzinfos, see GH#22234
if callable(tzinfos):
tzdata = tzinfos(res.tzname, res.tzoffset)
else:
tzdata = tzinfos.get(res.tzname)
if isinstance(tzdata, tzinfo):
new_tzinfo = tzdata
elif isinstance(tzdata, str):
new_tzinfo = _dateutil_tzstr(tzdata)
elif isinstance(tzdata, int):
new_tzinfo = tzoffset(res.tzname, tzdata)
else:
raise ValueError("offset must be tzinfo subclass, "
"tz string, or int offset")
ret = ret.replace(tzinfo=new_tzinfo)
elif res.tzname and res.tzname in time.tzname:
if res.tzname and res.tzname in time.tzname:
ret = ret.replace(tzinfo=_dateutil_tzlocal())
elif res.tzoffset == 0:
ret = ret.replace(tzinfo=_dateutil_tzutc())
Expand Down