Skip to content

Commit

Permalink
Enable forked click-repl to test change
Browse files Browse the repository at this point in the history
Test change to be submitted to click_repl to enable use of general
options in the repl.
  • Loading branch information
kschopmeyer committed Dec 16, 2024
1 parent 38e2025 commit a4e9657
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Released: not yet
from pywbemtools/pywbemcli/_utils.py to pywbemcli/_connection_file_names.py.
(issue # 1423)

* Use click-repl version 3 forked. Currently this is using a forked version since the
proposed changes to fix issues (see issue #1441) have not been incorporated
into a released version of click-repl.

**Known issues:**

* See `list of open issues`_.
Expand Down
11 changes: 10 additions & 1 deletion minimum-constraints-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ nocasedict==1.0.1
Click==8.0.2
click-spinner==0.1.8; python_version <= '3.11'
click-spinner==0.1.10; python_version >= '3.12'
click-repl==0.2

# TODO: The version specified in requirements.txt is a fork of
# click=repl. When that fork is integrated and a new version of click-repl
# is released that should be the new minimum because that fork changes the
# repl function interface by adding a new parameter that pywbemcli uses.
# Version 0.3.0 does not work for us because of issue #1441 so in requirements
# we are currently using a forked version of the click-repl master.
# Probably: click-repl==0.3.1
click-repl @ git+https://github.com/pywbem/click-repl.git@allow-general-options

asciitree==0.3.3
tabulate==0.8.2; python_version <= '3.9'
tabulate==0.8.8; python_version >= '3.10'
Expand Down
5 changes: 4 additions & 1 deletion pywbemtools/pywbemcli/pywbemcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,4 +1115,7 @@ def repl(ctx):
if USE_AUTOSUGGEST:
prompt_kwargs['auto_suggest'] = AutoSuggestFromHistory()

click_repl.repl(ctx, prompt_kwargs=prompt_kwargs)
# set option allow_general_options=True to enable use of general options
# in pywbemcli
click_repl.repl(ctx, prompt_kwargs=prompt_kwargs,
allow_general_options=True)
11 changes: 9 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ nocasedict>=1.0.1
Click>=8.0.2
click-spinner>=0.1.8; python_version <= '3.11'
click-spinner>=0.1.10; python_version >= '3.12'

# click-repl 0.2 is needed for compatibility with Click 8.0.
# click-repl version 3.0 causes test failures. See issue #1312
click-repl>=0.2,<0.3.0
# click-repl version 3.0 causes test failures. See issues #1312 and #1441
# Fix for click repl in forked repo issue #1441. Use our fork of click-repl
# below which fixes the issue defined in issue #1441
click-repl @ git+https://github.com/pywbem/click-repl.git@allow-general-options
# TODO: Update click-repl version when our changes accepted probably
# to click-repl>=0.3.1. When this changes, minimum-constraints-install.txt
# must also be updated

asciitree>=0.3.3
# tabulate 0.8.8 fixes ImportError on Python 3.10.
tabulate>=0.8.2; python_version <= '3.9'
Expand Down

0 comments on commit a4e9657

Please sign in to comment.