Content-Length: 298571 | pFad | https://github.com/python/cpython/issues/99138

B0 Port zoneinfo module to use module state · Issue #99138 · python/cpython · GitHub
Skip to content

Port zoneinfo module to use module state #99138

@sobolevn

Description

@sobolevn

Feature or enhancement

Following https://github.com/ericsnowcurrently/multi-core-python/wiki/0-The-Plan we need to convert _zoneinfo to use module state.

Pitch

Right now there are several global objects:

static PyObject *io_open = NULL;
static PyObject *_tzpath_find_tzfile = NULL;
static PyObject *_common_mod = NULL;

and

static PyObject *TIMEDELTA_CACHE = NULL;
static PyObject *ZONEINFO_WEAK_CACHE = NULL;
static StrongCacheNode *ZONEINFO_STRONG_CACHE = NULL;
static size_t ZONEINFO_STRONG_CACHE_MAX_SIZE = 8;
static _ttinfo NO_TTINFO = {NULL, NULL, NULL, 0};

And one static type definition:

static PyTypeObject PyZoneInfo_ZoneInfoType;

If this is indeed planned to be fixed, I would love to work on it.

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/99138

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy