Whole file

takluyver/entrypoints

The author described this change as Fix loading entry points with only module part. It counts as a record because the check below fails on the code as it stood at e4458d247 and passes on a904a0d2e, with nothing else changed between the two runs.

Fix saved2016-03-29
Sharing licenceMIT · LICENSE
Change size+3 3

What the code was meant to do, written into the code itself as a save note

Fix loading entry points with only module part

The change

6363 def load(self):
6464 """Load the object to which this entry point refers.
6565 """
66- obj_name_parts = self.object_name.split('.')
6766 mod = import_module(self.module_name)
6867 obj = mod
69- for attr in obj_name_parts:
70- obj = getattr(obj, attr)
68+ if self.object_name:
69+ for attr in self.object_name.split('.'):
70+ obj = getattr(obj, attr)
7171 return obj
7272
7373 @classmethod

The check that tells the two apart

failpass·tests/test_entrypoints.py::test_load

Check file tests/test_entrypoints.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite4458d247d72caafd16faf9d1164dd111ffaffef
Broken version dated2015-05-15
Moduleentrypoints
Units changedEntryPoint
Fingerprint505bf7377296196e
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.