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

No longer warn for abstract class properties, as they are now supported #10102

merged 2 commits into from Aug 28, 2019


Copy link

@leonardder leonardder commented Aug 15, 2019

Link to issue number:


Summary of the issue:

When we introduced abstract auto (class) properties in baseObject (#8393), we introduced an exception for abstract class properties, as they aren't supported by Python 2. In Python 3, abstract class properties are supported.

Description of how this pull request fixes the issue:

When creating a magic auto property, don't check whether the method is a class method.

Testing performed:

Tested the following case:

class Test(baseObject.AutoPropertyObject):
	_abstract_test = True
	def _get_test(cls):


As expected, this raises TypeError: Can't instantiate abstract class Test with abstract methods test

Known issues with pull request:

The TypeError is raised when initializing an instance of the class. This is by design of Python itself.

Change log entry:

  • Changes for developers
    • Abstract class properties are now supported on objects that inherit from baseObject.AutoPropertyObject (e.g. NVDAObjects and TextInfos)

@leonardder leonardder requested a review from feerrenrut Aug 15, 2019
@leonardder leonardder added this to In progress in Update NVDA to Python 3 via automation Aug 15, 2019
Update NVDA to Python 3 automation moved this from In progress to Reviewer approved Aug 28, 2019
@feerrenrut feerrenrut merged commit e874975 into nvaccess:master Aug 28, 2019
1 check passed
Update NVDA to Python 3 automation moved this from Reviewer approved to Done Aug 28, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Aug 28, 2019
feerrenrut added a commit that referenced this issue Aug 28, 2019
@leonardder leonardder added the BabbageWork label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No open projects

Successfully merging this pull request may close these issues.

None yet

3 participants