Skip to content

bpo-44734: Fix floating point precision in test_turtle #30910

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 1 commit into from
Jan 27, 2022

Conversation

befeleme
Copy link
Contributor

@befeleme befeleme commented Jan 26, 2022

Hello,
for context, we ran across the problematic test in Fedora, when older Pythons stopped building on 32-bit because of the strict assert. The patch made it build again. We haven't spotted the failure from Python 3.7 above.

The test failure is known: here and here. The changes in the turtle module code prevent the test from failing but it was pointed out that still the test is unnecessarily strict and it's better to have it relaxed.
The referred issue was already fixed for one of the two problematic asserts.

https://bugs.python.org/issue44734

@bedevere-bot bedevere-bot added the tests Tests in the Lib/test dir label Jan 26, 2022
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@befeleme

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 27, 2022
(cherry picked from commit aa78287)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 27, 2022
(cherry picked from commit aa78287)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed needs backport to 3.10 only security fixes needs backport to 3.9 only security fixes labels Jan 27, 2022
@bedevere-bot
Copy link

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

@bedevere-bot
Copy link

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

Hi! The buildbot ARM64 macOS 3.x has failed when building commit aa78287.

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/725/builds/875) and take a look at the build logs.
  4. Check if the failure is related to this commit (aa78287) 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/725/builds/875

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

== Tests result: ENV CHANGED ==

411 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 42 sec
  • test_multiprocessing_spawn: 2 min 26 sec
  • test_multiprocessing_forkserver: 1 min 46 sec
  • test_unparse: 1 min 21 sec
  • test_asyncio: 1 min 16 sec
  • test_tokenize: 1 min 13 sec
  • test_logging: 1 min 3 sec
  • test_lib2to3: 59.9 sec
  • test_capi: 50.8 sec
  • test_unicodedata: 46.8 sec

1 test altered the execution environment:
test_ftplib

17 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_gdb test_ioctl
test_msilib test_multiprocessing_fork test_ossaudiodev test_spwd
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

Total duration: 9 min 8 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/threading.py", line 1031, in _bootstrap_inner
    self.run()
    ^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ftplib.py", line 298, in run
    asyncore.loop(timeout=0.1, count=1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncore.py", line 214, in loop
    poll_fun(timeout, map)
    ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncore.py", line 157, in poll
    read(obj)
    ^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncore.py", line 94, in read
    obj.handle_error()
    ^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ftplib.py", line 421, in handle_error
    raise Exception
    ^^^^^^^^^^^^^^^
Exception
k


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_95befa41'


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/asyncore.py", line 90, in read
    obj.handle_read_event()
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ftplib.py", line 384, in handle_read_event
    self._do_ssl_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_ftplib.py", line 345, in _do_ssl_handshake
    self.socket.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/ssl.py", line 1345, in do_handshake
    self._sslobj.do_handshake()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:998)


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.pablogsal-macos-m1.macos-with-brew/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_e1e0a92c'

@befeleme befeleme deleted the patch-test-turtle branch January 27, 2022 14:18
miss-islington added a commit that referenced this pull request Jan 27, 2022
(cherry picked from commit aa78287)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Jan 27, 2022
(cherry picked from commit aa78287)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
@encukou
Copy link
Member

encukou commented Jan 27, 2022

The buildbot failure in test_ftplib definitely looks unrelated. The next build (also of the main branch) succeeded.

test_ftplib seems a bit flaky on this buildbot: https://buildbot.python.org/all/#/builders/725

hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
(cherry picked from commit aa78287)

Co-authored-by: Karolina Surma <33810531+befeleme@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants