HakanIST added a comment.

  I looked into this. Found 7 scripts using `generator` as `@property`. Two of 
them (`nowcommons.py`, `parser_function_count.py`) return an iterable rather 
than yielding, so they'd hit the `AttributeError` on wrapping. The rest use 
`yield`, so they pass the `isinstance(Generator)` check but `close()` would act 
on a fresh instance.
  
  From your suggestions, I think a combination of warning when a property is 
detected and documenting the contract would be a good start. I'd be happy to 
work on a patch if you're open to it.

TASK DETAIL
  https://phabricator.wikimedia.org/T423816

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to