Skip to content

Conversation

@frenzymadness
Copy link
Contributor

Fixes #13079

Let's see whether it fixes all the problems or not.

@frenzymadness
Copy link
Contributor Author

CI is green but I've realized that we don't have Py 3.10 in CI yet so I'm gonna run the tests with the release candidate locally.

@frenzymadness
Copy link
Contributor Author

I'm afraid that there is more than one test failing and it seems that the other failures have something to do with jedi which is not compatible with Python 3.10 yet. Will have to investigate it more.

@frenzymadness frenzymadness changed the title Inspect module now returns OSError for objects without source files Python 3.10 compatibility Aug 5, 2021
@frenzymadness
Copy link
Contributor Author

This PR now solves all problems with Python 3.10 I know about. All tests are passing in my local environment with Python 3.10rc1. Also, the full compatibility depends on the similar fix for jedi: davidhalter/jedi#1795

@bollwyvl
Copy link
Contributor

bollwyvl commented Aug 5, 2021

Thank you so much, @frenzymadness ! Can you also add a 3.10.0rc1 excursion to CI? It appears these are now available.

@frenzymadness
Copy link
Contributor Author

It seems that the nose is not compatible with Python 3.10. and it's abandoned for quite some time so I don't expect anything. Is there any plan to drop it? We might run pytest first and then iptest/nose. Also, the tests will fail until jedi is fixed.

@Carreau
Copy link
Member

Carreau commented Aug 18, 2021

It seems that the nose is not compatible with Python 3.10. and it's abandoned for quite some time so I don't expect anything. Is there any plan to drop it?

Yes, I'm currently trying to get some funding from NF to hire someone to do the bulk of the work.

Some modification to ipykernel will be needed too as it import things from IPython that rely on nose.

@frenzymadness
Copy link
Contributor Author

Some modification to ipykernel will be needed too as it import things from IPython that rely on nose.

I might be able to help with that effort. Could you please tell me more? The ultimate goal is to get rid of the nose entirely and port all the tests to pytest, correct? What is nose used for in runtime?

@Carreau
Copy link
Member

Carreau commented Aug 19, 2021

Most of nose use-case are nt.assert_equal, nt.assert_in and similar, there are bout 900 of those in the codebase:

$ rg -tpy ' nt\.assert_' | wc -l
     926

That's the easy part, there are a bunch of utils, like @skipif(....), that are relatively straightforward to migrate to pytest,
and finally there is all the mess that is in IPython/testing/iptest.py and IPython/testing/ in general that run some IPython specific code (as IPython is itself an interpreter there are some hacks to do).

It's likely portable to pytest, but need some time to actually focus on that.

Good news is the test suite is old (20 years or so), and therefore I think that many of the test are not useful anymore, so if some tests can't be ported and need to be removed, it's ok. Also most of the functionality in iptest can be nuked as it pre-date having CI and was dealing with parallelizing the test and stuff like that.

I'll open a more specific issue and list all the tasks that need to be done for removing nose a a dependency.

@Kojoley Kojoley mentioned this pull request Nov 15, 2021
@Kojoley
Copy link
Collaborator

Kojoley commented Nov 16, 2021

Thanks for the PR, I incorporated your work in #13282 which got merged.

@Kojoley Kojoley closed this Nov 16, 2021
@Carreau Carreau added this to the no action milestone Nov 26, 2021
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.

Breaking change in Python 3.10rc1

4 participants