-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make unique_filename not depend on repr. (#560)
* Make unique_filename not depend on repr. For debugging purposes, when a method is created it needs to be put into a "filename". This filename was generated using `repr(attrs)` however this meant that the filename could change every time the program was loaded depending on the whims of repr. (In particular free functions and lambdas would include ids) This solves the problem by changing the name to be <attrs generated {method} {module}.{qualname}> If it should happen that the name is taken then -2 will be appended and incremented until a free filename is found. * Add tests * Fix tests and changelog
- Loading branch information
Showing
3 changed files
with
94 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
The fake filename for generated methods is now more stable. | ||
It won't change when you restart the process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters