Opened 17 months ago

Last modified 7 months ago

#31366 closed enhancement

docbuild: switch from optparse to argparse — at Version 11

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-9.5
Component: documentation Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers:
Report Upstream: N/A Work issues:
Branch: public/ticket/31366 (Commits, GitHub, GitLab) Commit: 3a4c572d5c7be610c632cf2ae66ba436636412c1
Dependencies: Stopgaps:

Status badges

Description (last modified by chapoton)

Sage's docbuilding uses optparse for argument parsing, but this library has been deprecated for a while. We should switch to argparse.

Some instructions for conversions can be found here: https://docs.python.org/3/library/argparse.html#help

Change History (11)

comment:1 Changed 17 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

comment:2 Changed 12 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:3 Changed 11 months ago by chapoton

a little bit in #32331

comment:4 Changed 11 months ago by chapoton

  • Branch set to public/ticket/31366
  • Commit set to 159ec4b5b77cc7b3b5a008a08d01a691ed506b3f

first tentative


New commits:

159ec4bfirst step towards using argparse for doc command line arguments

comment:5 Changed 11 months ago by git

  • Commit changed from 159ec4b5b77cc7b3b5a008a08d01a691ed506b3f to 56ce7b68910f0f6a8e00c58239fa81a2bd0c1fd2

Branch pushed to git repo; I updated commit sha1. New commits:

56ce7b6more work on argparse for doc command line

comment:6 Changed 10 months ago by git

  • Commit changed from 56ce7b68910f0f6a8e00c58239fa81a2bd0c1fd2 to 98824cd9e4d5719358630e25305aee6dffd9c30f

Branch pushed to git repo; I updated commit sha1. New commits:

98824cdMerge branch 'public/ticket/31366' in 9.5.b1

comment:7 Changed 8 months ago by git

  • Commit changed from 98824cd9e4d5719358630e25305aee6dffd9c30f to ec995b76d9096379648f1a78decc0569819e980a

Branch pushed to git repo; I updated commit sha1. New commits:

d9cd177Merge branch 'public/ticket/31366' in 9.5.b5
ec995b7some details

comment:8 Changed 8 months ago by chapoton

  • Authors set to Frédéric Chapoton
  • Status changed from new to needs_review

not quite sure that it works perfectly, but it seems so

comment:9 Changed 8 months ago by chapoton

  • Status changed from needs_review to needs_work

needs work

[dochtml]   File "/home/sagemath/sage-9.1/local/lib/python3.7/site-packages/sage_docbuild/__init__.py", line 1558, in setup_parser
[dochtml]     description=help_description(compact=True))
[dochtml] TypeError: __init__() got an unexpected keyword argument 'add_help_option'

comment:10 Changed 8 months ago by git

  • Commit changed from ec995b76d9096379648f1a78decc0569819e980a to 3a4c572d5c7be610c632cf2ae66ba436636412c1

Branch pushed to git repo; I updated commit sha1. New commits:

3a4c572more work on argparse for docbuild

comment:11 Changed 8 months ago by chapoton

  • Description modified (diff)
Note: See TracTickets for help on using tickets.