bpo-30274: Rename 'name' to 'fullname' argument to ExtensionFileLoader. by sayanchowdhury · Pull Request #1735 · python/cpython (original) (raw)

Though I've written the test for DeprecationWarning I don't know if it's correct. Locally, my tests are failing with this error

======================================================================
FAIL: test_name_deprecation (test.test_importlib.extension.test_loader.Frozen_LoaderTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sachowdh/code/cpython/Lib/test/test_importlib/extension/test_loader.py", line 34, in test_name_deprecation
    other = self.machinery.ExtensionFileLoader(
AssertionError: DeprecationWarning not triggered

----------------------------------------------------------------------

I tried to import ExtensionFileLoader in Python shell and it does not reflect the updated arguments i.e. fullname. How can I fix it?

➜  cpython git:(bpo30274) ✗ ./python                                                     
Python 3.8.0a0 (heads/bpo30274-dirty:8e5ac1790b, Oct 14 2018, 19:03:35) 
[GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.machinery import ExtensionFileLoader
>>> help(ExtensionFileLoader)
class ExtensionFileLoader(FileLoader, _LoaderBasics)
 |  ExtensionFileLoader(name, path)