python-gino / gino

GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
https://python-gino.org/
Other
2.67k stars 150 forks source link

Allow to pass hide_parameters into GinoEngine #798

Open FNSdev opened 2 years ago

FNSdev commented 2 years ago

Hello!

Is your feature request related to a problem? Please describe. I would like to utilize hide_parameters argument from the SQLAlchemy engine, but it seems like it's not possible right now, because GinoEngine does not have such a kwarg, so I get a TypeError from here:

class GinoStrategy:

    async def create(self, name_or_url, loop=None, **kwargs):
       ....

        # all kwargs should be consumed
        if kwargs:
            raise TypeError(
                "Invalid argument(s) %s sent to create_engine(), "
                "using configuration %s/%s.  Please check that the "
                "keyword arguments are appropriate for this combination "
                "of components."
                % (
                    ",".join("'%s'" % k for k in kwargs),
                    dialect_cls.__name__,
                    engine_cls.__name__,
                )
            )

Describe the solution you'd like Make it possible to pass hide_parameters into GinoEngine __init__.

Describe alternatives you've considered

Additional context

I am using Gino 1.0.1 and SQLALchemy 1.3.22.