Skip to content

Commit

Permalink
update python version and add new bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Jan 9, 2021
1 parent fa6a652 commit f7bc346
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: python
python:
- "3.8"
- "3.9"
install:
- pip install -r requirements.txt
before_script:
Expand Down
6 changes: 3 additions & 3 deletions init/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
# All rights reserved.

declare -r minPVer=8
declare -r maxPVer=10
declare -r maxPVer=9

getPythonVersion() {
local -i count=$minPVer
local tmp
while true; do
tmp=$(python3.$count -V 2> /dev/null)
[[ -n $tmp || $count -gt $maxPVer ]] && break
count+=1
[[ -n $tmp || $count -gt $maxPVer ]] && break
done
declare -gr pVer=$(sed -E 's/Python (3\.[0-9]{1,2}\.[0-9]{1,2}).*/\1/g' <<< $tmp)
}
Expand Down Expand Up @@ -92,7 +92,7 @@ upgradePip() {
}

installReq() {
pip3 install --use-feature=2020-resolver -r $1/requirements.txt &> /dev/null
pip3 install --no-cache-dir -r $1/requirements.txt &> /dev/null
}

printLine() {
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ instaloader
motor
natsort
oauth2client
Pillow==7.1.0
Pillow==8.0
psutil
pybase64
pyrogram==1.1.6
pyrogram==1.1.9
pySmartDL
python-dotenv
pytz
Expand All @@ -38,4 +38,4 @@ tgcrypto
urbandict==0.5
wget
wikipedia
youtube_dl>=2020.09.20
youtube_dl>=2021.1.8
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.7
python-3.9.1
2 changes: 1 addition & 1 deletion userge/core/methods/utils/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ async def restart(self, update_req: bool = False) -> None: # pylint: disable=ar
print(_LOG_STR % c_e)
if update_req:
print(_LOG_STR % "Installing Requirements...")
os.system("pip3 install -U pip && pip3 install -r requirements.txt") # nosec
os.system("pip3 install -U pip && pip3 install --no-cache-dir -r requirements.txt") # nosec
os.execl(sys.executable, sys.executable, '-m', 'userge') # nosec
sys.exit()

0 comments on commit f7bc346

Please sign in to comment.