Closed Doogli closed 3 years ago
The F-String syntax was first introduced in Python 3.6. The fix is as simple as converting the f'{x}'
expressions into the '{}'.format(x)
style and make it compatible with Python 3.5 again.
I just released Tusker 0.2.3 which should now support Python < 3.6 as it uses .format()
instead of f-Strings:
Vielen Dank Michael!
From: "Michael P. Jung" notifications@github.com To: "bikeshedder/tusker" tusker@noreply.github.com Cc: "Doogli" doug.taylor@mweb.co.za, "Author" author@noreply.github.com Sent: Tuesday, October 13, 2020 3:44:52 PM Subject: Re: [bikeshedder/tusker] Syntax Error: dbname = f'{self.config.dbname}{now}{suffix}' (#5)
The F-String syntax was first introduced in Python 3.6. The fix is as simple as converting the f'{x}' expressions into the '{}'.format(x) style and make it compatible with Python 3.5 again.
— You are receiving this because you authored the thread. Reply to this email directly, [ https://github.com/bikeshedder/tusker/issues/5#issuecomment-707748852 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AA6R6QYM2E6LFT6FDUYQSB3SKRKVJANCNFSM4SL24R5Q | unsubscribe ] .
Hi Michael -
I'm having trouble getting tusker to work at all and I don't think it's a configuration thing. I'm running tusker in a docker container when my DB is installed:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support"
Firstly, when I run 'pip3 install tusker' I get version 0.1.2 installed, but I see you are on version 0.2.2. How can I force the latest version to be installed? I tried 'pip3 install --help' with nothing useful. The error I get looks like this:
tusker --version Traceback (most recent call last): File "/usr/local/bin/tusker", line 7, in
from tusker import main
File "/usr/local/lib/python3.5/dist-packages/tusker/init.py", line 38
dbname = f'{self.config.dbname}{now}{suffix}'
^
SyntaxError: invalid syntax
I can't imagine that creating a config file (which I have tried) is going to fix this. migrations folder exists.
cat tusker.toml
[schema] filename = "schema.sql"
[migrations] directory = "migrations"
[database] host = "localhost" port = 5432 user = "admin"
password = ""
dbname = "SMART_TEMP" schema = "public"
I think this may be my problem:
Your current user can connect to the database using a unix domain socket without a password - although I am user 'root'...
Any ideas? Doug Taylor