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

Fix doctesting with Python 3.13 #39147

Merged
merged 3 commits into from
Jan 18, 2025

Conversation

antonio-rojas
Copy link
Contributor

Adapt to upstream changes in doctest [1]:

  • _name2ft was renamed to _stats
  • it now records the number of skipped tests

[1] python/cpython@4f9b706

Copy link

github-actions bot commented Dec 16, 2024

Documentation preview for this PR (built with commit 15b14ca; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@@ -931,7 +936,7 @@ def summarize(self, verbose=None):
sage: from sage.doctest.control import DocTestDefaults; DD = DocTestDefaults()
sage: import doctest, sys, os
sage: DTR = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
sage: DTR._name2ft['sage.doctest.forker'] = (1,120)
sage: DTR._stats['sage.doctest.forker'] = (1,120)
Copy link
Contributor

@tornaria tornaria Dec 20, 2024

Choose a reason for hiding this comment

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

Suggested change
sage: DTR._stats['sage.doctest.forker'] = (1,120)
sage: DTR._stats['sage.doctest.forker'] = (1,120,0)

It seems the difference between _name2ft and _stats is the former is pairs but the latter is triples.

Copy link
Contributor

@user202729 user202729 Dec 20, 2024

Choose a reason for hiding this comment

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

Yes, that's the point.

I think the doctest can be left as is because it's just mocking the result here… otherwise you'll need to do a version check.

I suggest adding an explanation why you're doing that here, so people coming across this in the future won't need to git blame the code.

Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 7, 2025
sagemathgh-39147: Fix doctesting with Python 3.13
    
Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706c6f5d4422a398146bfd0
11daedaef1851
    
URL: sagemath#39147
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Gonzalo Tornaría, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 7, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 9, 2025
sagemathgh-39147: Fix doctesting with Python 3.13
    
Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706c6f5d4422a398146bfd0
11daedaef1851
    
URL: sagemath#39147
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Gonzalo Tornaría, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 9, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 10, 2025
sagemathgh-39147: Fix doctesting with Python 3.13
    
Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706c6f5d4422a398146bfd0
11daedaef1851
    
URL: sagemath#39147
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Gonzalo Tornaría, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 10, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 12, 2025
sagemathgh-39147: Fix doctesting with Python 3.13
    
Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706c6f5d4422a398146bfd0
11daedaef1851
    
URL: sagemath#39147
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Gonzalo Tornaría, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 12, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 16, 2025
sagemathgh-39147: Fix doctesting with Python 3.13
    
Adapt to upstream changes in doctest [1]:

- _name2ft was renamed to _stats
- it now records the number of skipped tests

[1] python/cpython@4f9b706c6f5d4422a398146bfd0
11daedaef1851
    
URL: sagemath#39147
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Gonzalo Tornaría, user202729
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 16, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 17, 2025
sagemathgh-39188: Declare Python 3.13 as supported in sagelib
    
### ⌛ Dependencies
- sagemath#39145
- sagemath#39147
- sagemath#39182
- sagemath#39184
- sagemath#39185
- sagemath#39187
- sagemath#39201
    
URL: sagemath#39188
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
@vbraun vbraun merged commit 55137dc into sagemath:develop Jan 18, 2025
24 of 25 checks passed
@antonio-rojas antonio-rojas deleted the python-3.13-doctest branch January 18, 2025 11:45
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.

4 participants