Skip to content

Preserve func.__qualname__ when defined - #130

Merged
rgbkrk merged 2 commits into
cloudpipe:masterfrom
ogrisel:fill-function-args
Nov 8, 2017
Merged

Preserve func.__qualname__ when defined#130
rgbkrk merged 2 commits into
cloudpipe:masterfrom
ogrisel:fill-function-args

Conversation

@ogrisel

Copy link
Copy Markdown
Contributor

This is a followup for #128 to address @pitrou's comment: #128 (comment).

This is backward compatible with 0.4.0 and 0.4.1 and should make it easier to be forward compatible with future versions shall we need to pass additional function metadata.

@ogrisel

ogrisel commented Nov 8, 2017

Copy link
Copy Markdown
ContributorAuthor

@rgbkrk@pitrou if you like this I will merge and release 0.4.2 and then rebase #127 to release 0.5.0.

Comment threadcloudpickle/cloudpickle.py Outdated
func = args[0]
keys = ['globals', 'defaults', 'dict', 'closure_values']
state = dict(zip(keys, args[1:]))
state['module'] = None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to set __module__ to None? Or is it preferrable to skip it entirely?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I meant to change that.

@pitrou

Copy link
Copy Markdown
Member

Kudos for doing this :-)

@codecov-io

codecov-io commented Nov 8, 2017

Copy link
Copy Markdown

Codecov Report

Merging #130 into master will decrease coverage by 5.75%.
The diff coverage is 91.66%.

Impacted file tree graph

@@ Coverage Diff @@## master #130 +/- ##
==========================================
- Coverage 84.09% 78.34% -5.76% 
==========================================
Files 2 2 Lines 522 531 +9 Branches 91 96 +5 ==========================================
- Hits 439 416 -23 - Misses 62 84 +22 - Partials 21 31 +10
Impacted FilesCoverage Δ
cloudpickle/cloudpickle.py78.21% <91.66%> (-5.79%)⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d8c670...11b0d33. Read the comment docs.

@rgbkrk
rgbkrk merged commit 9cbb13f into cloudpipe:masterNov 8, 2017
@ogrisel
ogrisel deleted the fill-function-args branch November 8, 2017 16:26
@ogrisel

Copy link
Copy Markdown
ContributorAuthor

@rgbkrk thanks for the merge. Do you want to release 0.4.2 too? Or shall I do it?

@rgbkrk

Copy link
Copy Markdown
Member

I’d love if you can make the release.

@ogrisel

Copy link
Copy Markdown
ContributorAuthor

0.4.2 released.

@ogriselogrisel mentioned this pull request Nov 13, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@ogrisel@pitrou@codecov-io@rgbkrk