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

Tests: Adapt expected traceback regexes for Python 3.11.0a1 #1527

Merged
merged 1 commit into from Nov 5, 2021

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Nov 4, 2021

Fixes #1526

Before:

  File ".../broken.html", line 2, in <module>
    {{ fail() }}
  File ".../test_debug.py", line 32, in <lambda>
    tmpl.render(fail=lambda: 1 / 0)
ZeroDivisionError: division by zero

After:

  File ".../broken.html", line 2, in <module>
    {{ fail() }}
    ^^^^^^^^^^^^
  File ".../test_debug.py", line 32, in <lambda>
    tmpl.render(fail=lambda: 1 / 0)
                             ~~^~~
ZeroDivisionError: division by zero
  • fixes #

Checklist:

  • Add tests that demonstrate the correct behavior of the change this is in tests
  • Add or update relevant docs, in the docs folder and in code this is in tests and too early to declare Python 3.11 support in docs
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue added but then removed per review
  • Add .. versionchanged:: entries in any relevant code docs this is in tests
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

@hroncok hroncok force-pushed the py3.11-tracebacks branch 2 times, most recently from 36dc0bc to 7cb34db Compare November 4, 2021 17:08
@hroncok hroncok marked this pull request as ready for review November 4, 2021 17:09
CHANGES.rst Outdated Show resolved Hide resolved
@hroncok hroncok changed the title tests: Adapt expected traceback regexes for Python 3.11.0a1 Tests: Adapt expected traceback regexes for Python 3.11.0a1 Nov 4, 2021
@davidism
Copy link
Member

davidism commented Nov 4, 2021

Can you rebase this to 3.0.x branch?

@hroncok
Copy link
Contributor Author

hroncok commented Nov 4, 2021

Can you rebase this to 3.0.x branch?

In a separate PR or here?

@davidism
Copy link
Member

davidism commented Nov 4, 2021

Here, change the target of the PR by clicking "edit" next to the title, then do:

git rebase --onto origin/3.0.x origin/main
git push -f

@hroncok hroncok closed this Nov 4, 2021
@hroncok hroncok reopened this Nov 4, 2021
@hroncok hroncok changed the base branch from main to 3.0.x November 4, 2021 17:45
@hroncok
Copy link
Contributor Author

hroncok commented Nov 4, 2021

It made all the previously succeeded CI jobs fail with GitHub Actions has encountered an internal error when running your job.

@ThiefMaster
Copy link
Member

Looks like some problem on GitHub's side. I restarted the CI run and it's fine now. But I think we need to update our CI config to test against 3.10 and 3.11 as well...

@hroncok
Copy link
Contributor Author

hroncok commented Nov 5, 2021

But I think we need to update our CI config to test against 3.10 and 3.11 as well...

Pushed to see if it works.

@hroncok hroncok force-pushed the py3.11-tracebacks branch 2 times, most recently from b691e64 to ad66b79 Compare November 5, 2021 11:31
@hroncok
Copy link
Contributor Author

hroncok commented Nov 5, 2021

It works 🎉

@davidism davidism mentioned this pull request Nov 5, 2021
Fixes pallets#1526

Before:

      File ".../broken.html", line 2, in <module>
        {{ fail() }}
      File ".../test_debug.py", line 32, in <lambda>
        tmpl.render(fail=lambda: 1 / 0)
    ZeroDivisionError: division by zero

After:

      File ".../broken.html", line 2, in <module>
        {{ fail() }}
        ^^^^^^^^^^^^
      File ".../test_debug.py", line 32, in <lambda>
        tmpl.render(fail=lambda: 1 / 0)
                                 ~~^~~
    ZeroDivisionError: division by zero
@davidism davidism merged commit a83aded into pallets:3.0.x Nov 5, 2021
@hroncok hroncok deleted the py3.11-tracebacks branch November 5, 2021 14:26
@hroncok
Copy link
Contributor Author

hroncok commented Nov 5, 2021

@davidism Thanks for merging and adapting the CI as well 🍷

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.11 traceback format changed, tests fail
3 participants