Skip to content

Drop Python 2 support#58

Merged
horgh merged 23 commits intomasterfrom
greg/py3
Jul 14, 2020
Merged

Drop Python 2 support#58
horgh merged 23 commits intomasterfrom
greg/py3

Conversation

@oschwald
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@horgh horgh left a comment

Choose a reason for hiding this comment

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

🐍

Comment thread minfraud/webservice.py Outdated
@@ -26,17 +26,14 @@
class Client:
"""Client for accessing the minFraud Score and Insights web services."""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Factors too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I decided to delete "Score and Insights" as it also supports the report transactions endpoint and listing everything seemed a bit unwieldy.

Comment thread minfraud/validation.py Outdated
return s
raise ValueError
_rfc3339_datetime = Match(
r"\A\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(\.\d+)?(?:[Zz]|[+-]\d{2}:\d{2})\Z"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would we perhaps want to use [0-9] instead of \d? I'm wondering if we could incorrectly accept more digit characters than expected. Perhaps it is unlikely to arise in practice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good thought. I added the ASCII flag instead.

This obviously will still allow invalid timestamps as it only validates the structure, not the content. However, I think that is sufficient for this purpose.

@horgh horgh merged commit 343555e into master Jul 14, 2020
@horgh horgh deleted the greg/py3 branch July 14, 2020 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants