Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

This seems to be an issue with typing than mock since mock just uses the output 
from dir() . I am not able to bisect the relevant change but below is the 
output of dir(Foo[int]) in Python 3.6 and master.

Python 3.6.9

['__abstractmethods__', '__args__', '__class__', '__delattr__', '__dict__', 
'__dir__', '__doc__', '__eq__', '__extra__', '__format__', '__ge__', 
'__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', 
'__le__', '__lt__', '__module__', '__ne__', '__new__', '__next_in_mro__', 
'__orig_bases__', '__origin__', '__parameters__', '__reduce__', 
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', 
'__str__', '__subclasshook__', '__tree_hash__', '__weakref__', '_abc_cache', 
'_abc_generic_negative_cache', '_abc_generic_negative_cache_version', 
'_abc_registry', '_gorg', 'bar']


master branch : 

['__args__', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', 
'__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', 
'__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', 
'__instancecheck__', '__le__', '__lt__', '__module__', '__mro_entries__', 
'__ne__', '__new__', '__or__', '__origin__', '__parameters__', '__reduce__', 
'__reduce_ex__', '__repr__', '__ror__', '__setattr__', '__sizeof__', 
'__slots__', '__str__', '__subclasscheck__', '__subclasshook__', '__weakref__', 
'_inst', '_name', '_paramspec_tvars', '_typevar_types', 'copy_with']

----------
nosy: +gvanrossum, kj
title: Mock spec with a specialized generic class does not mock class 
attributes -> Specialized generic class does not return class attributes in dir

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45755>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to