Skip to content

Drop Python 2.7-3.6 support#304

Closed
arquolo wants to merge 48 commits intojoblib:masterfrom
arquolo:master
Closed

Drop Python 2.7-3.6 support#304
arquolo wants to merge 48 commits intojoblib:masterfrom
arquolo:master

Conversation

@arquolo
Copy link
Contributor

@arquolo arquolo commented Oct 21, 2021

Duplicate for this as there's no activity for 1.5 years

@arquolo arquolo force-pushed the master branch 11 times, most recently from 63bfce8 to 929d599 Compare October 21, 2021 20:24
@arquolo arquolo force-pushed the master branch 3 times, most recently from 938bc4c to 093515c Compare October 22, 2021 16:04
@ogrisel
Copy link
Contributor

ogrisel commented Oct 22, 2021

Thanks for working on this @arquolo. Feel free to simplify the tox.ini and Azure Pipelines config accordingly.

@arquolo
Copy link
Contributor Author

arquolo commented Oct 22, 2021

I've already done it locally.
Just catched a strange bug on macos, so I try to identify which commit leads to that.

Is that normal that linux-pypy3 job is 6 times slower than others?

@ogrisel
Copy link
Contributor

ogrisel commented Oct 22, 2021

Is that normal that linux-pypy3 job is 6 times slower than others?

That's kind of expected since our test suite keeps spawing new subprocesses and the PyPy process start overhead is significantly larger than CPython's.

@ogrisel
Copy link
Contributor

ogrisel commented Oct 22, 2021

Just catched a strange bug on macos, so I try to indentify which commit leads to that.

Feel free to open a dedicated PR for this.

@arquolo
Copy link
Contributor Author

arquolo commented Oct 22, 2021

That's strange, linux-pypy3 failed, given that all f153b15 commit has changed is adding/removing of some newlines.
Maybe there was some import order dependency.

@arquolo arquolo force-pushed the master branch 6 times, most recently from f792261 to d3fe090 Compare October 23, 2021 10:33
Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

There are still a few version-related cleanups from this PR that we would like to pickup.

However there are also unrelated changes that are better reviewed and documented as independent PRs (see below for details).

I also don't understand why the deletion of loky/backend/managers.py and other files still show-up here despite the merge of master in this branch. Those files have already been deleted from master. Maybe a new merge is necessary?

register(type(_C().f), _reduce_method)
register(type(_C.h), _reduce_method)
dispatch_table[type(_C().f)] = _reduce_method
dispatch_table[type(_C.h)] = _reduce_method
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer to keep the register public API to keep a the public API of this module compatible with the API of the reduction module of multiprocessing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe then modify register to allow use as decorator?

Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

I like most of the code style simplifications in this PR to make the code base more Python-3 idiomatic, in particular, w.r.t. all that is related to bytes to str decoding. However there are still unrelated changes that deserve their own separate PR (in particular the packaging dependency).

max_nfds = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
open_fds = {fd for fd in range(3, max_nfds)}
open_fds.add(0)
open_fds = {*range(max_nfds)}
Copy link
Contributor

@ogrisel ogrisel Feb 8, 2022

Choose a reason for hiding this comment

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

Note to other reviewers: 1 and 2 are part of keep_fds so will never be closed by the subsequent lines. Hence this code simplification should be harmless.

python_requires='>=3.7',
install_requires=['cloudpickle'],
tests_require=['pytest', 'psutil'],
tests_require=['packaging', 'pytest', 'psutil'],
Copy link
Contributor

@ogrisel ogrisel Feb 8, 2022

Choose a reason for hiding this comment

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

Adding a new dependency deserves a dedicated PR with its own changelog entry.

This will make it harder to vendor loky inside joblib. But maybe we should stop vendoring, or add the packaging dependency to joblib as well, but this discussion should happen outside of this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually it's just for the tests, so this is fine.

@glemaitre
Copy link
Contributor

I isolated the str decoding thingy here: #347

@ogrisel ogrisel mentioned this pull request Feb 16, 2022
@ogrisel
Copy link
Contributor

ogrisel commented Feb 22, 2022

All the changes we wanted to merge have been merged in sub-PR. The remaining change changes the public API of the reduction module too much and we intentionally wanted to keep it close to the original multiprocessing module.

Note that once we drop support for Python 3.8 we will probably to clean up more backport code from the loky.backend sub-package.

@ogrisel ogrisel closed this Feb 22, 2022
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.

7 participants