ocf / ocflib

Python libraries for account and server management
https://pypi.python.org/pypi/ocflib
Other
15 stars 32 forks source link

migrate ocflib.infra.db to ocflib.infra.mysql #147

Closed MCer4294967296 closed 5 years ago

MCer4294967296 commented 5 years ago

solving issue #141. Thorough search tells me there really is not a lot of references to db.py... There are some more references in the Decal repo though, which is why I have not deleted db.py.

btw I am Billy, ocf username yichizh

closes #141

dkess commented 5 years ago

I would make it more clear in the comment that ocflib.infra.db is deprecated and shouldn't be used.

abizer commented 5 years ago

Hey yichizh,

Thanks for doing this! Echoing @dkess 's sentiments, I would alias ocflib.infra.db to ocflib.infra.mysql, and include a print statement that says it's been deprecated. Looking at sourcegraph it looks like this also catches basically every non-decal use of ocflib.lab.db, so it should be safe to directly rename the file / delete the old file as well.

ethanhs commented 5 years ago

include a print statement that says it's been deprecated

I believe a DeprecationWarning might be better suited for this?

abizer commented 5 years ago

DeprecationWarning is even better

ethanhs commented 5 years ago

Wait why are we deleting this file that we had put a deprecation warning on?

abizer commented 5 years ago

the deprecation warning is actually superfluous since the rename is contained entirely inside of ocflib. all external uses go through a database-specific interface

abizer commented 5 years ago

@MCer4294967296 bump