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

Python 3.4 fixes #4758

Merged
merged 3 commits into from Jan 10, 2014
Merged

Python 3.4 fixes #4758

merged 3 commits into from Jan 10, 2014

Conversation

takluyver
Copy link
Member

I ran the test suite under Python 3.4b1 and hit a couple of inconsequential test failures.

'import lxml' was succeeding, but 'from lxml import html' was failing.
Changes to string formatting mean slicing in EvalFormatter now works.
@@ -51,8 +52,8 @@
def test_citation2latex():
"""Are citations parsed properly?"""
try:
import lxml
from lxml import html #analysis:ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

This one is not really related to Python 3.4, it was just that the test was out of line with the implementation.

@minrk
Copy link
Member

minrk commented Jan 6, 2014

I guess the fixed test should be backported to 1.x, right?

@takluyver
Copy link
Member Author

Yes, I think so.

@ivanov
Copy link
Member

ivanov commented Jan 6, 2014

I don't really understand what the point of the original test is, but I read it as having insufficient arguments (ns not passed) or effectively a name error (a is not defined), and so its not clear why it should be changed for 3.4.

Can we shed more light on these tests via comments or docstrings?

@takluyver
Copy link
Member Author

The docstrings of the formatter classes have some more description, but should possibly be updated. In the format strings, : separates the field name from the start of the format specification, so {a[:]} was previously parsed as a field name of a[ and a format specifier of ]. Trying to evaluate a[ gave the SyntaxError. That would be the same even if a was passed. However, in 3.4b1, it seems to do bracket matching, so it parses it all as the field name.

Hopefully this means that once we rely on Python 3.4 or above, we can drop FullEvalFormatter, because EvalFormatter will behave the same way.

@ivanov
Copy link
Member

ivanov commented Jan 7, 2014

thanks for the explanation Thomas.

Hopefully this means that once we rely on Python 3.4 or above, we can drop FullEvalFormatter, because EvalFormatter will behave the same way.

Can we add that as a TODO: or XXX: note on FullEvalFormatter, so that years from now our grand-kids remember to do that ;)

@takluyver
Copy link
Member Author

Good idea, done.

@ivanov
Copy link
Member

ivanov commented Jan 7, 2014

Thanks for thinking of the posterity: let's call it "Seventh Generation Development"

@ivanov
Copy link
Member

ivanov commented Jan 7, 2014

7GD or SGD to be TLA compliant

@takluyver
Copy link
Member Author

Future release codename: "IPython: The Next Generation"?

@juliantaylor
Copy link
Contributor

concerning backport to 1.x, I'm trying to run the testsuite with 3.4b2 and there are a lot more failures. E.g. the parametric tests are all broken, the removal is backportable but there are probably still more failures than I can handle in time.
Is 3.4 support for 1.x planed to be done on your side?

@takluyver
Copy link
Member Author

I'm guessing the failures are just problems with the tests, not things that will actually break real usage? I doubt we'll bother about making all the tests pass with 1.x on Python 3.4 if doing so would take much effort, but we'd probably accept fixes for actually running 1.x on 3.4.

@takluyver
Copy link
Member Author

I'll merge this later today or tomorrow unless anyone stops me.

takluyver added a commit that referenced this pull request Jan 10, 2014
@takluyver takluyver merged commit ae1f2be into ipython:master Jan 10, 2014
@takluyver takluyver deleted the testing-py34 branch January 10, 2014 01:02
takluyver added a commit that referenced this pull request Jan 10, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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

4 participants