-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
adding webagg.address parameter to rcParams #9008
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
adding webagg.address parameter to rcParams #9008
Conversation
lib/matplotlib/rcsetup.py
Outdated
@@ -885,6 +885,15 @@ def validate_animation_writer_path(p): | |||
modules["matplotlib.animation"].writers.set_dirty() | |||
return p | |||
|
|||
def validate_webagg_address(s): | |||
if s != None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!=
--> is not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently our linter now catches this!
PEP8-check(ignoring E111 E114 E115 E116 E121 E122 E123 E124 E125 E126 E127 E128 E129 E131 E226 E240 E241 E242 E243 E244 E245 E246 E247 E248 E249 E265 E266 E704 W503 E203 E225 E261 E302 E501)
[gw1] linux -- Python 3.6.2 /home/travis/build/matplotlib/matplotlib/venv/bin/python
/home/travis/build/matplotlib/matplotlib/lib/matplotlib/rcsetup.py:889:10: E711 comparison to None should be 'if cond is not None:'
if s != None:
^
@@ -254,9 +254,10 @@ def random_ports(port, n): | |||
|
|||
success = None | |||
cls.port = rcParams['webagg.port'] | |||
cls.address = rcParams['webagg.address'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be in a if address is None
block?
👍 in principle. This will need an entry in https://github.com/matplotlib/matplotlib/tree/master/doc/users/next_whats_new (so it's existence gets advertised). |
Can you squash those commits so we don't have commit messages of '...'? |
Is there anything else to do with this pull request? It seems to fail the coverage and appveyor check, but I am not sure what to do about it. |
The coverage check is fine (well if you can think of a reasonable way to test the PR that'd be nice but I can imagine it's tricky). Appveyor has been failing for a while, this is investigated elsewhere. |
Looks good to me; I've restarted the appveyor build because I think it should now be fixed. |
PR Summary
WebAgg is by default accessible to anyone on the network, so to provide better control over the access to it, it is needed to add the address parameter