GithubHelp home page GithubHelp logo

jupyterlab / jupyterlab_pygments Goto Github PK

View Code? Open in Web Editor NEW
35.0 14.0 29.0 1.5 MB

Pygments theme making use of JupyterLab CSS variables

License: BSD 3-Clause "New" or "Revised" License

Python 85.04% Jupyter Notebook 11.79% JavaScript 0.16% TypeScript 2.82% CSS 0.19%

jupyterlab_pygments's Introduction

JupyterLab Pygments Theme

This package contains a syntax coloring theme for pygments making use of the JupyterLab CSS variables.

The goal is to enable the use of JupyterLab's themes with pygments-generated HTML.

Screencast

In the following screencast, we demonstrate how Pygments-highlighted code can make use of the JupyterLab theme.

pygments screencast

Installation

jupyterlab_pygments can be installed with the conda package manager

conda install -c conda-forge jupyterlab_pygments

or from pypi

pip install jupyterlab_pygments

Dependencies

  • jupyterlab_pygments requires pygments version 2.4.1.
  • The CSS variables used by the theme correspond to the CodeMirror syntex coloring theme defined in the NPM package @jupyterlab/codemirror. Supported versions for @jupyterlab/codemirror's CSS include 0.19.1, ^1.0, and, ^2.0.

Limitations

Pygments-generated HTML and CSS classes are not granular enough to reproduce all of the details of codemirror (the JavaScript text editor used by JupyterLab).

This includes the ability to differentiate properties from general names.

License

jupyterlab_pygments uses a shared copyright model that enables all contributors to maintain the copyright on their contributions. All code is licensed under the terms of the revised BSD license.

jupyterlab_pygments's People

Contributors

btel avatar dependabot[bot] avatar fcollonval avatar jtpio avatar krassowski avatar maartenbreddels avatar martinrenou avatar rrosio avatar sylvaincorlay avatar telamonian avatar willh-cmyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterlab_pygments's Issues

AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)' while opening jupyter notebook

Description

Hi. I tried running jupyter notebook recently and faced with the following issue. I run local jupyter server, try to open any notebook from filesystem and I get 500 : Internal Server Error.

Here are logs from jupyter server.

