Skip to content
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

Fix msgpack PendingDeprecationWarning for encoding='utf-8' #2153

Merged
merged 1 commit into from Aug 2, 2018

Conversation

ogrisel
Copy link
Contributor

@ogrisel ogrisel commented Aug 2, 2018

This should get rid of deprecation warnings such as:

/home/travis/miniconda/envs/testenv/lib/python3.6/site-packages/distributed/protocol/core.py:188: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead.
  return msgpack.loads(payload, encoding='utf8', use_list=False)

while preserving backward compat for older versions of msgpack. Unfortunately it's not possible introspect the version number of the msgpack package, hence the TypeError except block.

@ogrisel
Copy link
Contributor Author

ogrisel commented Aug 2, 2018

@mrocklin the appveyor job failed with:

Traceback (most recent call last):
  File "C:\projects\distributed\distributed\tests\test_client.py", line 5440, in test_no_threads_lingering
    assert threading.active_count() < 30, list(active.values())
AssertionError: [<Thread(AsyncProcess Process-74 watch message queue, started daemon 2560)>, <Thread(AsyncProcess Process-350 watch pr...eaded scatter(), started daemon 680)>, <Thread(AsyncProcess Process-11 watch message queue, started daemon 2252)>, ...]
assert 30 < 30
 +  where 30 = <function active_count at 0x000000490A6FF8C8>()
 +    where <function active_count at 0x000000490A6FF8C8> = threading.active_count

I don't think this is caused by this PR.

For reference, I have run the distributed/protocol/tests/ locally with msgpack==0.5.1 and they pass.

@ogrisel ogrisel requested a review from mrocklin August 2, 2018 08:43
@mrocklin
Copy link
Member

mrocklin commented Aug 2, 2018

This looks fine to me. Sorry about the intermittent failures. This one is actually caused by a recent PR to clean up other intermittent failures:

I'll take care of it.

@ogrisel ogrisel merged commit 9919543 into dask:master Aug 2, 2018
@ogrisel ogrisel deleted the msgpack-deprecation-warning branch August 2, 2018 13:55
@ogrisel
Copy link
Contributor Author

ogrisel commented Aug 2, 2018

Alright merged!

@mrocklin
Copy link
Member

mrocklin commented Aug 2, 2018

Thanks @ogrisel

Sign up for free to 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.

None yet

2 participants