bpo-29546: Set path on ImportError for from ... import#91
Conversation
|
I have not dug into the surrounding code, but the general approach LGTM. |
Sorry, something went wrong.
bd14cf2 to
d3aff79
Compare
February 14, 2017 18:27
|
I also just realized there's no test. |
Sorry, something went wrong.
brettcannon
left a comment
There was a problem hiding this comment.
Please add a test.
Sorry, something went wrong.
Yes I realized that as well :-) Will do . |
Sorry, something went wrong.
3f218f5 to
30a5055
Compare
February 14, 2017 21:57
30a5055 to
32e42aa
Compare
February 14, 2017 22:39
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
=========================================
Coverage ? 82.38%
=========================================
Files ? 1428
Lines ? 351163
Branches ? 0
=========================================
Hits ? 289314
Misses ? 61849
Partials ? 0Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
BTW, please rebase your branch so we can get rid of these Codecov comments :) |
Sorry, something went wrong.
And `path` as well when existing.
See bpo-29546
This is a step toward providing better error messages in case of
from-import. Barry Warsaw Proposed:
cannot import name {name} from {module} ({path})
But that's probably going to trigger more discussions that filling in
already existing fields.
Make sure they name and path are set in various case.
32e42aa to
7456cfc
Compare
February 14, 2017 22:48
Oh gosh 71 was merged ? Thanks you! and done. |
Sorry, something went wrong.
|
LGTM! Thanks for sticking through it, @Carreau ! Please add yourself to |
Sorry, something went wrong.
Well actually good point that's setting both name and path. Name was not set either if that matters.
Sure ! |
Sorry, something went wrong.
|
Thanks! As soon as Travis is green I'll merge. |
Sorry, something went wrong.
Thanks. I don't know how disturbing the migration has been from your end (and other core dev). Many kudos for having worked on the migration for so long. |
Sorry, something went wrong.
|
Merged! Thanks again! And I'm glad that the new workflow worked out for you! As for me, the new workflow let me review this PR throughout the day when I had time and do it entirely in the browser so I didn't have to remember to commit it when I got home (if I had to cherry-pick that would not have been the case, but I could at least merge now and cherry-pick later if need be). |
Sorry, something went wrong.
Hopping you will get the cherry-pick bot soon. Thanks for the time you've put into this. |
Sorry, something went wrong.
|
@Carreau the bot would be great, but at worst me or someone else can write a Python script probably to automate it locally if necessary (which reminds me, I should write that idea down over on core-workflow). |
Sorry, something went wrong.
You did python/core-workflow#8 (Bot to automatically generate cherry-picking PRs) |
Sorry, something went wrong.
|
Wow, I'm very pleasantly impressed at how quickly my bug/idea went to (nearly) implemented through the new workflow. Kudos! |
Sorry, something went wrong.
Happy to repay a bit for all the work you did. It's also much easier to decide to implement if a core dev have pitched in the idea, as it has more chance to be accepted. Thanks both ! |
Sorry, something went wrong.
Add location information like canonical module name where identifier cannot be found and file location if available. First iteration of this was pythongh-91
…ursion depth Reset the recursion depth in PyTasklet_BindEx and add a few asserts. This fixes issue python#91. Add a test case for the recursion depth and as test case for an assertion failure caused by this bug. https://bitbucket.org/stackless-dev/stackless/issues/91 (grafted from 1584a89fca366f66dadf3cf04f0306dd45b1372f and 380b70b1933d)
Implements scripts/w45_bridge_drift_falsifier.sh per docs/w45-bridge-signature-drift-falsifier.md. Mutate-Build-Verify-Restore loop: - Mutates a bridge signature (extern "C" decl in builder.cpp + function definition in builder_emit_c.c, in lockstep) by appending a sentinel param 'int phx_w45_drift'. - Verifies the build fails at the C++ dispatch-switch call site (which has the OLD arity). - Restores both files; clean rebuild verifies tree state. Catches the structural drift class identified by pythia python#90/python#91: void* args at the bridge crossing erase the type-safety C++ overload resolution would normally provide. 252+ dispatch sites in builder.cpp post Phase 1 burndown — manual audit unscalable. Initial 6 fixtures (per spec §2.2 + §2.6 retro): - hir_builder_emit_before_with_c (Phase 1 python#6 retro) - hir_builder_emit_setup_with_c (Phase 1 python#7 retro) - hir_builder_emit_format_simple_c (Phase 1 python#2 sample) - hir_builder_emit_copy_free_vars_c (Phase 1 python#4 sample) - hir_builder_emit_get_yield_from_iter_c (Phase 1 python#4 sample) - hir_builder_emit_primitive_load_const_c (Phase 1 python#5 sample) Modes: - --dry-run: stage mutations, no build (any agent — bypass build lock) - --strict: exit 1 on FAIL (for gate integration) - --verbose: show build stderr Uses perl -0777 multi-line slurp for robust parsing of multi-line extern decls + function definitions. Mutation marker (phx_w45_drift) verified post-mutation to guard against silent no-op substitutions. Build lock: BUILD mode invokes cmake --build --target jit; per CLAUDE.md Phase 3D Build Lock, only testkeeper / gate_phoenix.sh may invoke with builds enabled. --dry-run is unrestricted. Authorization: theologian 21:55:24Z + supervisor 21:55:36Z + 22:33:17Z DISPOSITION (C). §3.5 fold-into-C derivation falsifier (opcode-constant shadow class) is deferred — needs W21 golden integration. Sibling workstreams: W33 (zero-bridge verifier), W42 (refcount correctness), W44 (DO-NOT-USE caller gate).
And
pathas well when existing.See bpo-29546
This is a step toward providing better error messages in case of
from-import. Barry Warsaw Proposed:
cannot import name {name} from {module} ({path})
But that's probably going to trigger more discussions that filling in
already existing fields.
I'm not familiar with C-internal of CPython, So let me know if I'm doing things wrong.