[E 22:47:46.040 NotebookApp] Uncaught exception GET /notebooks/sem_tasks/05_data_files2/TOBD_sem_05_data_files2_v2_blank.ipynb (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/sem_tasks/05_data_files2/TOBD_sem_05_data_files2_v2_blank.ipynb', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/usr/local/lib/python3.8/dist-packages/tornado/gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "/usr/local/lib/python3.8/dist-packages/notebook/notebook/handlers.py", line 95, in get
        self.write(self.render_template('notebook.html',
      File "/usr/local/lib/python3.8/dist-packages/notebook/base/handlers.py", line 516, in render_template
        return template.render(**ns)
      File "/home/sabyanin/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/home/sabyanin/.local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/home/sabyanin/.local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "/usr/local/lib/python3.8/dist-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/usr/local/lib/python3.8/dist-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/usr/local/lib/python3.8/dist-packages/notebook/templates/notebook.html", line 115, in block "header"
        {% for exporter in get_frontend_exporters() %}
      File "/usr/local/lib/python3.8/dist-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
        from nbconvert.exporters.base import get_export_names, get_exporter
      File "/usr/local/lib/python3.8/dist-packages/nbconvert/__init__.py", line 4, in <module>
        from .exporters import *
      File "/usr/local/lib/python3.8/dist-packages/nbconvert/exporters/__init__.py", line 4, in <module>
        from .slides import SlidesExporter
      File "/usr/local/lib/python3.8/dist-packages/nbconvert/exporters/slides.py", line 12, in <module>
        from ..preprocessors.base import Preprocessor
      File "/usr/local/lib/python3.8/dist-packages/nbconvert/preprocessors/__init__.py", line 7, in <module>
        from .csshtmlheader import CSSHTMLHeaderPreprocessor
      File "/usr/local/lib/python3.8/dist-packages/nbconvert/preprocessors/csshtmlheader.py", line 14, in <module>
        from jupyterlab_pygments import JupyterStyle
      File "/usr/local/lib/python3.8/dist-packages/jupyterlab_pygments/__init__.py", line 4, in <module>
        from .style import JupyterStyle
      File "/usr/local/lib/python3.8/dist-packages/jupyterlab_pygments/style.py", line 10, in <module>
        class JupyterStyle(Style):
      File "/usr/lib/python3/dist-packages/pygments/style.py", line 101, in __new__
        ndef[0] = colorformat(styledef)
      File "/usr/lib/python3/dist-packages/pygments/style.py", line 58, in colorformat
        assert False, "wrong color format %r" % text
    AssertionError: wrong color format 'var(--jp-mirror-editor-variable-color)'
[E 22:47:46.045 NotebookApp] {
      "Host": "localhost:8888",
      "Connection": "keep-alive",
      "Sec-Ch-Ua": "\"Chromium\";v=\"94\", \"Google Chrome\";v=\"94\", \";Not A Brand\";v=\"99\"",
      "Sec-Ch-Ua-Mobile": "?0",
      "Sec-Ch-Ua-Platform": "\"Linux\"",
      "Upgrade-Insecure-Requests": "1",
      "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
      "Sec-Fetch-Site": "same-origin",
      "Sec-Fetch-Mode": "navigate",
      "Sec-Fetch-User": "?1",
      "Sec-Fetch-Dest": "document",
      "Referer": "http://localhost:8888/tree/sem_tasks/05_data_files2",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9,ru;q=0.8",
      "Cookie": "_xsrf=2|471c0411|ef46fbdadc5c7e7d8a5a58823e4c6c33|1639510655; username-localhost-8888=\"2|1:0|10:1639511260|23:username-localhost-8888|44:ODhiY2Y0ZWIyYzQ4NGJjZTlmNmM3MmY5MzA4ODg2ZWQ=|d4ae11da3ee3adf2eb98e1c8e69ec53333c5aaaaf3ccd58427bd5bdcda54fbc4\""
    }
[E 22:47:46.045 NotebookApp] 500 GET /notebooks/sem_tasks/05_data_files2/TOBD_sem_05_data_files2_v2_blank.ipynb (127.0.0.1) 69.940000ms referer=http://localhost:8888/tree/sem_tasks/05_data_files2

Reproducer

I installed jupyter with the following steps.

sudo pip3 install virtualenv
virtualenv env
source ./env/bin/activate
pip3 install jupyter

Context

  • Operating System and version: Linux Ubuntu 20.04.3

When faced issue for first time tried to google it. Found a recommendation to update pygments to >=2.4.1. Did pip3 install --upgrade pygments. Didn't help. Also tried to update nbconvert. Didn't help as well.
Here is the list of packages in pip3:

Package              Version
-------------------- ---------
alembic              1.7.5
argon2-cffi          21.3.0
argon2-cffi-bindings 21.2.0
async-generator      1.10
attrs                21.2.0
backcall             0.2.0
bleach               4.1.0
certifi              2021.10.8
certipy              0.1.3
cffi                 1.15.0
charset-normalizer   2.0.9
cryptography         36.0.0
debugpy              1.5.1
decorator            5.1.0
defusedxml           0.7.1
entrypoints          0.3
greenlet             1.1.2
idna                 3.3
importlib-metadata   4.8.2
importlib-resources  5.4.0
ipykernel            6.6.0
ipython              7.30.1
ipython-genutils     0.2.0
ipywidgets           7.6.5
jedi                 0.18.1
Jinja2               3.0.3
jsonschema           4.2.1
jupyter              1.0.0
jupyter-client       7.1.0
jupyter-console      6.4.0
jupyter-core         4.9.1
jupyter-telemetry    0.1.0
jupyterhub           2.0.0
jupyterlab-pygments  0.1.2
jupyterlab-widgets   1.0.2
Mako                 1.1.6
MarkupSafe           2.0.1
matplotlib-inline    0.1.3
mistune              0.8.4
nbclient             0.5.9
nbconvert            6.3.0
nbformat             5.1.3
nest-asyncio         1.5.4
notebook             6.4.6
oauthlib             3.1.1
packaging            21.3
pamela               1.0.0
pandocfilters        1.5.0
parso                0.8.3
pexpect              4.8.0
pickleshare          0.7.5
pip                  21.3.1
prometheus-client    0.12.0
prompt-toolkit       3.0.24
ptyprocess           0.7.0
pycparser            2.21
Pygments             2.10.0
pyOpenSSL            21.0.0
pyparsing            3.0.6
pyrsistent           0.18.0
python-dateutil      2.8.2
python-json-logger   2.0.2
pyzmq                22.3.0
qtconsole            5.2.2
QtPy                 1.11.3
requests             2.26.0
ruamel.yaml          0.17.17
ruamel.yaml.clib     0.2.6
Send2Trash           1.8.0
setuptools           58.3.0
six                  1.16.0
SQLAlchemy           1.4.28
terminado            0.12.1
testpath             0.5.0
tornado              6.1
traitlets            5.1.1
urllib3              1.26.7
wcwidth              0.2.5
webencodings         0.5.1
wheel                0.37.0
widgetsnbextension   3.5.2
zipp                 3.6.0
Troubleshoot Output
$PATH:
	/home/sabyanin/university/finashka/env/bin
	/home/sabyanin/bin/google-cloud-sdk-299.0.0-linux-x86_64/google-cloud-sdk/bin
	/home/sabyanin/.local/bin
	/home/sabyanin/bin
	/usr/local/sbin
	/usr/local/bin
	/usr/sbin
	/usr/bin
	/sbin
	/bin
	/usr/games
	/usr/local/games
	/snap/bin
	/usr/local/go/bin
	/home/sabyanin/bin
	/usr/local/go/bin

sys.path:
/usr/local/bin
/usr/lib/python38.zip
/usr/lib/python3.8
/usr/lib/python3.8/lib-dynload
/home/sabyanin/.local/lib/python3.8/site-packages
/usr/local/lib/python3.8/dist-packages
/usr/lib/python3/dist-packages

sys.executable:
/usr/bin/python3

sys.version:
3.8.10 (default, Sep 28 2021, 16:10:42)
[GCC 9.3.0]

platform.platform():
Linux-5.4.0-64-generic-x86_64-with-glibc2.29

which -a jupyter:
/home/sabyanin/university/finashka/env/bin/jupyter
/usr/local/bin/jupyter

pip list:
Package Version
--------------------------------- --------------------
aioquic 0.9.6
apturl 0.5.2
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
attrs 21.2.0
backcall 0.1.0
backports.entry-points-selectable 1.1.1
bcrypt 3.1.7
bleach 4.1.0
blinker 1.4
bottle 0.12.19
Brlapi 0.7.0
certifi 2018.1.18
cffi 1.15.0
chardet 3.0.4
chrome-gnome-shell 0.0.0
cliapp 1.20180812.1
click 7.1.2
cmdtest 0.32+git
colorama 0.4.3
command-not-found 0.3
conan 1.33.1
cryptography 2.8
cupshelpers 1.0
cycler 0.10.0
dbus-python 1.2.16
debugpy 1.5.1
decorator 4.4.2
defer 1.0.6
defusedxml 0.7.1
deprecation 2.0.7
devscripts 2.20.2ubuntu2
distlib 0.3.4
distro 1.4.0
distro-info 0.23ubuntu1
docker 4.1.0
docopt 0.6.2
entrypoints 0.3
fasteners 0.16
filelock 3.4.0
Flask 0.12.2
future 0.18.2
Glances 3.1.3
gpg 1.13.1-unknown
greenlet 0.4.15
grip 4.5.2
gspread 0.6.2
Guake 3.6.3
gunicorn 19.4.5
httplib2 0.14.0
idna 2.6
importlib-resources 5.4.0
influxdb 5.2.0
iotop 0.6
ipykernel 6.6.0
ipython 7.30.1
ipython-genutils 0.2.0
ipywidgets 7.6.5
itsdangerous 1.1.0
jedi 0.18.1
Jinja2 2.11.2
jsonschema 4.2.1
jupyter 1.0.0
jupyter-client 7.1.0
jupyter-console 6.4.0
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
keyring 18.0.1
kiwisolver 1.0.1
language-selector 0.1
launchpadlib 1.10.13
lazr.restfulclient 0.14.2
lazr.uri 1.0.3
libvirt-python 6.1.0
louis 3.12.0
macaroonbakery 1.3.1
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.1.2
matplotlib-inline 0.1.3
mistune 0.8.4
msgpack 0.6.2
nbclient 0.5.9
nbconvert 6.3.0
nbformat 5.1.3
nest-asyncio 1.5.4
netifaces 0.10.4
node-semver 0.6.1
notebook 6.4.6
numpy 1.17.4
oauth2client 4.1.2
oauthlib 3.1.0
olefile 0.46
packaging 20.3
pandocfilters 1.5.0
paramiko 2.6.0
parso 0.8.3
patch-ng 1.17.4
path-and-address 2.0.1
pbr 5.4.5
pexpect 4.6.0
pickleshare 0.7.5
Pillow 7.0.0
pip 20.0.2
platformdirs 2.4.0
pluginbase 1.0.0
ply 3.11
prometheus-client 0.12.0
prompt-toolkit 2.0.10
protobuf 3.6.1
psutil 5.5.1
ptyprocess 0.7.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycairo 1.16.2
pycparser 2.21
pycryptodomex 3.6.1
pycups 1.9.73
Pygments 2.3.1
PyGObject 3.36.0
PyJWT 1.7.1
pylsqpack 0.3.10
pymacaroons 0.13.0
PyNaCl 1.3.0
pynvim 0.4.1
pyparsing 2.4.6
pyRFC3339 1.1
pyrsistent 0.18.0
pysmi 0.3.2
pysnmp 4.4.6
pystache 0.5.4
python-apt 2.0.0+ubuntu0.20.4.6
python-dateutil 2.7.3
python-debian 0.1.36ubuntu1
python-gitlab 1.5.1
python-magic 0.4.16
pytz 2017.3
pyxdg 0.26
PyYAML 3.12
pyzmq 22.3.0
qtconsole 5.2.2
QtPy 1.11.3
redis 2.10.6
reportlab 3.5.34
requests 2.18.4
requests-unixsocket 0.2.0
rsa 4.6
SecretStorage 2.3.1
Send2Trash 1.8.0
setuptools 45.2.0
simplejson 3.16.0
six 1.14.0
ssh-import-id 5.10
systemd-python 234
terminado 0.12.1
testpath 0.5.0
tornado 6.1
tqdm 4.57.0
traitlets 5.1.1
ttystatus 0.38
ubuntu-advantage-tools 27.4
ubuntu-drivers-common 0.0.0
ufw 0.36
unattended-upgrades 0.1
unidiff 0.5.5
urllib3 1.22
virtualenv 20.10.0
wadllib 1.3.3
wcwidth 0.1.8
webencodings 0.5.1
websocket-client 0.53.0
Werkzeug 0.14.1
wheel 0.34.2
widgetsnbextension 3.5.2
xkit 0.0.0
zipp 3.6.0

issue with bootstrapping `jupyterlab-pygments`๐Ÿค”

I'm packaging many python modules as rpm packages. Recently I've moved from python 3.8 to 3.9 and now I have problem with jupyterlab-pygments and nbconvert build and install time dependencies.

To build jupyterlab-pygments it is necessary to have jlpm command which is part of jupyterlab which requires nbconvert which requires to install jupyterlab-pygments.
There is no any issues with building jupyterlab and nbconvert however to install nbconvert I must install first jupyterlab-pygments .. loop closed ๐Ÿ˜ž

Q: how can I bootstrap jupyterlab-pygments in that context? ๐Ÿค”

Punctuation highlighting does not match CodeMirror

Description

In JupyterLab, CodeMirror does not tag items like brackets, colons, semi-colons, parentheses, and commas as punctuation. pygments flags such elements as punctuation and jupyterlab_pygments styles them as --jp-mirror-editor-punctuation-color, leading to a mismatch in color for these elements. Don't think this is a big deal, and one could argue that pygments is doing a better job, but it does seem to be inconsistent.

Reproduce

  1. Create a JupyterLab notebook with the cell a = [1,2,3,4]; print(a[1:3]) and save it as demo.ipynb
  2. Run nbconvert --to html --template lab demo.ipynb
  3. Inspect the differences in the output html file and the original notebook rendered in JupyterLab. The colors for brackets, colons, semi-colons, parentheses, and commas are blue in the html file and the default text color in JupyterLab.

Expected behavior

These elements would be the default text color.

Context

  • Operating System and version: macOS 12.4
  • Browser and version: Safari 15.5
  • JupyterLab version: 3.4.2

Suggested fix

Comment out the line setting the punctuation color here:

Punctuation: 'var(--jp-mirror-editor-punctuation-color)' # class: 'p'

0.2.2: build fails because hardcoded `python` interpreter name

Description

Looks like pep517 build fails because hardcoded python interpreter name.

Reproduce

Run /usr/bin/python3 -sBm build -w --no-isolation

Expected behavior

None of the python code should assume that python interpreter name is python.
Instead hadcoding that name interpreter name should be obtained from sys.executable

Context

Run build in env where there is no python executable and is for example python3 ends with

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating jupyterlab_pygments.egg-info
writing jupyterlab_pygments.egg-info/PKG-INFO
writing dependency_links to jupyterlab_pygments.egg-info/dependency_links.txt
writing top-level names to jupyterlab_pygments.egg-info/top_level.txt
writing manifest file 'jupyterlab_pygments.egg-info/SOURCES.txt'
reading manifest file 'jupyterlab_pygments.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
/usr/lib/python3.8/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!

        ********************************************************************************
        The license_file parameter is deprecated, use license_files instead.

        By 2023-Oct-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!
  parsed = self.parsers.get(option_name, lambda x: x)(value)
warning: no directories found matching 'jupyterlab_pygments/labextension'
no previously-included directories found matching '**/node_modules'
no previously-included directories found matching 'lib'
no previously-included directories found matching 'binder'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '.git' found anywhere in distribution
warning: no previously-included files matching '.ipynb_checkpoints' found anywhere in distribution
adding license file 'LICENSE'
writing manifest file 'jupyterlab_pygments.egg-info/SOURCES.txt'
* Building wheel...
yarn not found, ignoring yarn.lock file
โžค YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker ๐Ÿ‘

โžค YN0000: โ”Œ Resolution step
โžค YN0061: โ”‚ lru-cache@npm:7.8.0 is deprecated: Please update to latest patch version to fix memory leak https://github.com/isaacs/node-lru-cache/issues/227
โžค YN0061: โ”‚ @npmcli/move-file@npm:1.1.2 is deprecated: This functionality has been moved to @npmcli/fs
โžค YN0061: โ”‚ crypto@npm:1.0.1 is deprecated: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
โžค YN0061: โ”‚ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

[..]

โžค YN0013: โ”‚ yjs@npm:13.5.34 can't be found in the cache and will be fetched from the remote registry
โžค YN0013: โ”‚ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
โžค YN0000: โ”” Completed in 0s 499ms
โžค YN0000: โ”Œ Link step
โžค YN0007: โ”‚ @fortawesome/fontawesome-free@npm:5.15.4 must be built because it never has been before or the last one failed
โžค YN0007: โ”‚ core-js-pure@npm:3.21.1 must be built because it never has been before or the last one failed
โžค YN0007: โ”‚ es5-ext@npm:0.10.60 must be built because it never has been before or the last one failed
โžค YN0007: โ”‚ leveldown@npm:5.6.0 must be built because it never has been before or the last one failed
โžค YN0000: โ”” Completed in 8s 935ms
โžค YN0000: Done with warnings in 23s 13ms
command not found: python
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.8/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
  File "/usr/lib/python3.8/site-packages/jupyter_packaging/build_api.py", line 22, in build_wheel
    builder()
  File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 233, in builder
    run(npm_cmd + ["run", build_cmd], cwd=node_package)
  File "/usr/lib/python3.8/site-packages/jupyter_packaging/setupbase.py", line 297, in run
    return subprocess.check_call(cmd, **kwargs)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/jlpm', 'run', 'build:prod']' returned non-zero exit status 127.

ERROR Backend subprocess exited when trying to invoke build_wheel

Please have a look on setuptools deprecation warning as well.

recursive package dependencies

Problem

It seems that since #11, there is now a recursive dependency of jupyterlab_pygments on jupyterlab on jupyter_server on nbconvert on jupyterlab_pygments. Even though most of these are run-time dependencies (not build-time), this makes things complicated both for packagers and non-wheel installs on pip. Attempting a pip install --no-binary :all: jupyterlab results in:

LookupError: https://files.pythonhosted.org/packages/69/8e/8ae01f052013ee578b297499d16fcfafb892927d8e41c1a0054d2f99a569/jupyterlab_pygments-0.2.2.tar.gz (from https://pypi.org/simple/jupyterlab-pygments/) (requires-python:>=3.7) is already being built: jupyterlab-pygments from https://files.pythonhosted.org/packages/69/8e/8ae01f052013ee578b297499d16fcfafb892927d8e41c1a0054d2f99a569/jupyterlab_pygments-0.2.2.tar.gz (from nbconvert>=6.4.4->jupyter-server~=1.16->jupyterlab)

I'm not saying this is necessarily this package's fault, of course, and probably most people will be fine with wheels, but it seems worth bringing up.

Proposed Solution

If I understand #11 correctly it adds an extension. Is there a way to split off this extension part (and the dependency on jupyterlab) into a different package? Alternatively, maybe the nbconvert dependency could be removed or shifted onto a different package?

Additional context

This came up when trying to update to the latest jupyterlab_pygments with spack, which builds everything from source separately and needs to resolve dependencies, so the recursive dependencies prevent them from being installed at all (even though they are only runtime dependencies). The result is that an old version of jupyterlab_pygments (0.1.2) is installed instead, and this seems to be what some other packaging systems are doing, too.

Language tagged fenced code blocks are not highlighted the same as inside jupyterlab

Originally reported in jupyter/nbconvert#1385

I noticed that some language tags for fenced code blocks are differentially highlighted in jupyterlab compared to the html output from nbconvert. Would it be possible to use the same stylesheet between jupyterlab and nbconvert to make this consistent (not sure which one is more correct, if any)?

For all the example diff output below, jupyterlab is on the left and nbconvert HTML on the right

  • diff is not highlighted at all
    image

    • For comparison, here is the github highlighting:
    4ac2218 (HEAD -> master) Add sentence
    diff --git a/README.md b/README.md
    index 0647515..8ad6860 100644
    --- a/README.md
    +++ b/README.md
    @@ -1,3 +1,3 @@
     # Correct title

  • sh differs in the highlighting of the command, flags, parentheses, + and -
    image

    • For comparison, here is the github highlighting:
    4ac2218 (HEAD -> master) Add sentence
    diff --git a/README.md b/README.md
    index 0647515..8ad6860 100644
    --- a/README.md
    +++ b/README.md
    @@ -1,3 +1,3 @@
     # Correct title

jupyter core     : 4.6.3
jupyter-notebook : 6.1.4
qtconsole        : not installed
ipython          : 7.18.1
ipykernel        : 5.3.4
jupyter client   : 6.1.7
jupyter lab      : 2.2.6
nbconvert        : 6.0.2  # just installed via conda-forge
ipywidgets       : not installed
nbformat         : 5.0.5
traitlets        : 5.0.4

Python match/case syntax highlight

I am using jupyter/scipy-notebook:python-3.10.5 docker image, and it seems that the syntax match/case is not highlighted for python code cells.

0.2.1 cannot be installed on AppVeyor

Description

0.2.1 cannot be installed on AppVeyor, or possibly Windows in general. Our Azure CI is working on Windows, but is using a much older version of setuptools, so this may be the cause of the problem.

The last working build is here, which installed 0.2.0. The first failing build is here, where it starting trying 0.2.1.

Reproduce

Sorry, we don't explicitly install this, and I don't know what pulls it in, so I don't have an easy install line. The result is:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\pip-install-qcjboywg\\jupyterlab-pygments\\jupyterlab_pygments-0.2.1.data/data/share/jupyter/labextensions/jupyterlab_pygments/static/vendors-node_modules_css-loader_dist_runtime_api_js-node_modules_css-loader_dist_runtime_cssW-72eba1.a3589cd972271a982c03.js'

Context

  • Operating System and version: Windows Server
  • Browser and version: N/A
  • JupyterLab version: N/A

(Alpha) version compatible with JupyterLab 4?

Problem

When building jupyterlab 4.0.0a31:

conda-forge/jupyterlab-feedstock#350 (comment)

+ jupyter labextension list
JupyterLab v4.0.0a31
/home/conda/feedstock_root/build_artifacts/jupyterlab_1668971729072/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled  X (python, jupyterlab_pygments)


"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension               Package
>=4.0.0-alpha.16 <4.1.0 >=3.1.0 <4.0.0          @jupyterlab/application

Proposed Solution

Get an alpha out that lab4 can start building against.

Additional context

  • may be relevant to break up in #23

Where is semver.py?

I was pondering packaging jupyterlab_pygments for Debian, but the LICENSE file says something about a semver.py I don't see in the archive.

Did I miss something or was the LICENSE file copied from elsewhere without seeing it needed updating?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.