Skip to content

Simplify migration calling, fix breakpoint use - #50

Merged
hbrunn merged 1 commit into
OCA:8.0from
savoirfairelinux:breakpoints
Jun 4, 2014
Merged

Simplify migration calling, fix breakpoint use#50
hbrunn merged 1 commit into
OCA:8.0from
savoirfairelinux:breakpoints

Conversation

@bwrsandman

Copy link
Copy Markdown

Don't write to a temp file
Use load_module instead of load_source

This allows the use of breakpoints in IDEs and in pdb

Signed-off-by: Sandy Carter sandy.carter@savoirfairelinux.com

@hbrunn

hbrunn commented Jun 3, 2014

Copy link
Copy Markdown
Member

👍

the reason they do it that clumsily is that back in the days we had modules in zip files. That's not an issue for openupgrade

@hbrunn hbrunn added Approved and removed Approved labels Jun 3, 2014
@bwrsandman

Copy link
Copy Markdown
Author

@hbrunn The real issue was imp.load_source(), I found out later.
The function hides the context frame of python, so breakpoints are lost.

@StefanRijnhart

Copy link
Copy Markdown
Member

Really good, thanks! As this is core code, could you mark this code area with a comment mentioning OpenUpgrade andd the reason it is changed?

@legalsylvain

Copy link
Copy Markdown
Contributor

Agree with @StefanRijnhart remarks.

👍 otherwise.

@bwrsandman

Copy link
Copy Markdown
Author

Comments added

Don't write to a temp file
Use `load_module` instead of `load_source`

This allows the use of breakpoints in IDEs and in pdb

Signed-off-by: Sandy Carter <sandy.carter@savoirfairelinux.com>
hbrunn added a commit that referenced this pull request Jun 4, 2014
Simplify migration calling, fix breakpoint use
@hbrunn
hbrunn merged commit 9044f29 into OCA:8.0 Jun 4, 2014
@bwrsandman
bwrsandman deleted the breakpoints branch August 20, 2014 16:04
GuillemCForgeFlow pushed a commit to ForgeFlow/OpenUpgrade that referenced this pull request Oct 10, 2024
Update module field in ir_model_fields when calling rename_models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants