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

Upgrade mathjax #3751

Merged
merged 2 commits into from
Jul 12, 2018
Merged

Upgrade mathjax #3751

merged 2 commits into from
Jul 12, 2018

Conversation

gnestor
Copy link
Contributor

@gnestor gnestor commented Jul 12, 2018

@gnestor
Copy link
Contributor Author

gnestor commented Jul 12, 2018

It looks like there's an official MathJax package:

$ bower lookup MathJax
MathJax https://github.com/mathjax/MathJax.git
grant:notebook grant$ bower info MathJax
bower cached        https://github.com/mathjax/MathJax.git#2.7.4
bower validate      2.7.4 against https://github.com/mathjax/MathJax.git#*

{
  name: 'MathJax',
  main: './MathJax.js',
  homepage: 'http://www.mathjax.org/',
  ignore: [
    '**/.*',
    'node_modules',
    'components'
  ],
  keywords: [
    'math',
    'js',
    'LaTeX',
    'MathML',
    'AsciiMath'
  ],
  version: '2.7.4'
}

Available versions:
  - 2.7.4
  - 2.7.3
  - 2.7.2
  - 2.7.1
  - 2.7.0
  - 2.6.1
  - 2.6.0
  - 2.5.3
  - 2.5.2
  - 2.5.1
  - 2.5.0
  - 2.4.0
  - 2.3.0
  - 2.2.0
  - 2.1.0
  - 2.0.0

Show 8 additional prereleases with ‘bower info MathJax --verbose’
You can request info for a specific version with 'bower info MathJax#<version>'

Does this mean that @minrk doesn't need to maintain components/mathjax? It looks like one difference is that components/mathjax purposefully excludes the image fonts...

@gnestor
Copy link
Contributor Author

gnestor commented Jul 12, 2018

@takluyver I'm getting a strange error when trying to run the notebook against master:

$ jupyter notebook
[W 13:07:55.769 NotebookApp] server_extensions is deprecated, use nbserver_extensions
[I 13:07:55.804 NotebookApp] It looks like you're running the notebook from source.
        If you're working on the Javascript of the notebook, try running
    
        npm run build:watch
    
        in another terminal window to have the system incrementally
        watch and build the notebook's JavaScript for you, as you make changes.
Traceback (most recent call last):
  File "/Users/grant/anaconda/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 856, in _default_allow_remote
    addr = ipaddress.ip_address(self.ip)
  File "/Users/grant/anaconda/lib/python3.6/ipaddress.py", line 54, in ip_address
    address)
ValueError: 'localhost' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/grant/anaconda/bin/jupyter-notebook", line 11, in <module>
    load_entry_point('notebook', 'console_scripts', 'jupyter-notebook')()
  File "/Users/grant/anaconda/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/grant/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/Users/grant/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 1598, in initialize
    self.init_webapp()
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 1350, in init_webapp
    self.jinja_environment_options,
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 158, in __init__
    default_url, settings_overrides, jinja_env_options)
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 256, in init_settings
    allow_remote_access=jupyter_app.allow_remote_access,
  File "/Users/grant/anaconda/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/Users/grant/anaconda/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/Users/grant/Sites/jupyter/notebook/notebook/notebookapp.py", line 863, in _default_allow_remote
    if not ipaddress.ip_address(addr).is_loopback:
  File "/Users/grant/anaconda/lib/python3.6/ipaddress.py", line 54, in ip_address
    address)
ValueError: 'fe80::1%lo0' does not appear to be an IPv4 or IPv6 address

I tested the upgraded mathjax against the 5.5.0 tag and it works.

@takluyver takluyver added this to the 5.6 milestone Jul 12, 2018
@takluyver
Copy link
Member

Thanks @gnestor, I've tested that.

I think you're running into some issue with #3714. Can I ask that you open a new issue for that and mark it for 5.6 to make sure we investigate promptly? For some reason it seems to be determining that localhost resolves to 'fe80::1%lo0', which isn't a valid IP address.

@takluyver takluyver merged commit 2ff2849 into jupyter:master Jul 12, 2018
@minrk
Copy link
Member

minrk commented Jul 12, 2018

Indeed we should investigate picking up the official mathjax package, if it works. We can (and maybe do already?) exclude the image fonts in our package_data setup.

@takluyver
Copy link
Member

Opened #3755 for further discussion of that.

@gnestor
Copy link
Contributor Author

gnestor commented Jul 13, 2018

Should we do a patch release? 5.5.1? Or just wait for 5.6.0?

@takluyver
Copy link
Member

We were on the cusp of releasing 5.6 anyway, so let's just do that.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants