Skip to content

bpo-44904: Fix classmethod property bug in doctest module #28838

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

Merged
merged 2 commits into from
Oct 28, 2021

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Oct 9, 2021

The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking @classmethod on top of
@property has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.html#class-methods.)

https://bugs.python.org/issue44904

The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.html#class-methods.)
@AlexWaygood AlexWaygood changed the title bpo 44904: Fix classmethod property bug in doctest module bpo-44904: Fix classmethod property bug in doctest module Oct 9, 2021
Lib/doctest.py Outdated
@@ -1037,7 +1037,9 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen):
if isinstance(val, staticmethod):
val = getattr(obj, valname)
if isinstance(val, classmethod):
val = getattr(obj, valname).__func__
# Lookup via __dict__ instead of getattr
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR should not go forward until issue 45356 is resolved. Wrapping classmethod around property seems to have some intrinsic flaws that shouldn't be papered over.

Also, when replacing getattr with a dict lookup, we need to consider whether the entire __mro__ should be searched.

Lastly, any "solution" to this or the help() bug should probably share a standardized solution, perhaps some variant of hasattr() that doesn't have the __getattr__ hook and that doesn't trigger descriptor behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

This all makes sense. Thanks for taking a look, anyhow!

Copy link
Member

Choose a reason for hiding this comment

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

__mro__ is not related here. We iterate the class' __dict__ and look at methods defined in the class.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Lib/doctest.py Outdated
@@ -1037,7 +1037,9 @@ def _find(self, tests, obj, name, module, source_lines, globs, seen):
if isinstance(val, staticmethod):
val = getattr(obj, valname)
if isinstance(val, classmethod):
val = getattr(obj, valname).__func__
# Lookup via __dict__ instead of getattr
Copy link
Member

Choose a reason for hiding this comment

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

__mro__ is not related here. We iterate the class' __dict__ and look at methods defined in the class.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes type-bug An unexpected behavior, bug, or error labels Oct 10, 2021
@serhiy-storchaka
Copy link
Member

@rhettinger, I am going to merge this issue. Do you still have objections?

@serhiy-storchaka
Copy link
Member

Even if we will deprecate class properties in future, the changes of this PR make the code simpler and compatible with other decorators.

@serhiy-storchaka serhiy-storchaka merged commit b1302ab into python:main Oct 28, 2021
@miss-islington
Copy link
Contributor

Thanks @AlexWaygood for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-29261 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 28, 2021
@bedevere-bot
Copy link

GH-29262 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Oct 28, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2021
…8838)

The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit b1302ab)

Co-authored-by: Alex Waygood <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 28, 2021
…8838)

The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit b1302ab)

Co-authored-by: Alex Waygood <[email protected]>
miss-islington added a commit that referenced this pull request Oct 28, 2021
The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit b1302ab)

Co-authored-by: Alex Waygood <[email protected]>
miss-islington added a commit that referenced this pull request Oct 28, 2021
The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)

Co-authored-by: Serhiy Storchaka <[email protected]>
(cherry picked from commit b1302ab)

Co-authored-by: Alex Waygood <[email protected]>
@AlexWaygood AlexWaygood deleted the fix-doctest-bug-issue-44904 branch October 28, 2021 12:36
@bedevere-bot
Copy link

bedevere-bot commented Oct 28, 2021

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Arch Linux Asan Debug 3.9 has failed when building commit 8365a5b.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/588/builds/240) and take a look at the build logs.
  4. Check if the failure is related to this commit (8365a5b) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/588/builds/240

Failed tests:

  • test_multiprocessing_fork

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 12, done.        
remote: Counting objects:  10% (1/10)        
remote: Counting objects:  20% (2/10)        
remote: Counting objects:  30% (3/10)        
remote: Counting objects:  40% (4/10)        
remote: Counting objects:  50% (5/10)        
remote: Counting objects:  60% (6/10)        
remote: Counting objects:  70% (7/10)        
remote: Counting objects:  80% (8/10)        
remote: Counting objects:  90% (9/10)        
remote: Counting objects: 100% (10/10)        
remote: Counting objects: 100% (10/10), done.        
remote: Total 12 (delta 10), reused 10 (delta 10), pack-reused 2        
From https://github.com/python/cpython
 * branch                  3.9        -> FETCH_HEAD
