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

Feature/slots #35

Merged
merged 12 commits into from Mar 31, 2016

Conversation

Projects
None yet
4 participants
@Tinche
Member

Tinche commented Mar 17, 2016

No description provided.

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Mar 17, 2016

Current coverage is 100.00%

Merging #35 into master will not affect coverage as of 8929cc7

@@            master     #35   diff @@
======================================
  Files            7       7       
  Stmts          343     361    +18
  Branches        80      86     +6
  Methods          0       0       
======================================
+ Hit            343     361    +18
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of 8929cc7

Powered by Codecov. Updated on successful CI builds.

codecov-io commented Mar 17, 2016

Current coverage is 100.00%

Merging #35 into master will not affect coverage as of 8929cc7

@@            master     #35   diff @@
======================================
  Files            7       7       
  Stmts          343     361    +18
  Branches        80      86     +6
  Methods          0       0       
======================================
+ Hit            343     361    +18
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of 8929cc7

Powered by Codecov. Updated on successful CI builds.

Show outdated Hide outdated tests/test_dark_magic.py
@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 17, 2016

Member

On a first scroll a few nits to keep you busy until I have actual time for a review :):

Please:

  1. replace class_ through cls.
  2. use my docstring style consistently (mostly test_slots.py)
Member

hynek commented Mar 17, 2016

On a first scroll a few nits to keep you busy until I have actual time for a review :):

Please:

  1. replace class_ through cls.
  2. use my docstring style consistently (mostly test_slots.py)
Rename class_ to cls.
Fix docstrings.
Fix missing parens in a test.
@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 21, 2016

Member

OK one more fluff wish: could you please make all asserts to be assert expected == rv? I don’t Yoda in ifs either but I like to have the expected values lined up. :)

Member

hynek commented Mar 21, 2016

OK one more fluff wish: could you please make all asserts to be assert expected == rv? I don’t Yoda in ifs either but I like to have the expected values lined up. :)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 21, 2016

Member

Just so we don’t forget:

  • document that slots=True replaces the class
Member

hynek commented Mar 21, 2016

Just so we don’t forget:

  • document that slots=True replaces the class
Show outdated Hide outdated src/attr/_make.py
Show outdated Hide outdated src/attr/_make.py
Show outdated Hide outdated src/attr/_make.py
Show outdated Hide outdated src/attr/_make.py
Show outdated Hide outdated tests/test_make.py
Show outdated Hide outdated tests/test_make.py
@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 21, 2016

Member

all in all this is exciting :)

Member

hynek commented Mar 21, 2016

all in all this is exciting :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 21, 2016

Member

Pasting the answer link to a review question here so it doesn't get hidden by GitHub:

#35 (comment)

Member

Tinche commented Mar 21, 2016

Pasting the answer link to a review question here so it doesn't get hidden by GitHub:

#35 (comment)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 22, 2016

Member

A question? Wrong link? Seemed more like a statement of facts. :)

Member

hynek commented Mar 22, 2016

A question? Wrong link? Seemed more like a statement of facts. :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 22, 2016

Member

Ok, a clarification then. :)

Member

Tinche commented Mar 22, 2016

Ok, a clarification then. :)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 22, 2016

Member

Are you waiting for anything from me?

Member

hynek commented Mar 22, 2016

Are you waiting for anything from me?

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 22, 2016

Member

Er no, I'm at work currently. Will fix the parametrization decorators tonight. That's all for now right?

Member

Tinche commented Mar 22, 2016

Er no, I'm at work currently. Will fix the parametrization decorators tonight. That's all for now right?

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 22, 2016

Member

That and docs. :)

FWIW, you can also use hypothesis for the decorators thing. I tend to introduce it into most of my current projects.

Member

hynek commented Mar 22, 2016

That and docs. :)

FWIW, you can also use hypothesis for the decorators thing. I tend to introduce it into most of my current projects.

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 22, 2016

Member

Ok, about the docs. Obviously we need to document the slots argument to attr.s() and make_class, but we should probably have a small section somewhere on the benefits and drawbacks of slot classes. Any preference where?

Member

Tinche commented Mar 22, 2016

Ok, about the docs. Obviously we need to document the slots argument to attr.s() and make_class, but we should probably have a small section somewhere on the benefits and drawbacks of slot classes. Any preference where?

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 22, 2016

Member

I’d say examples. Bring an example and explain a bit. But you don’t have to explain slots completely. Only what’s special about our slots. Feel free to link a general description.

Member

hynek commented Mar 22, 2016

I’d say examples. Bring an example and explain a bit. But you don’t have to explain slots completely. Only what’s special about our slots. Feel free to link a general description.

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 22, 2016

Member

Ok, I've added hypothesis in. The tests for py27 and pypy are actually failing for me currently, since hypothesis conditionally depends on enum34, and tox creates virtualenvs with ancient pip versions (1.5.6) which don't know to actually install enum34 for hypothesis. I will admit to not knowing how to fix this, and getting a little pissed off at tox for not having a mechanism to deal with this (or at least a discoverable mechanism).

I'll ping here when there's something to show for the docs, might be a few days.

Member

Tinche commented Mar 22, 2016

Ok, I've added hypothesis in. The tests for py27 and pypy are actually failing for me currently, since hypothesis conditionally depends on enum34, and tox creates virtualenvs with ancient pip versions (1.5.6) which don't know to actually install enum34 for hypothesis. I will admit to not knowing how to fix this, and getting a little pissed off at tox for not having a mechanism to deal with this (or at least a discoverable mechanism).

I'll ping here when there's something to show for the docs, might be a few days.

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 23, 2016

Member

You mean local? Because Travis passes just fine? Try tox -r :)

Member

hynek commented Mar 23, 2016

You mean local? Because Travis passes just fine? Try tox -r :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 23, 2016

Member

I did try recreating, no dice. I guess my virtualenv package is just obsolete. Still frustrating to not be able to precisely tailor the test environment without hacks :/

Member

Tinche commented Mar 23, 2016

I did try recreating, no dice. I guess my virtualenv package is just obsolete. Still frustrating to not be able to precisely tailor the test environment without hacks :/

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 23, 2016

Member

I use pipsi for tox and keep my virtualenv/pip up2date, yeah. :)

Member

hynek commented Mar 23, 2016

I use pipsi for tox and keep my virtualenv/pip up2date, yeah. :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 28, 2016

Member

Just pushed some docs, for your inspection. Out of curiosity, do you get automatic notifications when I push new stuff?

Member

Tinche commented Mar 28, 2016

Just pushed some docs, for your inspection. Out of curiosity, do you get automatic notifications when I push new stuff?

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 29, 2016

Member

Nope, always ping tickets when you do something. Getting a notification for each push would result in a lot of mails I guess but it would be nice if there’d be a button “notify maintainers” or something. :-/

Member

hynek commented Mar 29, 2016

Nope, always ping tickets when you do something. Getting a notification for each push would result in a lot of mails I guess but it would be nice if there’d be a button “notify maintainers” or something. :-/

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 29, 2016

Member

Please do semantic new lines. :)

Member

hynek commented Mar 29, 2016

Please do semantic new lines. :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 29, 2016

Member

Alright, am I doing it right? :)

Member

Tinche commented Mar 29, 2016

Alright, am I doing it right? :)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 29, 2016

Member

I'll give more detailed feedback tomorrow but you slightly over-did it. :) No line feeds after commas please. :)

Member

hynek commented Mar 29, 2016

I'll give more detailed feedback tomorrow but you slightly over-did it. :) No line feeds after commas please. :)

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche
Member

Tinche commented Mar 29, 2016

Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
Show outdated Hide outdated docs/examples.rst
@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 30, 2016

Member

Getting there! 🎉

Member

hynek commented Mar 30, 2016

Getting there! 🎉

Review feedback incorporated:
* capitalize bullet items
* replace bullet asterisks with dashes
* indent bullet code fragments
* join some lines
@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 30, 2016

Member

Alright, I've incorporated your feedback to the best of my abilities :)

Member

Tinche commented Mar 30, 2016

Alright, I've incorporated your feedback to the best of my abilities :)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 31, 2016

Member

Change log entry and I think we can merge. :)

Member

hynek commented Mar 31, 2016

Change log entry and I think we can merge. :)

@hynek

This comment has been minimized.

Show comment
Hide comment
@hynek

hynek Mar 31, 2016

Member

Nevermind, I’ll do it myself. Thanks for all the work!

Member

hynek commented Mar 31, 2016

Nevermind, I’ll do it myself. Thanks for all the work!

@Tinche

This comment has been minimized.

Show comment
Hide comment
@Tinche

Tinche Mar 31, 2016

Member

My pleasure, thanks for the reviews.

Member

Tinche commented Mar 31, 2016

My pleasure, thanks for the reviews.

@hynek hynek merged commit adb08a1 into python-attrs:master Mar 31, 2016

2 checks passed

codecov/project 100.00% (target 100.00%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

hynek added a commit that referenced this pull request Mar 31, 2016

hynek added a commit that referenced this pull request Mar 31, 2016

@glyph

This comment has been minimized.

Show comment
Hide comment
@glyph

glyph May 23, 2016

Contributor

I just saw this land in a release. Once upon a time, @fijal told me that __slots__ were actually bad for PyPy. Summoning him to this ticket, I hope: did I even understand that correctly at the time? If so, is it still true? I want to use this because I love the added "no extra attributes" strictness, but I don't want to hurt performance there.

Contributor

glyph commented May 23, 2016

I just saw this land in a release. Once upon a time, @fijal told me that __slots__ were actually bad for PyPy. Summoning him to this ticket, I hope: did I even understand that correctly at the time? If so, is it still true? I want to use this because I love the added "no extra attributes" strictness, but I don't want to hurt performance there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment