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

ecal: TypeError: DatetimeArray._generate_range() got an unexpected keyword argument 'closed' #355

Closed
ValueRaider opened this issue Jan 21, 2024 · 1 comment · Fixed by #358

Comments

@ValueRaider
Copy link

Pandas version = 2.0.3
xcal version = master latest

$ ./etc/ecal XASX 2010
Traceback (most recent call last):
  File "exchange_calendars/./etc/ecal", line 165, in <module>
    main(sys.argv)
  File "exchange_calendars/./etc/ecal", line 148, in main
    month_strings = [
                    ^
  File "exchange_calendars/./etc/ecal", line 149, in <listcomp>
    [
  File "exchange_calendars/./etc/ecal", line 150, in <listcomp>
    _render_month(
  File "exchange_calendars/./etc/ecal", line 45, in _render_month
    days = pd.date_range(start, end, closed="left", tz='utc')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pandas/core/indexes/datetimes.py", line 945, in date_range
    dtarr = DatetimeArray._generate_range(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DatetimeArray._generate_range() got an unexpected keyword argument 'closed'
maread99 added a commit that referenced this issue Jan 31, 2024
Preemptively constrains numpy dependency to <2 in anticipation of
breaking changes with the upcoming major release 2.0.  (make changes
to accommodate numpy 2.0 post its release, keep `exchange_calendars`
working in the meantme).

Removes `python-dateutil` from pyproject.toml dependencies (library
is a dependency of `pandas`, not a direct dependency of
`exchange_calendars`).

Also, fixes #355 by removing superfluous kwarg from call in `ecal` to
`pd.date_range`.
maread99 added a commit that referenced this issue Jan 31, 2024
Preemptively constrains numpy dependency to <2 in anticipation of
breaking changes with the upcoming major release 2.0.  (make changes
to accommodate numpy 2.0 post its release, keep `exchange_calendars`
working in the meantme).

Removes `python-dateutil` from pyproject.toml dependencies (library
is a dependency of `pandas`, not a direct dependency of
`exchange_calendars`).

Also, fixes #355 by removing superfluous kwarg from call in `ecal` to
`pd.date_range`.
@maread99
Copy link
Collaborator

Thanks @ValueRaider, fixed in #358.

brian-from-quantrocket pushed a commit to quantrocket-llc/exchange_calendars that referenced this issue Feb 15, 2024
Preemptively constrains numpy dependency to <2 in anticipation of
breaking changes with the upcoming major release 2.0.  (make changes
to accommodate numpy 2.0 post its release, keep `exchange_calendars`
working in the meantme).

Removes `python-dateutil` from pyproject.toml dependencies (library
is a dependency of `pandas`, not a direct dependency of
`exchange_calendars`).

Also, fixes gerrymanoim#355 by removing superfluous kwarg from call in `ecal` to
`pd.date_range`.
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 a pull request may close this issue.

2 participants