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

py3 features #3571

Merged
merged 7 commits into from Apr 23, 2020
Merged

py3 features #3571

merged 7 commits into from Apr 23, 2020

Conversation

slav0nic
Copy link
Contributor

some addition to #3421

  • class Foo(object): replaced with class Foo:, (object) make no sense in py3
  • __nonzero__() -> __bool__(), first method was removed from py3
  • use new py3 super() syntax without (class, self)
  • / replaced with //
    order = (MAX_ORDER - score) / (len(preds) + 1)

    in py2 it returned int type, now in py3 - float, that looks not correct (but not critical :])
  • __unicode__ method was removed in py3, so we don't need any extra checks
  • unittest.AssertEquals was deprecated

tests/test_registry.py Outdated Show resolved Hide resolved
tests/test_registry.py Outdated Show resolved Hide resolved
tests/test_testing.py Outdated Show resolved Hide resolved
Copy link
Member

@mmerickel mmerickel left a comment

Choose a reason for hiding this comment

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

This is great... the failing test is unrelated to this PR. I asked for a couple minor changes but that's it.

@slav0nic
Copy link
Contributor Author

Rebased, changed this commit aadf19a

@slav0nic slav0nic requested a review from mmerickel April 18, 2020 22:09
@mmerickel mmerickel merged commit 4f57089 into Pylons:master Apr 23, 2020
@mmerickel
Copy link
Member

Good stuff, thank you @slav0nic !

@slav0nic slav0nic deleted the py3features branch April 24, 2020 09:45
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.

None yet

2 participants