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

Conditionally disable the pytest distribution package test #146

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

diazona
Copy link
Owner

@diazona diazona commented Dec 27, 2023

When running tests under Python 3.12 with setuptools_scm==3.4.1, we run into a problem where a call to setuptools.setup() tries to load a newer version of setuptools_scm, and that conflicts with the older version that is already in sys.modules. I haven't fully figured out the details, but the gist is that setuptools attempts to read and install the entry point specifications from the newer version of setuptools_scm while using the older version's code, and there is one particular entry point whose value refers to the setuptools_scm._integration module which doesn't exist in the older version's code. This winds up breaking every test that runs after the older version of setuptools_scm gets loaded.

We have various options for fixing this, but I don't want to hold up the release any longer while figuring out what the best way to do it is. (I'm guessing that the best approach is just to use virtual environments for distribution package tests, but I want to explore the options.) So I'm disabling the distribution package test which triggers this error when using Python>=3.12 and setuptools_scm<6. We can implement a proper fix later.


Note that I omitted a changelog fragment because I don't really want to have to regenerate the changelog just for this, and anyway this PR doesn't fix the issue, it just postpones dealing with the problem.

Related to #145 (but does not close it)

@diazona diazona added this to the v0.2 milestone Dec 27, 2023
When running tests under Python 3.12 with setuptools_scm==3.4.1, we run
into a problem where a call to setuptools.setup() tries to load a newer
version of setuptools_scm, and that conflicts with the older version
that is already in sys.modules. I haven't fully figured out the details,
but the gist is that setuptools attempts to read and install the entry
point specifications from the newer version of setuptools_scm while
using the older version's code, and there is one particular entry point
whose value refers to the setuptools_scm._integration module which
doesn't exist in the older version's code. This winds up breaking every
test that runs after the older version of setuptools_scm gets loaded.

We have various options for fixing this, but I don't want to hold up
the release any longer while figuring out what the best way to do it is.
(I'm guessing that the best approach is just to use virtual environments
for distribution package tests, but I want to explore the options.) So
I'm disabling the distribution package test which triggers this error
when using Python>=3.12 and setuptools_scm<6. We can implement a proper
fix later.
@diazona diazona force-pushed the disable-pytest-distribution-package-test-py312/1/dev branch from b841af4 to c4bfd8d Compare December 27, 2023 09:10
@diazona diazona requested a review from sjlongland December 27, 2023 09:14
@diazona diazona enabled auto-merge December 27, 2023 09:14
@diazona
Copy link
Owner Author

diazona commented Dec 27, 2023

I guess we won't really know if this solves the problem until we try making a release again, which is something to fix for the future, but for now probably best to just go ahead with it. I did run the tests locally and this seems to work, and I'll try making a release candidate before the real release to make sure it works.

Copy link
Collaborator

@sjlongland sjlongland left a comment

Choose a reason for hiding this comment

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

Yep, if it's going to be problematic, let's disable it for now. :-)

@diazona diazona merged commit 44807ad into main Dec 28, 2023
11 checks passed
@diazona diazona deleted the disable-pytest-distribution-package-test-py312/1/dev branch December 28, 2023 07:17
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.

2 participants