Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing SQLAlchemy-Utils with SQLAlchemy 1.3.4 emits a warning #374

Closed
m-aciek opened this issue May 29, 2019 · 7 comments
Closed

Importing SQLAlchemy-Utils with SQLAlchemy 1.3.4 emits a warning #374

m-aciek opened this issue May 29, 2019 · 7 comments

Comments

@m-aciek
Copy link

m-aciek commented May 29, 2019

>>> import sqlalchemy
>>> import sqlalchemy_utils
/.../site-packages/sqlalchemy/sql/functions.py:68: SAWarning: The GenericFunction 'array_agg' is already registered and is going to be overriden.
  "is going to be overriden.".format(identifier))

Is it possible for SQLAlchemy-Utils to register the function at some other name or register it without the warning?

@m-aciek m-aciek changed the title array_agg overriden by SQLAlchemy's default Importing SQLAlchemy-Utils with SQLAlchemy 1.3.4 emits a warning May 29, 2019
@Viste
Copy link

Viste commented May 30, 2019

Confrim!

1 similar comment
@derunix
Copy link

derunix commented May 30, 2019

Confrim!

@m-aciek
Copy link
Author

m-aciek commented May 30, 2019

https://github.com/kvesteri/sqlalchemy-utils/blob/master/sqlalchemy_utils/expressions.py#L115 This is the line which causes warning.

array_agg is not documented in SQLAlchemy-Utils docs. It may be a fix of thing, that is already fixed in SQLAlchemy core, sqlalchemy/sqlalchemy#4107? @kvesteri, could you confirm?

@m-aciek
Copy link
Author

m-aciek commented May 30, 2019

For the record, this commit introduced array_agg in SQLAlchemy-Utils: 8985254.

@VizualAbstract
Copy link
Contributor

Confirm...

@aaron-junot
Copy link

+1 for this problem

kvesteri added a commit that referenced this issue Jun 9, 2019
liviuchircu added a commit to OpenSIPS/opensips-cli that referenced this issue Jun 10, 2019
This only happens with 1.3.4, issue here:
kvesteri/sqlalchemy-utils#374

Example behavior (random error spewed):

$ opensips-cli -x mi ul_dump
/usr/local/lib/python3.6/dist-packages/SQLAlchemy-1.3.4-py3.6-linux-
x86_64.egg/sqlalchemy/sql/functions.py:68: SAWarning:
The GenericFunction 'array_agg' is already registered and is going to
be overriden.
  "is going to be overriden.".format(identifier))
{
    "Domains": [
        {
            "name": "location",
            "hash_size": 512,
            "AORs": []
        }
    ]
}

We temporarily downgrade to 1.3.3, until there is an official fix.
@m-aciek
Copy link
Author

m-aciek commented Jun 10, 2019

Closing as fix is released in 0.34.0. Thank you @kvesteri.

@m-aciek m-aciek closed this as completed Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants