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

LoopingCall and DeferLater no longer accept non-function callables #10235

Closed
twisted-trac opened this issue Jul 22, 2021 · 2 comments
Closed

Comments

@twisted-trac
Copy link

twisted-trac commented Jul 22, 2021

graingert's avatar @graingert reported
Trac ID trac#10235
Type release blocker: regression
Created 2021-07-22 16:28:00Z

introduced in c902ced

PR https://github.com/twisted/twisted/pull/1570/files

on Twisted-21.2.0-py3-none-any.whl:

>>> from twisted.internet import task
>>> 
>>> class Foo:
...     def __call__(self):
...         print("hello")
... 
>>> task.LoopingCall(Foo())
LoopingCall<None>(<__main__.Foo object at 0x7ff93a5d4af0>, *(), **{})
Searchable metadata
trac-id__10235 10235
type__release_blocker__regression release blocker: regression
reporter__graingert graingert
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1626971280382296 1626971280382296
changetime__1627034361879550 1627034361879550
version__None None
owner__None None

@twisted-trac
Copy link
Author

twisted-trac commented Jul 22, 2021

graingert's avatar @graingert commented

on Twisted-21.7.0rc2.tar.gz

>>> from twisted.internet import task
>>> 
>>> class Foo:
...     def __call__(self):
...         print("hello")
... 
>>> task.LoopingCall(Foo())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/graingert/.virtualenvs/tx38/lib/python3.8/site-packages/twisted/internet/task.py", line 298, in __repr__
    self.f.__qualname__,
AttributeError: 'Foo' object has no attribute '__qualname__'

@twisted-trac
Copy link
Author

twisted-trac commented Jul 23, 2021

adiroiban's avatar @adiroiban set status to closed

PR at #1637

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

1 participant