Skip to content

Conversation

@Liam-DeVoe
Copy link
Contributor

No description provided.

@Liam-DeVoe Liam-DeVoe force-pushed the drop-py39 branch 2 times, most recently from a47bf6e to ba6acab Compare October 3, 2025 21:37
@Liam-DeVoe
Copy link
Contributor Author

Since I bumped black in the tests to a version which supports 3.14, the following test case:

@pytest.mark.parametrize(
    "source_code,exception",
    [
        ("this isn't valid Python", ShedSyntaxWarning),
        # We request a bug report for valid unhandled syntax, i.e. (upstream) bugs
        ("class A:\\\r# type: ignore\n pass\n", ShedSyntaxWarning),
    ],
)
@pytest.mark.parametrize("refactor", [True, False])
def test_error_on_invalid_syntax(source_code, exception, refactor):
    with pytest.raises(exception):
        assert shed(source_code=source_code, refactor=refactor)

now parses fine in parsed = lib2to3_parse(source_code.lstrip(), target_versions) where it previously used to error and hit the The syntax is valid for Python ... case. Not sure what to do - should I remove the test case and mark that branch as nocover? I don't think we can have a reliable covering test for a branch which requires an upstream bug, bug maybe I am misinterpreting

@Zac-HD
Copy link
Owner

Zac-HD commented Oct 15, 2025

Not sure what to do - should I remove the test case and mark that branch as nocover? I don't think we can have a reliable covering test for a branch which requires an upstream bug, bug maybe I am misinterpreting

seems like a reasonable response to me; my only hesitation is that ci is failing here with a similar-looking string -> tokenization error.

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