lycantropos / hypothesis_sqlalchemy

hypothesis strategies for generating SQLAlchemy objects
MIT License
28 stars 8 forks source link

uuid factory #31

Closed lachlancoding closed 2 years ago

lachlancoding commented 2 years ago

I've noticed that with hypothesis v6.39.6 hypothesis_sqlalchemy will fail to produce examples of tables with UUID columns. It seems to fail because hypothesis adopted a func(*, keyword_argument=default) pattern for their function signatures and hypothesis_sqlalchemy attempts to call strategies.uuids(version), when the function signature is uuids(*, version: Optional[int] = None).

I understand that this is no the version of hypothesis listed in the requirements, however, this is the version required by Pydantic, so at the moment users are forced to choose between generating examples for SQLAlchemy or Pydantic, or abandoning UUID fields. It seems like a simple fix and would be backwards compatible.

lycantropos commented 2 years ago

Thanks, the problem is that we need to update CI pipeline first because it is old and many things changed since then, I will open a separate PR updating CI and fixing given issue (and maybe other ones as well).

lycantropos commented 2 years ago

Because of the age of the project I'm going to refactor it making backward-incompatible changes, it may take another day or two, I hope to finish it ASAP.

lachlancoding commented 2 years ago

Thank you!

lycantropos commented 2 years ago

@lachlancoding: thank you for your attention, feel free to create another ticket if something breaks :-)