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: 4.0.1 -> 4.1.0 #319650

Merged
merged 1 commit into from
Jun 20, 2024
Merged

pgcli: 4.0.1 -> 4.1.0 #319650

merged 1 commit into from
Jun 20, 2024

Conversation

dbalan
Copy link
Contributor

@dbalan dbalan commented Jun 13, 2024

Description of changes

  • Migrate to pyproject to build the python package.
  • Bump the version to 4.1.0 changelog.
  • Disables a broken test checking a feature to pass application name via cli and environment variables, but the feature works as intended (see details)
$ PGAPPNAME=app_name_env ./result/bin/pgcli -h 127.0.0.1 -U postgres  
Server: PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1)
Version: 4.1.0
Home: http:https://pgcli.com
[email protected]:postgres> select current_setting('application_name');
+-----------------+
| current_setting |
|-----------------|
| app_name_env    |
+-----------------+
SELECT 1
Time: 0.007s
[email protected]:postgres>                                                                                                   
Goodbye!
$ ./result/bin/pgcli --application-name app_name_cli -h 127.0.0.1 -U postgres 
Server: PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1)
Version: 4.1.0
Home: http:https://pgcli.com
[email protected]:postgres> select current_setting('application_name');
+-----------------+
| current_setting |
|-----------------|
| app_name_cli    |
+-----------------+
SELECT 1
Time: 0.010s
[email protected]:postgres>

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot requested a review from SuperSandro2000 June 18, 2024 15:37
@teto
Copy link
Member

teto commented Jun 19, 2024

Result of nixpkgs-review pr 319650 run on x86_64-linux 1

6 packages built:
  • azure-cli-extensions.rdbms-connect
  • azure-cli-extensions.rdbms-connect.dist
  • pgcli (python311Packages.pgcli)
  • pgcli.dist (python311Packages.pgcli.dist)
  • python312Packages.pgcli
  • python312Packages.pgcli.dist

@teto
Copy link
Member

teto commented Jun 19, 2024

On startup I got

$ pgcli 
Traceback (most recent call last):
  File "/nix/store/6nlpak4sdc7hrsnwhssg65hfkkd61mpa-python3.11-pgcli-4.1.0/bin/.pgcli-wrapped", line 6, in <module>
    from pgcli.main import cli
  File "/nix/store/hb3w0xhsji3q6rv64yvg0m4wmrfhcsyn-python3.12-pgcli-4.1.0/lib/python3.12/site-packages/pgcli/main.py", line 2, in <module>
    from pgspecial.namedqueries import NamedQueries
  File "/nix/store/w2i5qp0mlvi0flkfr4vl0q1yksg13dd4-python3.12-pgspecial-2.1.2/lib/python3.12/site-packages/pgspecial/__init__.py", line 12, in <module>
    from . import dbcommands, iocommands
  File "/nix/store/w2i5qp0mlvi0flkfr4vl0q1yksg13dd4-python3.12-pgspecial-2.1.2/lib/python3.12/site-packages/pgspecial/dbcommands.py", line 7, in <module>
    from psycopg.sql import SQL
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/__init__.py", line 9, in <module>
    from . import pq  # noqa: F401 import early to stabilize side effects
    ^^^^^^^^^^^^^^^^
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 114, in <module>
    import_from_libpq()
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 94, in import_from_libpq
    __impl__ = module.__impl__
               ^^^^^^^^^^^^^^^
AttributeError: module 'psycopg_c.pq' has no attribute '__impl__'

@dbalan
Copy link
Contributor Author

dbalan commented Jun 20, 2024

I'm not sure whats going on here, psycopg import seems to be broken the nixpkgs-review environment

python
Python 3.11.9 (main, Apr  2 2024, 08:25:04) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/__init__.py", line 9, in <module>
    from . import pq  # noqa: F401 import early to stabilize side effects
    ^^^^^^^^^^^^^^^^
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 114, in <module>
    import_from_libpq()
  File "/nix/store/a5w36hn9fnvwfbhh2p4xjs1iqpkqcala-python3.12-psycopg-3.1.17/lib/python3.12/site-packages/psycopg/pq/__init__.py", line 94, in import_from_libpq
    __impl__ = module.__impl__
               ^^^^^^^^^^^^^^^
AttributeError: module 'psycopg_c.pq' has no attribute '__impl__'
>>> 

@SuperSandro2000
Copy link
Member

I'm not sure whats going on here, psycopg import seems to be broken the nixpkgs-review environment

That is known to be broken for python packages. Works outside as expected.

@ofborg ofborg bot requested a review from SuperSandro2000 June 20, 2024 15:51
@SuperSandro2000 SuperSandro2000 merged commit 7963fbe into NixOS:master Jun 20, 2024
22 of 24 checks passed
wattmto-nixpkgs-automation bot pushed a commit to wattmto/nixpkgs that referenced this pull request Jun 21, 2024
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

3 participants