aiomysql icon indicating copy to clipboard operation
aiomysql copied to clipboard

Add type hints

Open Nothing4You opened this issue 3 years ago • 4 comments

see also https://github.com/aio-libs/aiopg/pull/813 for context managers

Nothing4You avatar Jan 30 '22 02:01 Nothing4You

Hello, @Nothing4You, I think I can try to do it if there is still a need for it. But I have a little problems with aiomysql:

  • When I run the make test command I get an error message:
    • python -m twine check --strict dist/* ERROR InvalidDistribution: Cannot find file (or expand pattern): 'dist/*'
  • In the aiomysql/connection.py cannot import
    • EOFPacketWrapper
    • LoadLocalPacketWrapper
    • OKPacketWrapper
    • TEXT_TYPES
    • MAX_PACKET_LEN
    • _auth
    • CR
    • escape_bytes_prefixed
    • through

It will be great if you help me with these problems so that I can start dealing with the issue faster.

DavidRomanovizc avatar May 03 '23 16:05 DavidRomanovizc

@DavidRomanovizc I see that you still have your fork available, though it's last update on main (the only branch there) was in March 6th. If you could push the changes to create a reproducible environment, I think this would help in creating a solution, and others as well as I could take a look too.

cyrus01337 avatar May 04 '23 13:05 cyrus01337

@DavidRomanovizc I see that you still have your fork available, though it's last update on main (the only branch there) was in March 6th. If you could push the changes to create a reproducible environment, I think this would help in creating a solution, and others as well as I could take a look too.

Yes, I will try to update the my branch soon

DavidRomanovizc avatar May 04 '23 14:05 DavidRomanovizc

Hi @DavidRomanovizc, the Makefile has not been updated when updating the CI/test changes when it was migrated to GitHub actions, so not everything may be working properly currently. As I'm working on macOS, it's not as easy for me to use containers for testing, as they're not natively supported, so for myself I've mostly been running pytest manually. I've been using on my local machine e.g. MYSQL_ROOT_PASSWORD="" python -m pytest --color=yes --verbosity 2 --cov aiomysql --cov tests ./tests --mysql-address tcp.mysql80=localhost:3306 --mysql-unix-socket unix.mysql80=/tmp/mysql.sock --cov-report html -s -W always before pushing code to GitHub and letting GH actions process across different databases. You can find the command used by GitHub actions here.

Nothing4You avatar May 06 '23 21:05 Nothing4You