aperezdc / gnarl

Lightweight module to define serializable, schema-validated classes
5 stars 0 forks source link

Too heavy dependencies? #1

Closed piotrkilczuk closed 4 years ago

piotrkilczuk commented 6 years ago

Not sure if you are still maintaining this lib?

Does gnarl really require so many dependencies provided it's just 450 LOC?

gnarl==0.1.0a4
  - delorean [required: >=0.5.0, installed: 1.0.0]
    - babel [required: >=2.1.1, installed: 2.6.0]
      - pytz [required: >=0a, installed: 2018.4]
    - humanize [required: >=0.5.1, installed: 0.5.1]
    - python-dateutil [required: >=2.4.2, installed: 2.7.3]
      - six [required: >=1.5, installed: 1.11.0]
    - pytz [required: >=2015.7, installed: 2018.4]
    - tzlocal [required: >=1.2, installed: 1.5.1]
      - pytz [required: Any, installed: 2018.4]
hugovk commented 4 years ago

Maybe it's only 450 LOC because of the dependencies :)

Delorean is the only direct dependency, and (most/all of) the others are quite common, so chances are they're already installed on any given system; I have a fairly recent 3.8 installation, haven't installed gnarl and already have all but two (babel, tzlocal).

aperezdc commented 4 years ago

Maybe it's only 450 LOC because of the dependencies :)

This is exactly the reason. Gnarl itself is not a lot of code, but date/time handling in particular tends to be tricky and I find Delorean to be one of the most complete libraries out there, which also provides a nice API.

That being said, I would be happy to accept a patch that makes Delorean an optional dependency.