Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.devtools bob.devtools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bob.devtoolsbob.devtools
  • Issues
  • #95

Closed
Open
Created Apr 10, 2022 by Tiago de Freitas Pereira@tiago.pereiraOwner

Issue with Twine + python 3.9

The command bdt ci readme .... is consistently failing on linux with python 3.9

https://gitlab.idiap.ch/bob/bob.extension/-/jobs/264169 https://gitlab.idiap.ch/bob/bob.bio.video/-/jobs/264064 https://gitlab.idiap.ch/bob/bob.bio.face/-/jobs/264052

This command basically does a sanity check on the long_description field of the setup.py. In our case, this field is filled with the content of README.rst. For this check, the command uses a library called readme_renderer, which calls a function from bleach

Well, in short, there is an API issue readme_renderer and this breaks all our builds

  File "/scratch/builds/bob/bob.bio.video/miniconda/lib/python3.9/site-packages/twine/commands/check.py", line 121, in check
    warnings, is_ok = _check_file(filename, render_warning_stream)
  File "/scratch/builds/bob/bob.bio.video/miniconda/lib/python3.9/site-packages/twine/commands/check.py", line 92, in _check_file
    rendering_result = renderer.render(
  File "/scratch/builds/bob/bob.bio.video/miniconda/lib/python3.9/site-packages/readme_renderer/rst.py", line 114, in render
    return clean(rendered)
  File "/scratch/builds/bob/bob.bio.video/miniconda/lib/python3.9/site-packages/readme_renderer/clean.py", line 72, in clean
    cleaner = bleach.sanitizer.Cleaner(
TypeError: __init__() got an unexpected keyword argument 'styles'

There is wrong pinning of bleach on readme_renderer.

This can be solved by updating the readme_renderer version from conda-forge, which currently is 27.0, but they already have a tagged the version 34.0 (https://github.com/pypa/readme_renderer/releases/tag/34.0)

Edited Apr 10, 2022 by Tiago de Freitas Pereira
Assignee
Assign to
Time tracking