Skip to content

Commit 95ca54b

Browse files
committed
Fixing jsonpickle issue with Python 3.11
- Was causing POST requests to fail as commands weren't being saved correctly
1 parent be1c115 commit 95ca54b

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on: [push]
44

55
jobs:
66
build:
7+
# runs-on: ubuntu-latest
78
runs-on: ubuntu-latest
89
strategy:
910
matrix:
10-
python-version: ["3.10", "2.7"]
11+
python-version: ["3.11","3.7"]
1112

1213
env:
1314
functional_test: true

bashhub/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import platform
22

3-
__version__ = '2.4.0'
3+
__version__ = '2.4.1-dev'
44

55
version_str = 'Bashhub {0} (python {1})'.format(__version__, platform.python_version())

install-bashhub.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838

3939
PYTHON_VERSION_COMMAND='
4040
import sys
41-
if (3, 5, 0) < sys.version_info < (3, 12, 0):
41+
if (3, 6, 0) < sys.version_info < (3, 12, 0):
4242
sys.exit(0)
4343
elif (2, 7, 8) < sys.version_info < (3,0):
4444
sys.exit(0)
@@ -55,7 +55,6 @@ PYTHON_VERSION_ARRAY=(
5555
"python3.8"
5656
"python3.7"
5757
"python3.6"
58-
"python3.5"
5958
"python"
6059
"python2.7"
6160
"python27"
@@ -96,7 +95,7 @@ get_and_check_python_version() {
9695
download_and_install_env() {
9796
local python_command=$(get_and_check_python_version)
9897
if [[ -z "$python_command" ]]; then
99-
die "\n Sorry you need to have python 3.5-3.11 or 2.7.9+ installed. Please install it and rerun this script." 1
98+
die "\n Sorry you need to have python 3.6-3.11 or 2.7.9+ installed. Please install it and rerun this script." 1
10099
fi
101100

102101
# Set to whatever python interpreter you want for your first environment
@@ -115,7 +114,7 @@ download_and_install_env() {
115114

116115
check_dependencies() {
117116
if [ -z "$(get_and_check_python_version)" ]; then
118-
die "\n Sorry can't seem to find a version of python 3.5-3.11 or 2.7.9+ installed" 1
117+
die "\n Sorry can't seem to find a version of python 3.6-3.11 or 2.7.9+ installed" 1
119118
fi
120119

121120
if [ -z "$(detect_shell_type)" ]; then

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
packages=find_packages(),
1717
include_package_data=True,
1818
install_requires=[
19-
'requests==2.23.0', 'jsonpickle==2.0.0', 'click==6.7',
19+
'requests==2.23.0', 'jsonpickle==3.0.1', 'click==6.7',
2020
'npyscreen==4.10.5', 'python-dateutil==2.8.1',
2121
'pymongo==3.10.1', 'inflection==0.3.1', 'humanize==1.0.0',
2222
'future==0.18.3', 'mock==3.0.5'

tests/shell/install-bashhub.bats

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,26 @@ setup() {
2929
[[ $status == 0 ]]
3030
}
3131

32-
@test "get_and_check_python_version should find python3.10 first" {
32+
@test "get_and_check_python_version should find python3.11 first" {
3333
# Mock up some fake responses here.
3434
/usr/bin/python3() { return 1; }
3535
python3() { return 1; }
36-
python3.10() { return 0; }
36+
python3.11() { return 0; }
3737

3838
run 'get_and_check_python_version'
3939
[[ $status == 0 ]]
40-
[[ "$output" == "python3.10" ]]
40+
[[ "$output" == "python3.11" ]]
4141
}
4242

4343
@test "get_and_check_python_version should find different python versions" {
4444
# Mock up some fake responses here.
4545
/usr/bin/python3() { return 1; }
4646
python3() { return 1; }
47+
python3.11() { return 1; }
4748
python3.10() { return 1; }
4849
python3.9() { return 1; }
4950
python3.8() { return 1; }
5051
python3.7() { return 1; }
51-
python3.6() { return 1; }
52-
python3.5() { return 1; }
5352
python() { return 1;}
5453
python2.7() { return 0; }
5554

0 commit comments

Comments
 (0)