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

import fix for signature #23

Merged
merged 8 commits into from
Feb 18, 2019
Merged

import fix for signature #23

merged 8 commits into from
Feb 18, 2019

Conversation

itdependsnetworks
Copy link
Contributor

@itdependsnetworks
Copy link
Contributor Author

Any chance I can get this merged?

Copy link
Collaborator

@iky iky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @itdependsnetworks

Thanks for the contribution! It's great that with your tweak the lib can be used on p2 .)

except ImportError:
# For python2 capability. NOTE: you must fulfill this requirement
# yourself, it is not in requirements.txt
from funcsigs import signature
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be great to cover by tests in TOX or travis matrix with funcsigs explicitly deployed for a python2 environment.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. If we're adding this new logic, it'd be great to cover it with tests.

from inspect import signature
except ImportError:
# For python2 capability. NOTE: you must fulfill this requirement
# yourself, it is not in requirements.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"# yourself, it is not in package requirements" - there is no requirements.txt for this project, install_requires is used instead.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Also, how would you feel about adding another section to extras_require to support this @iky ? Something like 'python2'.

https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras

Copy link
Owner

@juliotrigo juliotrigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @itdependsnetworks

Even though there won't be active support for Python 2, I think we should port all the code to use new-style classes if we're adding this change.

I have found one class that could be amended:

class BooleanFilter: to class BooleanFilter(object) in sqlalchemy_filters.filters.py

README.rst Outdated
Python 2
--------

There is no active support for python 2, however it is compatiable as of January 2019, if you install funcsigs.
Copy link
Owner

@juliotrigo juliotrigo Feb 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could replace January with February since this hasn't landed yet on master, even though the PR was created last month.

Maybe we could also add the version when we cut the next release.

except ImportError:
# For python2 capability. NOTE: you must fulfill this requirement
# yourself, it is not in requirements.txt
from funcsigs import signature
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. If we're adding this new logic, it'd be great to cover it with tests.

from inspect import signature
except ImportError:
# For python2 capability. NOTE: you must fulfill this requirement
# yourself, it is not in requirements.txt
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Also, how would you feel about adding another section to extras_require to support this @iky ? Something like 'python2'.

https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras

@itdependsnetworks
Copy link
Contributor Author

Like they say, 7 times is a charm :)

I think I have identified all of the comments.

Copy link
Owner

@juliotrigo juliotrigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the changes @itdependsnetworks

I'm happy to merge it if @iky also approves it.

Copy link
Collaborator

@iky iky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👍 .)

Thanks!

@juliotrigo juliotrigo merged commit 8f74bf1 into juliotrigo:master Feb 18, 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

Successfully merging this pull request may close these issues.

3 participants