[`BUG`] : `.py` files inside `docs` folder is included in `wheel`
Closed this issue · 6 comments
Thanks for making this awesome library,
The problem
I am not sure if you are aware of this but the .py
file in docs
folder is getting bundled into python wheels.
Expected behavior
We should ignore .py
file inside docs
folder
Steps to reproduce the behavior
pip install aiohttp-client-cache
Workarounds
Nope
Environment
- aiohttp-client-cache version: 0.7.3
- Python version: 3.10
- Platform: Windows 11
Thanks for reading. I wish you a good day
This is actually intentional; the included folder is aiohttp_client_cache/docs, which is used at runtime for adding accurate signatures and type hints for some backend-specific connection objects. For example, if you want to pass Redis connection parameters to the Redis backend, you'll get autocompletion and type checking for username
, password
, etc.:
backend = RedisBackend(username='xx', password='xx')
That's separate from the root docs folder, which is only used for Sphinx documentation builds (hosted at https://aiohttp-client-cache.readthedocs.io), and not included in the wheel.
Does that make sense?
Yep it does. ( but in my opinion it can be in another folder to not cause confusion )
Thanks for quick reply :D
Sorry for the bad ping. I wish you a good day :}
Sorry for the bad ping.
Not at all, more eyes on the code is always helpful!
Can you think of a better name for that folder?
Hi there, (sorry for delayed response)
First of all thanks again for this project. It removed a ton of headache while providing a good customizable api. So far i am lovin' it. I used both of your project and both of them are awesome.
Now back to business.
I took another look at the files.
i have a few observations:
- I have never seen
docs
folder included in wheel build for any other module. Granted I have only used some web related projects. ( PyDantic does auto completion too but somehow its backed into core module ? ) - Maybe we can make a file named
autocomplete.py
inaiohttp_client_cache
? ( because files indocs
folder are an anti pattern and people will jump to the conclusion that you have mistakenly included docs in wheel build | Like me | )
I am quite new to programming. So no worries if my opinion doesn't make much sense.
Thanks again. I wish you a good day
I moved this to a new signatures
module to make that less confusing.
It doesn't do any autocompletion directly, it just provides signature and type information that is then picked up by other tools like mypy (for CI), pylance (for VSCode), etc.
Hi there,
Thank you for listening to me. :) good day to you :D