wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
6.03k stars 603 forks source link

Use importlib.metadata instead of pkg_resources in python 3.10 and above #1200

Closed kit494way closed 1 year ago

kit494way commented 1 year ago

This PR suppress a deprecation warning.

before:

$ SQLALCHEMY_SILENCE_UBER_WARNING=1 csvsql --query 'SELECT * FROM dummy' examples/dummy.csv
/home/kit494way/projects/csvkit/.venv/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
a,b,c
1,2.0,3.0

after:

$ SQLALCHEMY_SILENCE_UBER_WARNING=1 csvsql --query 'SELECT * FROM dummy' examples/dummy.csv
a,b,c
1,2.0,3.0
github-actions[bot] commented 1 year ago

Coverage Status

coverage: 88.319% (-0.1%) from 88.421% when pulling 53a4abc0dc15d4839499360259384b7cf5b5b0c6 on kit494way:csvsql-dialects into 05e9d1b773952917d870bd9964e48817f99cea14 on wireservice:master.

coveralls commented 1 year ago

Coverage Status

coverage: 88.443% (+0.02%) from 88.421% when pulling 53a4abc0dc15d4839499360259384b7cf5b5b0c6 on kit494way:csvsql-dialects into 05e9d1b773952917d870bd9964e48817f99cea14 on wireservice:master.

jpmckinney commented 1 year ago

Thank you!