Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgcli: 2.0.0 -> 2.0.1 #51269

Closed
wants to merge 2 commits into from
Closed

Conversation

aneeshusa
Copy link
Contributor

Motivation for this change

Changelog: https://github.com/dbcli/pgcli/blob/master/changelog.rst#201
Major feature of note is Python 3.7 support.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Changelog: https://github.com/dbcli/pgcli/blob/master/changelog.rst#201
Major feature of note is Python 3.7 support.
@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: pgcli

Partial log (click to expand)

Requirement already satisfied: click>=4.1 in /nix/store/a96r9bi9nvnakpvqd70pspxwgj37585y-python2.7-click-6.7/lib/python2.7/site-packages (from pgcli==2.0.1) (6.7)
Requirement already satisfied: Pygments>=2.0 in /nix/store/h64i90whva4pjmfwnhkjwcfrzn1gky2r-python2.7-Pygments-2.2.0/lib/python2.7/site-packages (from pgcli==2.0.1) (2.2.0)
Requirement already satisfied: humanize>=0.5.1 in /nix/store/2gv3j1y4wiagpp0kjgsjfyr5b9mzgsmq-python2.7-humanize-0.5.1/lib/python2.7/site-packages (from pgcli==2.0.1) (0.5.1)
Requirement already satisfied: pgspecial>=1.11.2 in /nix/store/76q0by296l5h0b8jkrdk6yldwc290ah3-python2.7-pgspecial-1.11.2/lib/python2.7/site-packages (from pgcli==2.0.1) (1.11.2)
Requirement already satisfied: cli-helpers[styles]>=1.0.1 in /nix/store/d38aj3bsqyvcw10hymbbk3wdbgf14wl3-python2.7-cli_helpers-1.0.2/lib/python2.7/site-packages (from pgcli==2.0.1) (1.0.2)
Collecting prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
  Could not find a version that satisfies the requirement prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1) (from versions: )
No matching distribution found for prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
builder for '/nix/store/bdhpziipy0939srrp6bn4md0iwm34czn-pgcli-2.0.1.drv' failed with exit code 1
error: build of '/nix/store/bdhpziipy0939srrp6bn4md0iwm34czn-pgcli-2.0.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: pgcli

Partial log (click to expand)

adding 'pgcli-2.0.1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
installing
/build/pgcli-2.0.1/dist /build/pgcli-2.0.1
Processing ./pgcli-2.0.1-py2-none-any.whl
Collecting prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
  Could not find a version that satisfies the requirement prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1) (from versions: )
No matching distribution found for prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
builder for '/nix/store/l4g7vl74zixpmfqvx7vknswzdlrpkvph-pgcli-2.0.1.drv' failed with exit code 1
error: build of '/nix/store/l4g7vl74zixpmfqvx7vknswzdlrpkvph-pgcli-2.0.1.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pgcli

Partial log (click to expand)

Requirement already satisfied: sqlparse<0.3.0,>=0.2.2 in /nix/store/ii7f3lwzgj8ywx28s21kczbamfwryi6s-python2.7-sqlparse-0.2.2/lib/python2.7/site-packages (from pgcli==2.0.1) (0.2.2)
Requirement already satisfied: psycopg2<2.8,>=2.7.4 in /nix/store/v2979p76imkk5ms1x5krnrz4r4g7xy4x-python2.7-psycopg2-2.7.5/lib/python2.7/site-packages (from pgcli==2.0.1) (2.7.5)
Requirement already satisfied: click>=4.1 in /nix/store/drshq8f2q8qh0x372fi2g40h6jcfg6kz-python2.7-click-6.7/lib/python2.7/site-packages (from pgcli==2.0.1) (6.7)
Requirement already satisfied: cli-helpers[styles]>=1.0.1 in /nix/store/aablxxrfsq0n2b0lcy8m6zf5nzhpfbi1-python2.7-cli_helpers-1.0.2/lib/python2.7/site-packages (from pgcli==2.0.1) (1.0.2)
Requirement already satisfied: pgspecial>=1.11.2 in /nix/store/8l329szrwf7ada82r7ay1gmimv5nx57i-python2.7-pgspecial-1.11.2/lib/python2.7/site-packages (from pgcli==2.0.1) (1.11.2)
Collecting prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
  Could not find a version that satisfies the requirement prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1) (from versions: )
No matching distribution found for prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)
builder for '/nix/store/8sgah66qx83w25dn5l2vk7i8wsbmdxs1-pgcli-2.0.1.drv' failed with exit code 1
error: build of '/nix/store/8sgah66qx83w25dn5l2vk7i8wsbmdxs1-pgcli-2.0.1.drv' failed

@worldofpeace
Copy link
Contributor

@aneeshusa Build fails with:

  Could not find a version that satisfies the requirement prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1) (from versions: )
No matching distribution found for prompt-toolkit<2.1.0,>=2.0.6 (from pgcli==2.0.1)

@aneeshusa
Copy link
Contributor Author

@worldofpeace looks like there was an issue due to nixpkgs still being python2 by default, I have python3 by default and had no issues. Pushed a commit to pin to Python 3 which I've tested locally.

@worldofpeace
Copy link
Contributor

worldofpeace commented Dec 1, 2018

@worldofpeace looks like there was an issue due to nixpkgs still being python2 by default, I have python3 by default and had no issues. Pushed a commit to pin to Python 3 which I've tested locally.

But this leaves the python 2 build broken.

If I'm understanding this correctly, applications for both interpreter versions want to migrate to prompt_toolkit v2+. Yet some had no plans to.

It seems things were correct and allowed migration until f0b49c4#diff-2afbba83e1b14f9e0c304c769831a0e2 hit.

@FRidh I feel like that should be reverted.

On Python 2 nixpkgs uses the older prompt_toolkit 1.x line
instead of the latest 2.x line.
The 1.x line is no longer developed
and isn't listed as supporting Python 3.6 or above.

Since this is an application, always use Python 3.
@aneeshusa
Copy link
Contributor Author

Since this is an application and not a library, I think it's fine to not have a Python 2 build. Personally, I'm also not interested in spending time on Python 2 support since it's 2018.

Agreed that f0b49c4 seems strange and I'd want to revert it, but maybe there was a good reason for it.

@worldofpeace
Copy link
Contributor

I get this traceback when trying to execute on NixOS:

Click to expand
Traceback (most recent call last):
  File "/nix/store/3dqdjjh1n521q2qmrnah6graa5p5m1ay-pgcli-2.0.1/bin/.pgcli-wrapped", line 12, in <module>
    sys.exit(cli())
  File "/nix/store/przda61d8fq6dgw4l3bqb05ica0jmibg-python3.7-click-6.7/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/przda61d8fq6dgw4l3bqb05ica0jmibg-python3.7-click-6.7/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/nix/store/przda61d8fq6dgw4l3bqb05ica0jmibg-python3.7-click-6.7/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nix/store/przda61d8fq6dgw4l3bqb05ica0jmibg-python3.7-click-6.7/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/nix/store/3dqdjjh1n521q2qmrnah6graa5p5m1ay-pgcli-2.0.1/lib/python3.7/site-packages/pgcli/main.py", line 1046, in cli
    pgcli.connect(database, host, user, port)
  File "/nix/store/3dqdjjh1n521q2qmrnah6graa5p5m1ay-pgcli-2.0.1/lib/python3.7/site-packages/pgcli/main.py", line 434, in connect
    passwd = keyring.get_password('pgcli', key)
  File "/nix/store/50h6i4gf9s7ai27a3wavbjpvq8ihljda-python3.7-keyring-13.2.1/lib/python3.7/site-packages/keyring/core.py", line 41, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/nix/store/50h6i4gf9s7ai27a3wavbjpvq8ihljda-python3.7-keyring-13.2.1/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 67, in get_password
    collection = self.get_preferred_collection()
  File "/nix/store/50h6i4gf9s7ai27a3wavbjpvq8ihljda-python3.7-keyring-13.2.1/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 59, in get_preferred_collection
    collection.unlock()
  File "/nix/store/ajz7wmb8xpd1dqnw8xprf6322r1mqlab-python3.7-secretstorage-2.3.1/lib/python3.7/site-packages/secretstorage/collection.py", line 63, in unlock
    return unlock_objects(self.bus, [self.collection_path], callback)
  File "/nix/store/ajz7wmb8xpd1dqnw8xprf6322r1mqlab-python3.7-secretstorage-2.3.1/lib/python3.7/site-packages/secretstorage/util.py", line 168, in unlock_objects
    return exec_prompt_glib(bus, prompt)[0]
  File "/nix/store/ajz7wmb8xpd1dqnw8xprf6322r1mqlab-python3.7-secretstorage-2.3.1/lib/python3.7/site-packages/secretstorage/util.py", line 127, in exec_prompt_glib
    from gi.repository import GLib
ModuleNotFoundError: No module named 'gi'

Copy link
Contributor

@jokogr jokogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with having pgcli in Python 3 only. It works here...

@jokogr
Copy link
Contributor

jokogr commented Dec 6, 2018

@worldofpeace could you write how you run the command so that we could reproduce the traceback?

@worldofpeace
Copy link
Contributor

@worldofpeace could you write how you run the command so that we could reproduce the traceback?

I simply executed it with no arguments.

@Mic92
Copy link
Member

Mic92 commented Dec 7, 2018

secretstorage should depend pygobject3 to solve the issue worldofpeace has.

@worldofpeace
Copy link
Contributor

Merged in 3dbbd9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants