Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update table and add information about staggered migrations#22

Merged
chrysle merged 12 commits into
pypa:masterfrom
abravalheri:master
Feb 5, 2024
Merged

Update table and add information about staggered migrations#22
chrysle merged 12 commits into
pypa:masterfrom
abravalheri:master

Conversation

@abravalheri

@abravalheri abravalheri commented Mar 15, 2023

Copy link
Copy Markdown
Contributor

After setuptools added deprecation warnings for pkg_resources.declare_namespace there has been a lot of doubt in the community about how to migrate away from it, and concerns about carrying out this migration in large projects (see pypa/setuptools#3434).

The objective of this PR is to shed some light on the problem and help to answer the question "what happens if not all the packages sharing a namespace migrate at the same time?".

I took the opportunity to "modernize" the nox matrix, removing the deprecated installation method (using python setup.py ...) and adding some newer Python versions1.

Please note that I did not add all active versions of Python to the matrix on purpose, because that would take too much time in my machine. So I am intentionally stepping away from this objective (if any one is interested in adding the missing Python version that would be a nice next step)2.

Footnotes

  1. The motivation for this is twofold: we are a few moths away from the EoL of Python 3.7 and leaving Python 2.7 and python setup.py ... in the table would be distracting.

  2. Another equally nice improvement would be using CI, but I am also intentionally removing this from the scope of this PR.

@chrysle

chrysle commented Sep 21, 2023

Copy link
Copy Markdown
Contributor

Thanks for the work! But is it now staggered or staged migrations? If it's not of importance, I'd prefer the latter.

@abravalheri

Copy link
Copy Markdown
Contributor Author

Hi @chrysle, I am not a native speaker, so I am just replicating the words that were proposed by Jason in pypa/setuptools#3434.

@chrysle

chrysle commented Sep 21, 2023

Copy link
Copy Markdown
Contributor

Me neither ;-)

Referring to that, the term staged migration came up in zopefoundation/meta#194 (comment). Since that sounds much more "planned", could you update the PR to it?

Moreover, I think Python 3.7 could be dropped now.

@chrysle

chrysle commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

@abravalheri Please let me know what concerns you have concerning the naming.

@pradyunsg pradyunsg changed the title Update table and add information about staggered migrations. Update table and add information about staggered migrations Nov 21, 2023
@abravalheri

Copy link
Copy Markdown
Contributor Author

Hi @chrysle sorry I let this one slip...

No I am fine with whichever words people think will make it clearer.
(If any native speaker would like to chip in, that would also be great :P)

@chrysle

chrysle commented Nov 26, 2023

Copy link
Copy Markdown
Contributor

Well, so I asked OALD, and to stagger seems to be a valid transitive (although that wasn't known to me), and the meaning of to stage I meant (of which I know it's possible) isn't even mentioned on the corresponding page....

So let's take the former ;) Could you rebase?

@abravalheri

Copy link
Copy Markdown
Contributor Author

Hi @chrysle, I solved the merge conflicts and also took the opportunity to ensure all tests were using build-isolation and backend APIs (aka PEP 517+PEP 660) - by adding pyproject.toml everywhere.

Hopefully the CI will pass 🤞

@abravalheri

Copy link
Copy Markdown
Contributor Author

Hopefully the CI will pass 🤞

Oh well, too soon.
I think that the CI might be failing in some rows of the column, e.g.:

nox > * session_cross_pkg_resources_pkgutil-3.8(command_b=('pip', 'install', '.'), command_a=('pip', 'install', '-e', '.')): failed

That is kind of expected isn't? Some combinations will fail indeed.
Not sure why the CI is expecting everything to pass...

@chrysle

chrysle commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

Thank you!

That is kind of expected isn't? Some combinations will fail indeed. Not sure why the CI is expecting everything to pass...

I actually made the CI pass in #24 (could you have a look at that?). I don't think there will be any more merge conflicts when that is merged. And @pradyunsg enabled that passing checks are required.

Comment thread noxfile.py Outdated
@abravalheri

Copy link
Copy Markdown
Contributor Author

I think #24 is going to be a big conflict with this one, isn't it?

The original idea behind running nox right now is to generate an informative table that will include situations where combining thing will pass and other where it will not pass... Making all the sessions in nox pass kind of defeat this purpose isn't it?

@chrysle

chrysle commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

Sorry if I screwed this up, I didn't find any documentation here that would explain this purpose. On the other hand, if you are able to run all scenarios correctly, isn't that more helpful to you?

@abravalheri

abravalheri commented Nov 27, 2023

Copy link
Copy Markdown
Contributor Author

Oh no, I didn't mean you screw things up, sorry if I miscommunicated that.

I think that adding more scenarios is good. But we should not remove scenarios that don't work (showing that they don't work is kind of the point).
The assumption that CI should have all the nox sessions passing is not something that this repository was originally designed for.

@chrysle chrysle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Should we migrate all the examples to pyproject.toml later on (probably keeping setup.pys as samples)?

Comment thread report_to_table.py Outdated
Comment thread README.md Outdated
@chrysle

chrysle commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

@abravalheri Gentle nudge to this, sorry for approving too early.

@abravalheri

Copy link
Copy Markdown
Contributor Author

Hi @chrysle, sorry for the delay. I am away from my computer this December and less responsive than usual. I will be able to have a look as soon as I come back in January. But I think it might make sense to separate into 2 PRs.

@chrysle

chrysle commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

No problem, take your time and enjoy your holiday!

But I think it might make sense to separate into 2 PRs.

That's my suggestion too.

Comment thread README.md Outdated
Comment thread README.md Outdated
@abravalheri

Copy link
Copy Markdown
Contributor Author

I rebased the PR and updated the table with the latest output of nox.

@chrysle chrysle merged commit d6a93a1 into pypa:master Feb 5, 2024
@chrysle

chrysle commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

Thanks a lot!

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.

3 participants