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

Added money type to SQLA_TYPE_MAPPING #218

Merged
merged 2 commits into from Jun 18, 2019

Conversation

@heckad
Copy link
Contributor

commented Jun 16, 2019

No description provided.

@heckad

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2019

Why py27-lowest don't have MONEY? It's correct?

@sloria

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

It's probably not a py2-specific issue. Looks like our lowest supported SQLAlchemy version (0.9.7) doesn't support MONEY. I'm up for bumping up the minimum version; could you find which SQLA version adds MONEY?

@AbdealiJK

This comment has been minimized.

Copy link
Collaborator

commented Jun 17, 2019

May be better to add a check and add this field only if the sqla version is > some value rather than bumping it up

@sloria

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

I'm fine with either. Looks like it was added in 1.2, which is ~1.5 years old at this point.

@heckad

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

So what are we doing? We update the version or we write factory?

@sloria

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

Well, we're already doing

    if hasattr(sa, "JSON"):
        SQLA_TYPE_MAPPING[sa.JSON] = fields.Raw

so we could do something similar

    if hasattr(postgres, "MONEY"):
        SQLA_TYPE_MAPPING[postgres.MONEY] = fields.Decimal
@heckad

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

Done

@heckad

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2019

When it will be merged?

@sloria sloria merged commit ff3ffa3 into marshmallow-code:dev Jun 18, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sloria

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

Will probably release this over the weekend.

@heckad

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2019

Thanks!

@heckad heckad deleted the heckad:patch-1 branch Jun 18, 2019

@sloria

This comment has been minimized.

Copy link
Member

commented Jun 22, 2019

This is released in 0.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.