Python SDK: Bump up version of python-dateutil dependency

According to poetry’s output, molaris python library (ver. 0.1.37) depends on python-dateutil version in the rage of >=2.7.0,<2.8.0. Within that version range of python-dateutil, 2.7.5 is latest which is quite old as released in 2018.
Please bump up the version of python-dateutil to the latest one which is 2.8.2 released 2021-07-14.
Otherwise, I cannot co-install Pandas ver 2.x or even 1.5.x (didn’t check older than 1.5.x).

Supportive info:

  • Snippet of poetry output 1

Because no versions of moralis match >0.1.37,<0.2.0
and moralis (0.1.37) depends on python-dateutil (>=2.7.0,<2.8.0), moralis (>=0.1.37,<0.2.0) requires python-dateutil (>=2.7.0,<2.8.0).
So, because cointracking-tools depends on both python-dateutil (^2.8.2) and moralis (^0.1.37), version solving failed.

  • Snippet of poetry output 2

Because no versions of pandas match >1.5.0,<1.5.1 || >1.5.1,<1.5.2 || >1.5.2,<1.5.3 || >1.5.3,<1.6.0
and pandas (1.5.0) depends on python-dateutil (>=2.8.1), pandas (>=1.5.0,<1.5.1 || >1.5.1,<1.5.2 || >1.5.2,<1.5.3 || >1.5.3,<1.6.0) requires python-dateutil (>=2.8.1).
And because pandas (1.5.1) depends on python-dateutil (>=2.8.1), pandas (>=1.5.0,<1.5.2 || >1.5.2,<1.5.3 || >1.5.3,<1.6.0) requires python-dateutil (>=2.8.1).
And because pandas (1.5.2) depends on python-dateutil (>=2.8.1)
and pandas (1.5.3) depends on python-dateutil (>=2.8.1), pandas (>=1.5.0,<1.6.0) requires python-dateutil (>=2.8.1).
So, because pdmoralis depends on both python-dateutil (2.7.5) and pandas (~1.5.0), version solving failed.

  • Snippet of poetry output 3

$ poetry show --tree
moralis 0.1.37 The official Moralis Python SDK
├── certifi >=14.5.14
├── frozendict >=2.3.4,<2.4.0
├── python-dateutil >=2.7.0,<2.8.0
│ └── six >=1.5
├── typing-extensions >=4.3.0,<4.4.0
└── urllib3 >=1.26.7,<1.27.0

  • python-dateutil release dates

$ _pymdl=“python-dateutil”; PY_CODE=$(cat <<PYHERE_DOC
import json, requests;
_pymdl="${_pymdl}"
pypi_url = ‘https://pypi.python.org/pypi
pypi_data = requests.get("{0}/{1}/json".format(pypi_url, _pymdl)).json()
print(json.dumps(pypi_data))
PYHERE_DOC
); python3 -c “${PY_CODE}” | jq ‘.releases | to_entries[] | {version:.key, upload_time:.value[].upload_time}’

{
“version”: “2.7.5”,
“upload_time”: “2018-10-27T18:14:36”
}
{
“version”: “2.8.0”,
“upload_time”: “2019-02-05T14:12:35”
}
{
“version”: “2.8.0”,
“upload_time”: “2019-02-05T14:12:37”
}
{
“version”: “2.8.1”,
“upload_time”: “2019-11-03T05:42:01”
}
{
“version”: “2.8.1”,
“upload_time”: “2019-11-03T05:42:03”
}
{
“version”: “2.8.2”,
“upload_time”: “2021-07-14T08:19:18”
}
{
“version”: “2.8.2”,
“upload_time”: “2021-07-14T08:19:19”
}

Hi @anymoas, thank you for your message, I have forwarded your request to our developers who will look into it.

We’ll keep you updated as soon as we can.

Has there been any progress on this front please?
We are using packages that require python-dateutil<3.0.0,>=2.8.1.
Is there any chance Moralis could extend your package requirements to cover anything below the next major version? Seems this is unlikely to cause any issues, especially given that 2.8.0 was released over four years ago.

Can you try to download the sdk source code from GitHub and update the version for that package and then install it in your local environment to see if it works as expected?

I have forked it on github for now because I saw that there is a commit waiting to be released that updates the versions in requirements.txt and setup.py and nothing else, so I assumed it’s just a formal change with nothing else required.

I still think it would help to adopt a looser versioning strategy, because sooner or later, someone will run into the same issue with a similarly narrow requirement for urllib3.

1 Like

you can check the latest version of the python SDK now, it should use a newer version for dateutil.

Updated, thanks for the quick turnaround!

1 Like