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

DelayedCall.__str__ assumes that things with __name__s always have func_names #9061

Closed
twisted-trac opened this issue Feb 27, 2017 · 1 comment

Comments

@twisted-trac
Copy link

Julian's avatar @Julian reported
Trac ID trac#9061
Type defect
Created 2017-02-27 16:06:26Z

(They do not, they can be classes or other fun things).

See e.g.:

from twisted.internet import reactor
from twisted.trial.unittest import TestCase
class TestTest(TestCase):
    def test_it_blows_up(self):
        reactor.callLater(10, int)

elif hasattr(self.func, '__name__'):
func = self.func.func_name

The comment there possibly means that this should just be done "properly" via #6066 rather than fixing this specific issue.

Searchable metadata
trac-id__9061 9061
type__defect defect
reporter__Julian Julian
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__None None
time__1488211586271757 1488211586271757
changetime__1488211586271757 1488211586271757
version__None None
owner__None None

@exarkun
Copy link
Member

exarkun commented Aug 18, 2022

It looks like this was introduced in 09c9169 for #6065. Then it was fixed (maybe not "properly") in fadb582 as part of #1570 for #10155.

#6066 remains valid because the logic is just inline in DelayedCall.__repr__.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants