-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: reduce dependency bloat #292
Comments
Hi @joaoe I think it is a good idea to make this package lighter.
The other dependencies are really important, so we need to keep them |
Hi, thank you for your attention :) I though of making a small draft PR, but these kind of changes tend to be very opinionated, so I don't have the bandwidth to provide a patch that would be shred to bits :p But for now, could you please just mark faust as optional and thing about the rest after ? That would in the immediate term help a lot with import bloat. |
I have created a PR to fix the dependencies. The dependencies for now on are: |
Is your feature request related to a problem? Please describe.
Hi !
In my project I'm working to reduce dependency bloat, import times, install times, package size, etc.
dataclasses-avroschema happens to be a culprit.
After running
pipdeptree
it shows a lot of pulled dependencies which are of no use for our project and yet seem to be of little use for dataclasses-avroschema.I just went through the dependency list in the
[tool.poetry.dependencies]
ofpyproject.toml
and have the following comments:fastavro
, seem this is pretty much requiredinflect
, used in a single place asp.singular_noun(name)
pytz
, use once to get the UTC timezone and then in testsdacite
, this seem requiredfaker
, used in many places infields.py
stringcase
, seems important as wellpydantic
, already optionaldc-avro
, already optionalfaust-streaming
, marked as required dependency even though the code has a fallback if it is not importableDescribe the solution you'd like
fastavro
, keepinflect
, possibly mark as optional dependency ? And add fallback in code when it is not importable.pytz
, I understand pretty much every project on pypi.org imports pytz, but this project as a library should include it only if strictly necessary3.1. To access the
utc
timezone object just usedatetime.UTC
from Python's stdlib.3.2. Import it as test dependency for the other use.
dacite
, keepfaker
is highly suspicious and seems like test code. Moreover, is it really necessary to have random example data for those fake functions ? Could this be instead either an optional or test dependency, and access faker lazily with a fallback if it is not imported/installed ? Faker is specially annoying because it just spams logging with messages about missing locales all the time.stringcase
, keepfaust-streaming
, this should be marked as an optional dependency. This is actually the biggest source of bloat.Describe alternatives you've considered
None.
The text was updated successfully, but these errors were encountered: