Package Details: mycli 1.25.0-1

Git Clone URL: https://aur.archlinux.org/mycli.git (read-only, click to copy)
Package Base: mycli
Description: A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting
Upstream URL: https://github.com/dbcli/mycli
Keywords: cli mariadb mysql
Licenses: BSD
Submitter: aabmass
Maintainer: loonies
Last Packager: loonies
Votes: 39
Popularity: 0.34
First Submitted: 2015-08-05 15:33 (UTC)
Last Updated: 2022-04-06 21:19 (UTC)

Pinned Comments

loonies commented on 2019-12-06 11:43 (UTC) (edited on 2019-12-10 07:36 (UTC) by loonies)

Prior to flagging the package out-of-date or reporting build errors please:

  • Make sure that your system is up-to-date (pacman -Syu)
  • Rebuild and reinstall dependencies (especially ones from AUR)
  • Rebuild and reinstall the package

Do not expect AUR packages to trigger rebuild or suggest bumping "pkgrel" number. This is expected behaviour and the way Arch packing is designed to work.

For more information read the official documentation and man pages.

Latest Comments

acidrain42 commented on 2022-06-01 22:27 (UTC) (edited on 2022-06-01 22:28 (UTC) by acidrain42)

Could you remove the tests folder (/usr/lib/python3.10/site-packages/test/) from the package?

loonies commented on 2022-05-24 18:44 (UTC)

@enkeyz - "python-cli_helpers" is in the community repository (https://archlinux.org/packages/community/any/python-cli_helpers/)

Install by executing "pacman -S python-cli_helpers"

enkeyz commented on 2022-05-09 12:43 (UTC)

Can't install, because python-cli_helpers is no longer available: https://aur.archlinux.org/packages/python-cli_helpers

ishaanbhimwal commented on 2022-04-05 15:26 (UTC)

@sp-merrow

File "/usr/lib/python3.10/site-packages/mycli/main.py", line 1057, in get_reserved_space _, height = click.get_terminal_size() AttributeError: module 'click' has no attribute 'get_terminal_size'

This was fixed recently. See https://github.com/dbcli/mycli/pull/1042. Consider replacing mycli with mycli-git available in the AUR.

sp-merrow commented on 2022-03-30 00:53 (UTC)

Crashes on startup. Gives the following traceback:

Traceback (most recent call last): File "/usr/bin/mycli", line 33, in <module> sys.exit(load_entry_point('mycli==1.24.3', 'console_scripts', 'mycli')()) File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(args, **kwargs) File "/usr/lib/python3.10/site-packages/mycli/main.py", line 1296, in cli mycli.run_cli() File "/usr/lib/python3.10/site-packages/mycli/main.py", line 808, in run_cli reserve_space_for_menu=self.get_reserved_space(), File "/usr/lib/python3.10/site-packages/mycli/main.py", line 1057, in get_reserved_space _, height = click.get_terminal_size() AttributeError: module 'click' has no attribute 'get_terminal_size'

My currently installed Python version is 3.10.4-1

SZanko commented on 2021-02-04 18:58 (UTC)

cli helpers package https://aur.archlinux.org/packages/python-cli_helpers/ was updated 4 days ago

loonies commented on 2021-01-24 17:37 (UTC)

Waiting for https://aur.archlinux.org/packages/python-cli_helpers/ (dependency) update.

SZanko commented on 2021-01-14 20:45 (UTC)

diff --git a/PKGBUILD b/PKGBUILD
index bcace65..6a01533 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
 # Maintainer: Miodrag Tokić
 # Contributor: Yuanji <self@gimo.me>
 # Contributor: Aaron Abbott <aabmass at gmail dot com>
+# Contributor: Stefan Zanko szanko at protonmail dot com

 pkgname=mycli
-pkgver=1.22.2
-pkgrel=2
+pkgver=1.23.0
+pkgrel=1
 pkgdesc='A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting'
 arch=('any')
 url='https://github.com/dbcli/mycli'
@@ -19,6 +20,7 @@ depends=(
     'python-pymysql'
     'python-sqlparse'
     'python-cli_helpers'
+       'python-pyperclip'
 )
 makedepends=('python-setuptools')
 optdepends=('python-paramiko: SSH support')
@@ -26,16 +28,16 @@ options=(!emptydirs)

 source=(
     "$pkgname-$pkgver.tar.gz::https://github.com/dbcli/mycli/archive/v${pkgver}.tar.gz"
-    "completion_engine.py.patch"
+    #"completion_engine.py.patch"
 )
 sha256sums=(
-    '4427442cf3e66ebbbb480bc5112bdf7e0432c70645f320313e2e0dbf0ae147fb'
-    '33f3e60abfe68bc7375dacead9676b3cc4920e1d16c7b57dcf5f474c0c3e6aad'
+    '8c2efa716f994ac0ffb9e21da59c4696754b201d823b61cd63f2948c1bbd702c'
+    #'33f3e60abfe68bc7375dacead9676b3cc4920e1d16c7b57dcf5f474c0c3e6aad'
 )

 prepare() {
     cd "$srcdir/$pkgname-$pkgver"
-    patch -N -p1 -i "$srcdir/completion_engine.py.patch"
+    #patch -N -p1 -i "$srcdir/completion_engine.py.patch"
 }

 build() {

loonies commented on 2020-10-24 21:16 (UTC)

sqlparse 4.0 compatibility fixed. Thanks @mtorromeo

cmonkey commented on 2020-10-10 02:10 (UTC)

mycli -P 3306 -u root -h 127.0.0.1
Traceback (most recent call last):
File "/bin/mycli", line 33, in <module>
sys.exit(load_entry_point('mycli==1.22.1', 'console_scripts', 'mycli')())
File "/bin/mycli", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib/python3.8/site-packages/mycli/main.py", line 39, in <module>
from .sqlcompleter import SQLCompleter
File "/usr/lib/python3.8/site-packages/mycli/sqlcompleter.py", line 7, in <module>
from .packages.completion_engine import suggest_type
File "/usr/lib/python3.8/site-packages/mycli/packages/completion_engine.py", line 5, in <module>
from sqlparse.compat import text_type ModuleNotFoundError: No module named 'sqlparse.compat'

mycli 1.22.1-1

mtorromeo commented on 2020-10-08 08:09 (UTC)

I've opened a pull request upstream to fix the incompatibility with sqlparse 0.4, you might want to backport the patch: https://patch-diff.githubusercontent.com/raw/dbcli/mycli/pull/900.patch

tyjak commented on 2020-09-17 11:02 (UTC)

I had to rm -rf /usr/lib/python3.8/site-packages/test due to a conflict with mycli package that installed also a test folder in site-packages...

mgrimes commented on 2020-07-22 16:02 (UTC)

It seems mycli isn't compatible with pymysql v0.10.0. Needs the following patch:

diff -aur a/sqlexecute.py b/sqlexecute.py
--- a/sqlexecute.py     2020-07-22 12:01:23.355002581 -0400
+++ b/sqlexecute.py     2020-07-22 11:59:50.394800925 -0400
@@ -3,7 +3,7 @@
 import sqlparse
 from .packages import special
 from pymysql.constants import FIELD_TYPE
-from pymysql.converters import (convert_mysql_datetime, convert_datetime,
+from pymysql.converters import (convert_datetime,
                                 convert_timedelta, convert_date, conversions,
                                 decoders)
 try:
@@ -99,7 +99,7 @@
         )
         conv = conversions.copy()
         conv.update({
-            FIELD_TYPE.TIMESTAMP: lambda obj: (convert_mysql_datetime(obj) or obj),
+            FIELD_TYPE.TIMESTAMP: lambda obj: (convert_datetime(obj) or obj),
             FIELD_TYPE.DATETIME: lambda obj: (convert_datetime(obj) or obj),
             FIELD_TYPE.TIME: lambda obj: (convert_timedelta(obj) or obj),
             FIELD_TYPE.DATE: lambda obj: (convert_date(obj) or obj),

mercutio commented on 2020-04-29 10:52 (UTC)

I patched the setup.py to allow for prompt_toolkit 3, the library seems to be compatible with that version without an issue: https://gist.github.com/mercutiodesign/8b341a5ca955d62bcb69ce21274f9e23

Chacal_E commented on 2020-04-29 01:19 (UTC) (edited on 2020-04-29 01:23 (UTC) by Chacal_E)

for those with difficulties, you can download python-prompt_toolkit-2.0.9-1-any.pkg.tar.xz from https://archive.archlinux.org/packages/p/python-prompt_toolkit/ and then use the command pacman -U python-prompt_toolkit-2.0.9-1-any.pkg.tar.xz as root.

note: when upgrading programs, if you update python-prompt_toolkit, you have to downgrade again.

lotia commented on 2020-04-28 17:01 (UTC)

Thanks for maintaining this package.

Currently, the installation of 1.21.1-1 is failing with the following error:

==> Error: Could not find all required packages:
    python-prompt_toolkit<3.0.0 (Wanted by: mycli)

loonies commented on 2019-12-06 11:43 (UTC) (edited on 2019-12-10 07:36 (UTC) by loonies)

Prior to flagging the package out-of-date or reporting build errors please:

  • Make sure that your system is up-to-date (pacman -Syu)
  • Rebuild and reinstall dependencies (especially ones from AUR)
  • Rebuild and reinstall the package

Do not expect AUR packages to trigger rebuild or suggest bumping "pkgrel" number. This is expected behaviour and the way Arch packing is designed to work.

For more information read the official documentation and man pages.

loonies commented on 2019-12-06 11:42 (UTC)

@deconf Sorry for late response. Try to rebuild python-cli_helpers, python-pymysql, and mycli. This was the minimum required for my mycli installation to start working again after Python 3.8 upgrade.

ccxex29 commented on 2019-12-04 12:16 (UTC)

@deconf I had this problem as well. This is a known problem with AUR updates. If what the python said is sqlparse, then take a look at the dependency list. There is python-sqlparse. Since this is also an AUR package, you need to clean install python-sqlparse.

deconf commented on 2019-11-28 09:54 (UTC)

@loonies Of course, below is my error message using mycli

pkg_resources.Context ual Version Conflict:
 (sqlparse 0.2.4 (/usr/lib/python3.8/site-packages), Requirement.parse('sqlparse<0.4.0,>=0.3.0'), {'mycli'})

pkg_resources.DistributionNotFound: The 'sqlparse<0.4.0,>=0.3.0' distribution was not found and is required by mycli

loonies commented on 2019-11-27 18:06 (UTC)

@deconf Can you be more specific?

deconf commented on 2019-11-27 11:17 (UTC)

@loonies How do I fix if the upgrade breaks dependencies?

loonies commented on 2019-09-03 17:50 (UTC)

Both, mycli 1.20.0 and 1.20.1 depend on python-sqlparse >=0.3.0,<0.4.0

At the time of writing python-sqlparse version is 0.3.0 and given Arch Linux is a rolling release distribution it is expected that the system has the latest packages installed, therefore there is no need to specify dependent package version if already satisfied. Arch Linux users are required to upgrade dependencies prior to upgrading the package. Version pinning is used if dependency upgrade breaks a package.

I have no idea why python-sqlparse-0_3_0 exists in AUR if there is already a package in community repository.

References:

keevitaja commented on 2019-09-03 11:32 (UTC)

mycli 1.20 requires sqlparse<0.4.0,>=0.3.0

you can find it also in aur: python-sqlparse-0_3_0

loonies commented on 2018-12-17 21:59 (UTC)

Added, thanks!

yuanji commented on 2018-12-11 14:22 (UTC) (edited on 2018-12-11 14:24 (UTC) by yuanji)

python-paramiko should be in optdepends that can support ssh function.

https://gist.github.com/masakichi/62bf9e7aa33d2d2fd9d51d01ece97ccb

ref: https://github.com/dbcli/mycli/blob/master/setup.py#L109

emersonmx commented on 2018-10-19 15:55 (UTC)

Conflict with prompt_toolkit-2 fixed in merged PR (https://github.com/dbcli/mycli/pull/633). Waiting for next release to use this package :b

loonies commented on 2017-08-27 17:00 (UTC)

Arch Linux users are are required to upgrade dependencies prior to upgrading a package. Version pinning is used if dependency upgrade breaks the package.

mgrimes commented on 2017-08-22 15:25 (UTC)

This version requires cli_helpers v0.2.3. I've flagged python-cli_helpers as out of date and submitted a patch, but it would be good to add that version requirement to mycli to avoid a passing install but broken tool, and to ensure cli_helpers is upgraded when the new version is available. Patch: - 'python-cli_helpers' + 'python-cli_helpers>=0.2.3'

acidrain42 commented on 2017-08-07 15:40 (UTC)

Here's an updated PKGBUILD for mycli-1.12.0 https://gist.github.com/acidrain42/45be445cec1e9bdd3ef97315fcf4e7c2

commented on 2017-06-07 02:53 (UTC)

:: python-pycryptodome y python-crypto están en conflicto. ¿Quitar python-crypto? [s/N] error: se han detectado paquetes con conflictos irresolubles error: no se pudo preparar la operación (dependencias en conflicto) :: python-pycryptodome y python-crypto están en conflicto

commented on 2017-06-07 02:51 (UTC)

:: python-pycryptodome y python-crypto están en conflicto. ¿Quitar python-crypto? [s/N]

aabmass commented on 2016-08-07 14:57 (UTC)

So mycli 0.8.0 depends on sqlparse 0.1.19: https://github.com/dbcli/mycli/issues/304 I'll make a quick AUR package for that pinned version.

aabmass commented on 2016-02-01 16:19 (UTC)

@loonies thanks, I added it in

loonies commented on 2016-01-25 13:36 (UTC)

python-crypto dependency is missing

aabmass commented on 2016-01-23 20:38 (UTC)

Sorry for the slow update. Updated to 1.5.2. The dev for mycli has prompt_toolkit up to the version in the AUR, so no issues anymore!

commented on 2015-12-18 15:51 (UTC)

I did, this way: 1. download snapshot python-prompt_toolkit 0.54-1 2. edit PKGBUILD - set version to 0.46 4. then run makepkg --skipinteg 5. install generated package with pacman -U 5. install mycli

aabmass commented on 2015-12-08 01:11 (UTC)

Not really sure how to handle this, prompt_toolkit 0.54 completely breaks this package. Any ideas?

aabmass commented on 2015-12-08 00:18 (UTC)

@lenin, unfortunately, the mycli devs say that prompt-toolkit has to stay at 0.46 (https://github.com/dbcli/mycli/issues/204). Let me see what I can do, though

lenin commented on 2015-12-02 06:21 (UTC)

After installing, simply run mycli will complain this error: Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 658, in _build_master ws.require(__requires__) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 959, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 851, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (prompt-toolkit 0.54 (/usr/lib/python3.5/site-packages), Requirement.parse('prompt-toolkit==0.46'), {'mycli'}) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/mycli", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3143, in <module> @_call_aside File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3129, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3156, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 660, in _build_master return cls._build_from_requirements(__requires__) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 673, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 846, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'prompt-toolkit==0.46' distribution was not found and is required by mycli

aabmass commented on 2015-08-24 16:51 (UTC)

I filed requests to delete python*-mycli packages. Sorry for the confusion to the moderators! This package should NOT be deleted anymore.

aabmass commented on 2015-08-24 16:06 (UTC)

@carlgeorge yes, I actually submitted this issue on github (https://github.com/dbcli/mycli/issues/134) and the dev changed the sqlparse requirement in response. It looks like arch's sqlparse is up to 0.1.16 and a new mycli release hit pypi today (1.4.0). I'll upgrade this package. I also asked the dev about the prompt_toolkit==0.46 frozen dependency and he said that one can't be changed. Check out what he said, maybe you have a solution that works for everyone: https://github.com/dbcli/mycli/issues/134. The aur/python-prompt_toolkit version is currently at 0.46-1 but it's flagged out of date, so this will probably break soon. Thank you for the advice!

commented on 2015-08-20 00:44 (UTC)

I don't use this package personally, but another user mistakenly reported an error on my python-click package. mycli 1.3.0 requires sqlparse 0.1.14 _exactly_. https://github.com/dbcli/mycli/blob/v1.3.0/setup.py#L30 The arch package python-sqlparse in community is currently at 0.1.15, so this is broken. This has already been fixed in the mycli codebase, but it was fixed after the v1.3.0 tag. Additionally, it was fixed by requiring 0.1.16 or greater, which hasn't been released on Arch yet. https://github.com/dbcli/mycli/commit/ff5649792babaaa90cd72f76132bbd0fb16ae387 Long term fix: * python-sqlparse is updated to 0.1.16. * mycli releases a new version that contains the above commit, and you update your package to that version. Short term fix: * Create a patch that modifies the requirements in setup.py to 'sqlparse >= 0.1.15'. * Remove the patch once mycli releases a new version. Hope this helps, if you have further questions or need help creating the patch, just ask!

commented on 2015-08-20 00:28 (UTC)

@aabmass You were on the right track with those python packaging guidelines. You need to keep the "mycli" package and remove the python- and python2- variants. @gsingh93 is totally off base with that error, and I would bet money that a python2-mycli package will not fix his issue. @gsingh93 The error you saw has nothing to do with setting python2 as the default (which is an incredibly bad thing to do to your system). The packages python-configobj and python2-configobj are from the same PKGBUILD, so both packages have the same version number. To that point, those packages were updated to 5.0.6 last year. https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/python-configobj&id=c8aa3ffe341e74d13c25ce29c142aaef5d05a738 This lead me to believe one of to things has happened. 1) You haven't updated python2-configobj since before 5.0.6 was released. 2) You installed configobj with pip instead of using pacman. Since you are willing to change /usr/bin/python to python2, I'm guessing you probably went with the pip option. Feel free to break your own system however you want to, but don't use it as justification to have other package maintainers go against Arch packaging standards.

aabmass commented on 2015-08-17 15:32 (UTC)

Alright, I renamed this package to python-mycli and am waiting for a mod to delete this package. I also made a python2-mycli package.

aabmass commented on 2015-08-17 07:05 (UTC)

I'd like to add a python 2 package, but I'm not really sure what to name it. I didn't call this one 'python-mycli' because it's probably not being used as a library. See https://wiki.archlinux.org/index.php/Python_package_guidelines. Any ideas?

gsingh93 commented on 2015-08-13 20:33 (UTC)

Regarding my last comment, it's probably because I have python2 as the default. This package probably works fine if python3 is the default. Could you add a separate python2 package as well?

gsingh93 commented on 2015-08-13 20:25 (UTC)

After installing and running `mycli`, I get the following error: Traceback (most recent call last): File "/usr/bin/mycli", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3084, in <module> @_call_aside File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 651, in _build_master ws.require(__requires__) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 952, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'configobj>=5.0.6' distribution was not found and is required by mycli