Bug 238182 - databases/py-pgcli: Requires sqlparse<0.3.0,>=0.2.2, RUN_DEPENDS on database/sqlparse (0.3.0)
Summary: databases/py-pgcli: Requires sqlparse<0.3.0,>=0.2.2, RUN_DEPENDS on database/...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kubilay Kocak
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-05-28 06:29 UTC by Marcin Cieślak
Modified: 2019-05-28 08:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2019-05-28 06:29:27 UTC
py36-pgcli 0.2.1 installed via pkg raises the following exceptions on startup:

    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (sqlparse 0.3.0 (/usr/local/lib/python3.6/site-packages), Requirement.parse('sqlparse<0.3.0,>=0.2.2'), {'pgcli'})


    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'sqlparse<0.3.0,>=0.2.2' distribution was not found and is required by pgcli

py36-sqlparse-0.3.0_1 is installed, the only other option is py36-sqlparse020-0.2.0_1 which is not right either.

Either the requirement should be relaxed or we need sqlparse022 :(
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-28 06:39:10 UTC
Upstream upgraded to sqlparse 0.3.0 22 days ago: 

https://github.com/dbcli/pgcli/pull/1052

This needs to be backported

See Also:

https://github.com/dbcli/pgcli/issues/1033
https://github.com/dbcli/pgcli/pull/1047 (original PR, relaxing dependency)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-28 07:00:29 UTC
Adding QA support to the port (TEST_DEPENDS/test target), results in the following, against sqlparse 0.3.0:

49 failed, 2404 passed, 103 skipped, 1 xfailed, 1 xpassed in 105.82 seconds
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-28 07:40:50 UTC
After backporting PR 2052:

2 failed, 2451 passed, 103 skipped, 1 xfailed, 1 xpassed in 91.24 seconds

I'll commit the following shortly:

- TEST_DEPENDS/test target
- Declare max pinned versions for dependencies (catch this in future during QA)
- Backport PR 1052
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-05-28 08:56:37 UTC
A commit references this bug:

Author: koobs
Date: Tue May 28 08:55:50 UTC 2019
New revision: 502867
URL: https://svnweb.freebsd.org/changeset/ports/502867

Log:
  databases/py-pgcli: Fix runtime dependency failures

  pgcli depends on sqlparse<0.3.0,>=0.2.2, and sqlparse was updated to 0.3.0
  in ports r495481.

  pgcli depends on psycopg2>=2.7.4,<2.8, and psycopg2 was updated to 2.8.2
  in ports r502646.

  These broke run time, with the following error(s)

    raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'sqlparse<0.3.0,>=0.2.2' distribution was not found and is required by pgcli

    raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'psycopg2>=2.7.4,<2.8' distribution was not found and is required by pgcli

  Upstream upgraded sqlparse support to include 0.3.0 in PR #1052 [1], this
  change backports that PR accordingly.

  Upstream has an open PR to unpin psycopg2 [2][3] but it needs to be updated
  to use psycopg2 (not psycopg2-binary) in install_requires.

  This change patches out the psycopg2 max version. The test results shows
  no test failure delta with 2.8.2 over 2.7.7 (the version before ports
  r502646).

  While I'm here:

    - Declare pinned (maximum) RUN_DEPENDS versions according to setup.py
      to pick these issues up earlier during QA (max versions not being
      satisfied will error out during dependency builds/verification
      pre-commit

  [1] https://github.com/dbcli/pgcli/pull/1052
  [2] https://github.com/dbcli/pgcli/pull/1059
  [3] https://github.com/dbcli/pgcli/issues/1036

  PR:		238182
  Reported by:	Marcin Cie?lak <saper saper info>
  Approved by:	portmgr (blanket: run time fix, just fix it)

Changes:
  head/databases/py-pgcli/Makefile
  head/databases/py-pgcli/files/
  head/databases/py-pgcli/files/patch-PR1052
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-28 08:58:44 UTC
Committed, thank you for the report Marcin!