From d3e59373610389ff65ff025231c70695362b09dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 25 Sep 2021 22:07:58 +0200 Subject: [PATCH] python3Packages.imdbpy: remove patch --- .../python-modules/imdbpy/default.nix | 25 ++++++++---- .../python-modules/imdbpy/sql_error.patch | 39 ------------------- 2 files changed, 17 insertions(+), 47 deletions(-) delete mode 100644 pkgs/development/python-modules/imdbpy/sql_error.patch diff --git a/pkgs/development/python-modules/imdbpy/default.nix b/pkgs/development/python-modules/imdbpy/default.nix index ab7575f99be8..ab4d2a5ce0c1 100644 --- a/pkgs/development/python-modules/imdbpy/default.nix +++ b/pkgs/development/python-modules/imdbpy/default.nix @@ -1,25 +1,34 @@ -{ lib, buildPythonPackage, fetchPypi, lxml, sqlalchemy }: +{ lib +, buildPythonPackage +, fetchPypi +, lxml +, sqlalchemy +}: buildPythonPackage rec { - pname = "IMDbPY"; + pname = "imdbpy"; version = "2021.4.18"; src = fetchPypi { - inherit pname version; + pname = "IMDbPY"; + inherit version; sha256 = "af57f03638ba3b8ab3d696bfef0eeaf6414385c85f09260aba0a16b32174853f"; }; - patches = [ ./sql_error.patch ]; # Already fixed in master, but not yet in the current release. This can be removed upon the next version update + propagatedBuildInputs = [ + lxml + sqlalchemy + ]; - propagatedBuildInputs = [ lxml sqlalchemy ]; + # Tests require networking, and https://github.com/alberanid/imdbpy/issues/240 + doCheck = false; - doCheck = false; # Tests require networking, and https://github.com/alberanid/imdbpy/issues/240 pythonImportsCheck = [ "imdb" ]; meta = with lib; { + description = "Python package for retrieving and managing the data of the IMDb database"; homepage = "https://imdbpy.github.io/"; - description = "A Python package for retrieving and managing the data of the IMDb database"; - maintainers = [ maintainers.ivar ]; license = licenses.gpl2Only; + maintainers = with maintainers; [ ivar ]; }; } diff --git a/pkgs/development/python-modules/imdbpy/sql_error.patch b/pkgs/development/python-modules/imdbpy/sql_error.patch deleted file mode 100644 index 10770f4f1135..000000000000 --- a/pkgs/development/python-modules/imdbpy/sql_error.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/imdb/parser/sql/__init__.py b/imdb/parser/sql/__init__.py -index cd4a3e3..3fcfdd4 100644 ---- a/imdb/parser/sql/__init__.py -+++ b/imdb/parser/sql/__init__.py -@@ -557,7 +557,6 @@ class IMDbSqlAccessSystem(IMDbBase): - """The class used to access IMDb's data through a SQL database.""" - - accessSystem = 'sql' -- _sql_logger = logging.getLogger('imdbpy.parser.sql') - - def __init__(self, uri, adultSearch=True, *arguments, **keywords): - """Initialize the access system.""" -@@ -582,7 +581,7 @@ class IMDbSqlAccessSystem(IMDbBase): - except ImportError as e: - raise IMDbError('unable to import SQLAlchemy') - # Set the connection to the database. -- self._sql_logger.debug('connecting to %s', uri) -+ logger.debug('connecting to %s', uri) - try: - self._connection = setConnection(uri, DB_TABLES) - except AssertionError as e: -@@ -593,7 +592,7 @@ class IMDbSqlAccessSystem(IMDbBase): - # Maps some IDs to the corresponding strings. - self._kind = {} - self._kindRev = {} -- self._sql_logger.debug('reading constants from the database') -+ logger.debug('reading constants from the database') - try: - for kt in KindType.select(): - self._kind[kt.id] = kt.kind -@@ -1616,7 +1615,7 @@ class IMDbSqlAccessSystem(IMDbBase): - return - if not hasattr(self, '_connection'): - return -- self._sql_logger.debug('closing connection to the database') -+ logger.debug('closing connection to the database') - try: - self._connection.close() - except: