Skip to content

CLN: remove have_pytz? #17251

Closed
Closed
@jbrockmendel

Description

From tslib.pyx

try:
    import pytz
    UTC = pytz.utc
    have_pytz = True
except:
    have_pytz = False

[...]
def tz_convert_single(int64_t val, object tz1, object tz2):
    [...]
    if not have_pytz:
        import pytz

From much earlier in tslib.pyx

from pytz.tzinfo import BaseTzInfo as _pytz_BaseTzInfo

Is the try/except still necessary? If so, is import pytz the right thing to do in tz_convert_single?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions