getsentry / responses

A utility for mocking out the Python Requests library.
Apache License 2.0
4.14k stars 354 forks source link

Redundant runtime dependency on types-toml #595

Closed stanislavlevin closed 1 year ago

stanislavlevin commented 1 year ago

Describe the bug

With f431d49021252657e55253c18f0f8493c61e6ae6 types-toml is mandatory runtime dependency, while it's actually typing stub.

Additional context

No response

Version of responses

0.22.0

Steps to Reproduce

# your code goes here

Expected Result

There should be no dependency on typing stuff at runtime.

Actual Result

There is runtime dependency on types-toml.

beliaev-maksim commented 1 year ago

I am -1 on removing it from run time. Users that have installed responses should not bother themselves to install types for toml to work with our project and do a type checking

@markstory thoughts?

stanislavlevin commented 1 year ago

This can be done with extras (place all the required typing stuff there). If somebody wants to do type checking they can install it (e.g. responses[typing]) explicitly. But if a requirement is strict it would be pulled unconditionally ( i.e. I have no choice).

markstory commented 1 year ago

Why is this a problem? Is it because you would like to avoid downloading the additional package?

stanislavlevin commented 1 year ago

Software dependencies should be necessary and sufficient. I personally don't want to have any unused packages.

beliaev-maksim commented 1 year ago

moved to tomli