Note: switching to '8365a5b5abe51cbe4151d89a5d0a993273320067'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 8365a5b5ab [bpo-44904](https://bugs.python.org/issue44904): Fix classmethod property bug in doctest module (GH-28838)
Switched to and reset branch '3.9'

./Modules/signalmodule.c: In function ‘signal_siginterrupt_impl’:
./Modules/signalmodule.c:660:5: warning: ‘siginterrupt’ is deprecated: Use sigaction with SA_RESTART instead [-Wdeprecated-declarations]
  660 |     if (siginterrupt(signalnum, flag)<0) {
      |     ^~
In file included from ./Modules/signalmodule.c:28:
/usr/include/signal.h:311:12: note: declared here
  311 | extern int siginterrupt (int __sig, int __interrupt) __THROW
      |            ^~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c: In function ‘word_to_string’:
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:354:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  354 |     case 20: EXTRACT_DIGIT(s, x, 10000000000000000000ULL, dot); /* GCOV_NOT_REACHED */
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:354:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  354 |     case 20: EXTRACT_DIGIT(s, x, 10000000000000000000ULL, dot); /* GCOV_NOT_REACHED */
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:355:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  355 |     case 19: EXTRACT_DIGIT(s, x, 1000000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:355:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  355 |     case 19: EXTRACT_DIGIT(s, x, 1000000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:356:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  356 |     case 18: EXTRACT_DIGIT(s, x, 100000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:356:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  356 |     case 18: EXTRACT_DIGIT(s, x, 100000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:357:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  357 |     case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:357:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  357 |     case 17: EXTRACT_DIGIT(s, x, 10000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:358:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  358 |     case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:358:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  358 |     case 16: EXTRACT_DIGIT(s, x, 1000000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:359:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  359 |     case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:359:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  359 |     case 15: EXTRACT_DIGIT(s, x, 100000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:360:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  360 |     case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:360:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  360 |     case 14: EXTRACT_DIGIT(s, x, 10000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:361:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  361 |     case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:361:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  361 |     case 13: EXTRACT_DIGIT(s, x, 1000000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:362:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  362 |     case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:362:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  362 |     case 12: EXTRACT_DIGIT(s, x, 100000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:363:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  363 |     case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:363:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  363 |     case 11: EXTRACT_DIGIT(s, x, 10000000000ULL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:365:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  365 |     case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:365:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  365 |     case 10: EXTRACT_DIGIT(s, x, 1000000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:366:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  366 |     case 9:  EXTRACT_DIGIT(s, x, 100000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:366:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  366 |     case 9:  EXTRACT_DIGIT(s, x, 100000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:367:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  367 |     case 8:  EXTRACT_DIGIT(s, x, 10000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:367:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  367 |     case 8:  EXTRACT_DIGIT(s, x, 10000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:368:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  368 |     case 7:  EXTRACT_DIGIT(s, x, 1000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:368:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  368 |     case 7:  EXTRACT_DIGIT(s, x, 1000000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:369:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  369 |     case 6:  EXTRACT_DIGIT(s, x, 100000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:369:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  369 |     case 6:  EXTRACT_DIGIT(s, x, 100000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:370:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  370 |     case 5:  EXTRACT_DIGIT(s, x, 10000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:370:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  370 |     case 5:  EXTRACT_DIGIT(s, x, 10000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:371:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  371 |     case 4:  EXTRACT_DIGIT(s, x, 1000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:371:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  371 |     case 4:  EXTRACT_DIGIT(s, x, 1000UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:372:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  372 |     case 3:  EXTRACT_DIGIT(s, x, 100UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:372:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  372 |     case 3:  EXTRACT_DIGIT(s, x, 100UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |         ^~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:373:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  373 |     case 2:  EXTRACT_DIGIT(s, x, 10UL, dot);
      |              ^~~~~~~~~~~~~
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:348:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  348 |         if (s == dot) *s++ = '.'; *s++ = '0' + (char)(x / d); x %= d
      |                                   ^
/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Modules/_decimal/libmpdec/io.c:373:14: note: in expansion of macro ‘EXTRACT_DIGIT’
  373 |     case 2:  EXTRACT_DIGIT(s, x, 10UL, dot);
      |              ^~~~~~~~~~~~~

test_winreg skipped -- No module named 'winreg'
test_flock (__main__.FNTLEINTRTest) ... ok
test_lockf (__main__.FNTLEINTRTest) ... ok
test_read (__main__.OSEINTRTest) ... ok
test_wait (__main__.OSEINTRTest) ... ok
test_wait3 (__main__.OSEINTRTest) ... ok
test_wait4 (__main__.OSEINTRTest) ... ok
test_waitpid (__main__.OSEINTRTest) ... ok
test_write (__main__.OSEINTRTest) ... ok
test_devpoll (__main__.SelectEINTRTest) ... skipped 'need select.devpoll'
test_epoll (__main__.SelectEINTRTest) ... ok
test_kqueue (__main__.SelectEINTRTest) ... skipped 'need select.kqueue'
test_poll (__main__.SelectEINTRTest) ... ok
test_select (__main__.SelectEINTRTest) ... ok
test_sigtimedwait (__main__.SignalEINTRTest) ... ok
test_sigwaitinfo (__main__.SignalEINTRTest) ... ok
test_accept (__main__.SocketEINTRTest) ... ok
test_open (__main__.SocketEINTRTest) ... ok
test_os_open (__main__.SocketEINTRTest) ... ok
test_recv (__main__.SocketEINTRTest) ... ok
test_recvmsg (__main__.SocketEINTRTest) ... ok
test_send (__main__.SocketEINTRTest) ... ok
test_sendall (__main__.SocketEINTRTest) ... ok
test_sendmsg (__main__.SocketEINTRTest) ... ok
test_sleep (__main__.TimeEINTRTest) ... ok

----------------------------------------------------------------------
Ran 24 tests in 7.437s

OK (skipped=2)
<string>:2: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
Kill <TestWorkerProcess #1 running test=test_multiprocessing_fork pid=3292685 time=20 min> process group
test_kqueue skipped -- test works only on BSD
test_msilib skipped -- No module named '_msi'
test_winconsoleio skipped -- test only relevant on win32
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_ttk_guionly skipped -- Tk unavailable due to TclError: couldn't connect to display ":99"
test_startfile skipped -- object <module 'os' from '/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/os.py'> has no attribute 'startfile'
test_tk skipped -- Tk unavailable due to TclError: couldn't connect to display ":99"
test_devpoll skipped -- test works only on Solaris OS family
test_tix skipped -- Tk unavailable due to TclError: couldn't connect to display ":99"
test_ioctl skipped -- Unable to open /dev/tty
test_winsound skipped -- No module named 'winsound'
Timeout (0:15:00)!
Thread 0x00007f2d1dcaf5c0 (most recent call first):
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/multiprocessing/popen_fork.py", line 27 in poll
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/multiprocessing/popen_fork.py", line 43 in wait
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/multiprocessing/process.py", line 149 in join
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/_test_multiprocessing.py", line 3422 in test_boundaries
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/case.py", line 550 in _callTestMethod
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/case.py", line 592 in run
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/case.py", line 651 in __call__
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 122 in run
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 84 in __call__
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 122 in run
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 84 in __call__
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 122 in run
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/suite.py", line 84 in __call__
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/unittest/runner.py", line 176 in run
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/support/__init__.py", line 1805 in _run_suite
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/support/__init__.py", line 1929 in run_unittest
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/runtest.py", line 263 in _test_module
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/runtest.py", line 288 in _runtest_inner2
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/runtest.py", line 326 in _runtest_inner
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/runtest.py", line 217 in _runtest
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/runtest.py", line 247 in runtest
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/main.py", line 334 in rerun_failed_tests
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/main.py", line 712 in _main
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/main.py", line 655 in main
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/libregrtest/main.py", line 733 in main
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/test/__main__.py", line 2 in <module>
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/runpy.py", line 87 in _run_code
  File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/Lib/runpy.py", line 197 in _run_module_as_main
make: *** [Makefile:1240: buildbottest] Error 1

Cannot open file '/buildbot/buildarea/3.9.pablogsal-arch-x86_64.asan_debug/build/test-results.xml' for upload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants