-
Notifications
You must be signed in to change notification settings - Fork 118
Pin Faker to Prevent Asteroid Crash and Fix CI #300
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
Conversation
There's some sort of issue with version 5.0.2 of Faker which updates a lot of code to use the pathlib library instead of os utils. This causes the sys.path_importer_cache to get filled with PosixPath objects instead of strings as it's keys, which causes an asteroid crash. For now, we can just pin Faker to a version that still works until the upstream issue is resolved.
Pull Request Test Coverage Report for Build 1334
💛 - Coveralls |
It's be EOL'd since Sept 2020, so time to ditch it.
I'm not immediately finding Faker as a dependency in astroid code base. If you can share some pointers files/methods you looked at that would be helpful.
Seems to me this isn't reported upstream so I want to gather as much info as possible before looking more into it. |
Sure. Asteroid doesn't depend on Faker, but due to some global import state it causes this issue. If you check out this build log from the first time the travis builds failed, you'll see the actual error is: AttributeError: 'PosixPath' object has no attribute 'rstrip' The first Here's the surrounding relevant code: def _search_zip(modpath, pic):
for filepath, importer in list(pic.items()):
if importer is not None:
found = importer.find_module(modpath[0]) If you look further up the stack, you'll find that
I'm not exactly sure how/why, but somehow Faker v5.0.2+ is adding entries to Hopefully that can provide a little more color. Let me know if any of that is unclear. |
…dency of factoryboy (see also #300)
…dency of factoryboy (see also #300)
There's some sort of issue with version 5.0.2 of Faker which updates a
lot of code to use the pathlib library instead of os utils. This causes
the sys.path_importer_cache to get filled with PosixPath objects instead
of strings as it's keys, which causes an asteroid crash.
For now, we can just pin Faker to a version that still works until the
upstream issue is resolved.