BlackSheep icon indicating copy to clipboard operation
BlackSheep copied to clipboard

Investigate the possibility of removing python-dateutil

Open ockan opened this issue 8 months ago • 3 comments

Yeah,python-dateutil can provide useful functions,but it is enough essential? because it depends a old package 'six',a python version2 package. a pure asgi framework(needs python version 3.5+) depends a python version 2 package, that is funny.

ockan avatar Apr 22 '25 06:04 ockan

It should be possible, such as dateparser.

But in fact, six is just a compatibility layer between python2 and python3, not a pure py2 library, and python-dateutil may still be used by py2 users? I don't know.

bymoye avatar Apr 22 '25 07:04 bymoye

Considering that dateutil is only used in blacksheep.server.bindings it looks like a very good idea to remove this dependency, for the sake of reducing the number of dependencies. After all, I only wanted to improve the user experience when parsing input parameters that should be dates. This is a good recommendation.

But I don't understand the notion of "depends on a Python version 2 package" being funny. What is the problem? Just that some package has a classifier such as Programming Language :: Python :: 2 and is still compatible with that version of the programming language? My GitHub Workflow has a matrix and the framework is tested with the following:

      matrix:
        python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
        os: [ubuntu-latest, macos-latest, windows-latest]

And I am publishing wheels for those. So, clearly everything works well with Python 3. I bet most of the source code in CPython 3 itself was already present in CPython 2.

RobertoPrevato avatar May 11 '25 06:05 RobertoPrevato

Why I suggest reduding the number of dependency package reduding the number of dependency package can make the maintenance of the framework is easier,because of no need to trace more many extenal packages,and not restricted by the extenal packages.when the extenal packages change the api,the framework is forced to follow it.if the extenal packages is discontinued,the framework is affected.

ockan avatar Jun 18 '25 01:06 ockan

Done at https://github.com/Neoteroi/BlackSheep/pull/597.

RobertoPrevato avatar Sep 27 '25 19:09 RobertoPrevato