Skip to content

Conversation

@nicoonoclaste
Copy link
Collaborator

@nicoonoclaste nicoonoclaste commented May 9, 2019

  • Document that subclassing isn't supported.
  • Drop the subclassing testsuite.
  • Drop the subclassing support.
  • Rename Vector2 to Vector.
    Avoid breaking backwards-compatibility by adding a Vector2 alias.
  • Rename vector2.py to vector.py.

Closes #144 (this is an alternative proposal)

@nicoonoclaste
Copy link
Collaborator Author

I will measure the (hopefully positive) performance impact tomorrow :)

It is known to be Vector now that subclassing isn't supported.
test_vector2 doesn't make sense as a prefix anymore

Generated with:

    $ git zmv 'tests/test_vector2_(*).py' 'tests/test_$1.py'
    $ sed -i 's/def test_vector2_/def test_/g' tests/*.py
@AstraLuma
Copy link
Member

Is there a reason to not just rename vector.py to __init__.py?

@AstraLuma
Copy link
Member

@nbraud

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 I have no particular opinion one way or another, I didn't particularly want to add extra changes, but I can easily do that.

@nicoonoclaste
Copy link
Collaborator Author

@astronouth7303 Done.

@AstraLuma
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request May 22, 2019
149: Drop subclassing support r=astronouth7303 a=nbraud

- [x] Document that subclassing isn't supported.
- [x] Drop the subclassing testsuite.
- [x] Drop the subclassing support.
- [x] Rename `Vector2` to `Vector`.
  Avoid breaking backwards-compatibility by adding a `Vector2` alias.
- [x] Rename `vector2.py` to `vector.py`.

Closes #144 (this is an alternative proposal)

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
@bors
Copy link
Contributor

bors bot commented May 22, 2019

Build succeeded

  • docs
  • FreeBSD PYTHON:3.6
  • FreeBSD PYTHON:3.7
  • lint
  • Linux python:3.6-slim
  • Linux python:3.7-slim
  • macOS PYTHON:3.6.8
  • macOS PYTHON:3.7.2
  • Windows python:3.6-windowsservercore-1809
  • Windows python:3.7-windowsservercore-1809

@bors bors bot merged commit 3009bd4 into ppb:master May 22, 2019
@nicoonoclaste nicoonoclaste deleted the no-subclass branch May 22, 2019 03:55
bors bot added a commit that referenced this pull request Jun 2, 2019
167: Improve Vector.update r=astronouth7303 a=nbraud

Following #149, `Vector.update` can be made simpler and faster.

Co-authored-by: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
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.

2 participants