Worth mentioning unittest2? #40

Closed
askedrelic opened this Issue Dec 30, 2011 · 15 comments

Comments

Projects
None yet
7 participants
@askedrelic
Contributor

askedrelic commented Dec 30, 2011

Hey, just started scanning through the guide!

In the testing section, http://docs.python-guide.org/en/latest/writing/tests/#unittest2 covers the backport of unittest2 for Python 2.6.

As this is an "opinionated" guide and I'm assuming focused on current Python 2.7, is it worth mentioning backwards compatibility at this point?

Alternatively, since I would think backwards compatibly is a more advanced topic, perhaps it's worth pulling into a new section, that tox can link to?

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Dec 30, 2011

Owner

I think a brief mention of unittest2 is worth-while. Writing code that's compatible with Python 2.5–2.7 is often a best practice, after all.

Owner

kennethreitz commented Dec 30, 2011

I think a brief mention of unittest2 is worth-while. Writing code that's compatible with Python 2.5–2.7 is often a best practice, after all.

@six8

This comment has been minimized.

Show comment Hide comment
@six8

six8 Dec 30, 2011

Contributor

Sounds like notes on backwards compatibility with 2.5 - 2.7 and 3.x is worth adding in general.

Contributor

six8 commented Dec 30, 2011

Sounds like notes on backwards compatibility with 2.5 - 2.7 and 3.x is worth adding in general.

@madjar

This comment has been minimized.

Show comment Hide comment
@madjar

madjar Dec 30, 2011

Contributor

Is backwards compatibility with 2.5 still among the best practices ? Django will start dropping 2.5 support after the next release in their effort of porting to python3, and I think I've read similar things about other projects.

Contributor

madjar commented Dec 30, 2011

Is backwards compatibility with 2.5 still among the best practices ? Django will start dropping 2.5 support after the next release in their effort of porting to python3, and I think I've read similar things about other projects.

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Dec 30, 2011

Owner

As more people start adopting Python 3, dropping Python 2.5 becomes more and more convenient. It depends on the project. Having useful links is always useful, even if it isn't what we recommend.

Owner

kennethreitz commented Dec 30, 2011

As more people start adopting Python 3, dropping Python 2.5 becomes more and more convenient. It depends on the project. Having useful links is always useful, even if it isn't what we recommend.

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Dec 30, 2011

Owner

Personally, I think the stance should be this:

If you're writing an open source module, you get extra brownies if you make it 2.5 compatible, but don't bend over backwards.

Owner

kennethreitz commented Dec 30, 2011

Personally, I think the stance should be this:

If you're writing an open source module, you get extra brownies if you make it 2.5 compatible, but don't bend over backwards.

@mvanveen

This comment has been minimized.

Show comment Hide comment
@mvanveen

mvanveen Feb 7, 2012

App Engine dev chiming in here. 2.5 suport is still pretty crucial within the niche of the App Engine community. While it's true that 2.7 is now supported, the transition is not necessarily a gentle one.

I suspect that it will be a little while yet before 2.7 is the dominant Python verison for App Engine.

mvanveen commented Feb 7, 2012

App Engine dev chiming in here. 2.5 suport is still pretty crucial within the niche of the App Engine community. While it's true that 2.7 is now supported, the transition is not necessarily a gentle one.

I suspect that it will be a little while yet before 2.7 is the dominant Python verison for App Engine.

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Feb 7, 2012

Owner

I assert that anyone pushing something to app engine should be using 2.7.

Owner

kennethreitz commented Feb 7, 2012

I assert that anyone pushing something to app engine should be using 2.7.

@mvanveen

This comment has been minimized.

Show comment Hide comment
@mvanveen

mvanveen Feb 7, 2012

I'm not sure that's fair. I really with it was, as I agree with the sentiment a lot.

To give you an idea, support for 2.7 happened mere months ago. It has, in fact, taken the App Engine team this long to catch up (Yes, from before f!*#$ing YouTube, even. I wish I knew what they were doing in that span of time... SSL support is another one of these).

Among the quirks are weird performance characteristics you'd never guess would come up until you start profiling. Datastore queries are impacted by the pure Python Protocol Buffer parser implementation, for example. The time to fetch a Datastore instance inceases linearly with respect to the number of properties, so it looks like there's a constant overhead to parse an entity.

mvanveen commented Feb 7, 2012

I'm not sure that's fair. I really with it was, as I agree with the sentiment a lot.

To give you an idea, support for 2.7 happened mere months ago. It has, in fact, taken the App Engine team this long to catch up (Yes, from before f!*#$ing YouTube, even. I wish I knew what they were doing in that span of time... SSL support is another one of these).

Among the quirks are weird performance characteristics you'd never guess would come up until you start profiling. Datastore queries are impacted by the pure Python Protocol Buffer parser implementation, for example. The time to fetch a Datastore instance inceases linearly with respect to the number of properties, so it looks like there's a constant overhead to parse an entity.

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Feb 7, 2012

Owner

I'm not going to lie: I don't think GAE should be much of a concern for this project. It's pretty terrible.

Owner

kennethreitz commented Feb 7, 2012

I'm not going to lie: I don't think GAE should be much of a concern for this project. It's pretty terrible.

@dhruv

This comment has been minimized.

Show comment Hide comment
@dhruv

dhruv Feb 7, 2012

@kennethreitz Can you shed some more light on why you think it's such a terrible platform? I've been coding with it for about 6 months now and am pretty satisfied. I ask only to make sure I don't miss out on something even better!

dhruv commented Feb 7, 2012

@kennethreitz Can you shed some more light on why you think it's such a terrible platform? I've been coding with it for about 6 months now and am pretty satisfied. I ask only to make sure I don't miss out on something even better!

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jun 13, 2013

@dhruv Well, @kennethreitz does work at Heroku...

ghost commented Jun 13, 2013

@dhruv Well, @kennethreitz does work at Heroku...

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Jun 13, 2013

Owner

@kuyan that has nothing to do with my impressions of GAE.

Owner

kennethreitz commented Jun 13, 2013

@kuyan that has nothing to do with my impressions of GAE.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Jun 13, 2013

@kennethreitz Didn't mean to imply that, my comment was made in good humor. My bad!

ghost commented Jun 13, 2013

@kennethreitz Didn't mean to imply that, my comment was made in good humor. My bad!

@kennethreitz

This comment has been minimized.

Show comment Hide comment
@kennethreitz

kennethreitz Jun 13, 2013

Owner

No worries 🍰 :)

Owner

kennethreitz commented Jun 13, 2013

No worries 🍰 :)

@sigmavirus24

This comment has been minimized.

Show comment Hide comment
@sigmavirus24

sigmavirus24 Mar 15, 2014

Contributor

There is a section on unittest2 which was the original purpose of this issue. Closing since the request has been satisfied.

Contributor

sigmavirus24 commented Mar 15, 2014

There is a section on unittest2 which was the original purpose of this issue. Closing since the request has been satisfied.

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