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

TestDogStatsd.test_timed_coroutine fails on Python 3.13 #880

Open
mweinelt opened this issue Jan 4, 2025 · 2 comments
Open

TestDogStatsd.test_timed_coroutine fails on Python 3.13 #880

mweinelt opened this issue Jan 4, 2025 · 2 comments
Labels
kind/bug Bug related issue stale Stale - Bot reminder

Comments

@mweinelt
Copy link

mweinelt commented Jan 4, 2025

Describe the bug
On Python 3.13 the test TestDogStatsd.test_timed_coroutine started failing.

Please start testing on anything newer than the EOL 3.7!

To Reproduce
Steps to reproduce the behavior:

  1. Run the testsuite on Python 3.13

Expected behavior
Tests should probably work on stable Python version.

Screenshots

______________________ TestDogStatsd.test_timed_coroutine ______________________

self = <tests.unit.dogstatsd.test_statsd.TestDogStatsd testMethod=test_timed_coroutine>

        @unittest.skipIf(not is_higher_py35(), reason="Coroutines are supported on Python 3.5 or higher.")
        def test_timed_coroutine(self):
            """
            Measure the distribution of a coroutine function's run time.
    
            Warning: Python > 3.5 only.
            """
            import asyncio
    
            source = """
    @self.statsd.timed('timed.test')
    async def print_foo():
        "docstring"
        import time
        time.sleep(0.5)
        print("foo")
            """
            exec(source, {}, locals())
    
            loop = asyncio.get_event_loop()
>           loop.run_until_complete(locals()['print_foo']())
E           KeyError: 'print_foo'

tests/unit/dogstatsd/test_statsd.py:940: KeyError

Environment and Versions (please complete the following information):
Python 3.13.1
datadog 0.50.2

Additional context
n/a

@mweinelt mweinelt added the kind/bug Bug related issue label Jan 4, 2025
Copy link

github-actions bot commented Feb 3, 2025

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.

@github-actions github-actions bot added the stale Stale - Bot reminder label Feb 3, 2025
@mweinelt
Copy link
Author

mweinelt commented Feb 3, 2025

Not stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug related issue stale Stale - Bot reminder
Projects
None yet
Development

No branches or pull requests

1 participant