From nobody Fri Mar 25 13:49:42 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id D804D1A33984; Fri, 25 Mar 2022 13:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3P35HXhz3Qkd; Fri, 25 Mar 2022 13:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8Kkn9r9Am6LNuHP3OoJSx/17WGJolvvRuxrmV0JVhc=; b=U81CeJ0zjxgL8XZtDh8uv7BCQSsDA5+cqxSV2xjZLyouvt+bLP9uOMwH+Esaon8jIZFVz0 LxNf1rGRS5xhD+NeBgZQfGS27vV/ekME5Ax5raMBj7u//DJqQjmzNvPwIp3MspZpRzGrex 0VxLI7hWExwymoNLfKa1u95o2lV7LXTLd0jbhIUTz0O809ZZfVaeYoMoqVQcnVEq8eIVvI Yfk8sXbSqJfEOJJreOhOZ1sUCU9j2JKQayggr07D5+j+z65UYRruO6wUPMak98YFwAPAYK EG2qIw01huzmK06+YPCTK/2Qm0MSv+QRea+QmukBNvng+ITEFgvKv8qKTxbZoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B8FD5633; Fri, 25 Mar 2022 13:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDng1E027690; Fri, 25 Mar 2022 13:49:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDng3q027689; Fri, 25 Mar 2022 13:49:42 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:49:42 GMT Message-Id: <202203251349.22PDng3q027689@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: f41aeac54f93 - main - databases/py-Elixir: Fix build with setuptools 58.0.0+ List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f41aeac54f93961058a65aa9e3b043fcc82b600e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8Kkn9r9Am6LNuHP3OoJSx/17WGJolvvRuxrmV0JVhc=; b=PU3UJvbj9ZosMG+aUNlCPnqwLjFlGi7FKCDbZs8FuV8KRnF9OcWS+/5YV9DJWsh/p7oF/p yeu40pAlaFbQrWVahUnvfafe0CbNn/a30qMPzRbtKC7dPJwRolWlnUdEbAjSSt9OqYLHrr 6FCkCwUhJ3J9aebCtikb906/Or33q3AifISOTvJYnpAgpW96BdhNqCyyNdpizgOmQ2s3lc VDaAnbsck0bUy6MV0dQ6mzSxqwS1KVr6qpbI6iEWgF3U3ZBvmQEMT8DXmSMi8eYbaYv1aC sS7aAFdQ7/mS5KquLSGHtYeiTNZrUvmOI4G2zmsU1Foe8gZTIJK1GCHt4nX8Rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216184; a=rsa-sha256; cv=none; b=diae5VfreTqt/YlUgovS5CWMJXtVTlA5B0ctP2yiKuxLvzt+7P38r3MfLr/vD3KW1AVI8S x6ZCwaS4FknIoYrzH5CEqMoPiHU6vj4inQeU7l1yBfhUtbWB63FBS4Zd49VnO5F3zBGO3W D98oMA1VayAFgrpLA31JpTzlr0wzfX+DauSSx5h6pUlSEGexNU7O+8htK4PmaNLL69hTbb bC2/UKcHY0nxaJNNAyEJhNCrvXhf8tnwb0cwzGlkOjkedaz7eEkXwZxOTgzMvHD34pogfJ 3Qeoq+7tHmnBG0QBbIq430Jm71sFyvCHjhRIHAnvYgNjDAHP6pAsUYlSTmUtzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=f41aeac54f93961058a65aa9e3b043fcc82b600e commit f41aeac54f93961058a65aa9e3b043fcc82b600e Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:32:04 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:05 +0000 databases/py-Elixir: Fix build with setuptools 58.0.0+ With hat: python --- databases/py-Elixir/files/patch-2to3 | 190 +++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) diff --git a/databases/py-Elixir/files/patch-2to3 b/databases/py-Elixir/files/patch-2to3 new file mode 100644 index 000000000000..ab5974dac8a3 --- /dev/null +++ b/databases/py-Elixir/files/patch-2to3 @@ -0,0 +1,190 @@ +--- elixir/entity.py.orig 2009-11-13 19:50:38 UTC ++++ elixir/entity.py +@@ -3,7 +3,7 @@ This module provides the ``Entity`` base class, as wel + ``EntityMeta``. + ''' + +-from py23compat import sorted ++from .py23compat import sorted + + import sys + import types +@@ -172,7 +172,7 @@ class EntityDescriptor(object): + self.identity = self.identity(entity) + + if self.polymorphic: +- if not isinstance(self.polymorphic, basestring): ++ if not isinstance(self.polymorphic, str): + self.polymorphic = options.DEFAULT_POLYMORPHIC_COL_NAME + + #--------------------- +@@ -226,7 +226,7 @@ class EntityDescriptor(object): + if col.primary_key: + self.add_column(col.copy()) + elif not self.has_pk and self.auto_primarykey: +- if isinstance(self.auto_primarykey, basestring): ++ if isinstance(self.auto_primarykey, str): + colname = self.auto_primarykey + else: + colname = options.DEFAULT_AUTO_PRIMARYKEY_NAME +@@ -298,7 +298,7 @@ class EntityDescriptor(object): + options.POLYMORPHIC_COL_TYPE)) + + if self.version_id_col: +- if not isinstance(self.version_id_col, basestring): ++ if not isinstance(self.version_id_col, str): + self.version_id_col = options.DEFAULT_VERSION_ID_COL_NAME + self.add_column(Column(self.version_id_col, Integer)) + +@@ -306,7 +306,7 @@ class EntityDescriptor(object): + self.entity.table = Table(self.tablename, self.metadata, + *args, **kwargs) + if DEBUG: +- print self.entity.table.repr2() ++ print(self.entity.table.repr2()) + + def setup_reltables(self): + self.call_builders('create_tables') +@@ -365,7 +365,7 @@ class EntityDescriptor(object): + return children + + def translate_order_by(self, order_by): +- if isinstance(order_by, basestring): ++ if isinstance(order_by, str): + order_by = [order_by] + + order = [] +@@ -505,12 +505,12 @@ class EntityDescriptor(object): + # get one in any case. + table = type.__getattribute__(self.entity, 'table') + if table is not None: +- if check_duplicate and col.key in table.columns.keys(): ++ if check_duplicate and col.key in list(table.columns.keys()): + raise Exception("Column '%s' already exist in table '%s' ! " % + (col.key, table.name)) + table.append_column(col) + if DEBUG: +- print "table.append_column(%s)" % col ++ print("table.append_column(%s)" % col) + + def add_constraint(self, constraint): + self.constraints.append(constraint) +@@ -537,7 +537,7 @@ class EntityDescriptor(object): + if mapper: + mapper.add_property(name, property) + if DEBUG: +- print "mapper.add_property('%s', %s)" % (name, repr(property)) ++ print("mapper.add_property('%s', %s)" % (name, repr(property))) + + def add_mapper_extension(self, extension): + extensions = self.mapper_options.get('extension', []) +@@ -795,7 +795,7 @@ def instrument_class(cls): + + # Process attributes (using the assignment syntax), looking for + # 'Property' instances and attaching them to this entity. +- properties = [(name, attr) for name, attr in cls.__dict__.iteritems() ++ properties = [(name, attr) for name, attr in cls.__dict__.items() + if isinstance(attr, Property)] + sorted_props = sorted(base_props + properties, + key=lambda i: i[1]._counter) +@@ -924,7 +924,7 @@ def setup_entities(entities): + # delete all Elixir properties so that it doesn't interfere with + # SQLAlchemy. At this point they should have be converted to + # builders. +- for name, attr in entity.__dict__.items(): ++ for name, attr in list(entity.__dict__.items()): + if isinstance(attr, Property): + delattr(entity, name) + +@@ -1004,7 +1004,7 @@ class EntityBase(object): + self.set(**kwargs) + + def set(self, **kwargs): +- for key, value in kwargs.iteritems(): ++ for key, value in kwargs.items(): + setattr(self, key, value) + + def update_or_create(cls, data, surrogate=True): +@@ -1038,7 +1038,7 @@ class EntityBase(object): + + mapper = sqlalchemy.orm.object_mapper(self) + +- for key, value in data.iteritems(): ++ for key, value in data.items(): + if isinstance(value, dict): + dbvalue = getattr(self, key) + rel_class = mapper.get_property(key).mapper.class_ +@@ -1074,7 +1074,7 @@ class EntityBase(object): + if isinstance(p, ColumnProperty)] + data = dict([(name, getattr(self, name)) + for name in col_prop_names if name not in exclude]) +- for rname, rdeep in deep.iteritems(): ++ for rname, rdeep in deep.items(): + dbdata = getattr(self, rname) + #FIXME: use attribute names (ie coltoprop) instead of column names + fks = self.mapper.get_property(rname).remote_side +@@ -1145,7 +1145,7 @@ class EntityBase(object): + get = classmethod(get) + + +-class Entity(EntityBase): ++class Entity(EntityBase, metaclass=EntityMeta): + ''' + The base class for all entities + +@@ -1167,6 +1167,5 @@ class Entity(EntityBase): + For further information, please refer to the provided examples or + tutorial. + ''' +- __metaclass__ = EntityMeta + + +--- elixir/py23compat.py.orig 2009-10-02 10:19:50 UTC ++++ elixir/py23compat.py +@@ -11,7 +11,7 @@ orig_cmp = cmp + def sort_list(l, cmp=None, key=None, reverse=False): + try: + l.sort(cmp, key, reverse) +- except TypeError, e: ++ except TypeError as e: + if not str(e).startswith('sort expected at most 1 arguments'): + raise + if cmp is None: +--- elixir/relationships.py.orig 2009-11-13 20:04:26 UTC ++++ elixir/relationships.py +@@ -412,7 +412,7 @@ from sqlalchemy import ForeignKeyConstraint, Column, T + from sqlalchemy.orm import relation, backref, class_mapper + from sqlalchemy.ext.associationproxy import association_proxy + +-import options ++from . import options + from elixir.statements import ClassMutator + from elixir.properties import Property + from elixir.entity import EntityMeta, DEBUG +@@ -495,7 +495,7 @@ class Relationship(Property): + + def target(self): + if not self._target: +- if isinstance(self.of_kind, basestring): ++ if isinstance(self.of_kind, str): + collection = self.entity._descriptor.collection + self._target = collection.resolve(self.of_kind, self.entity) + else: +@@ -1115,7 +1115,7 @@ class ManyToMany(Relationship): + self.table = Table(tablename, e1_desc.metadata, + schema=schema, *args, **complete_kwargs) + if DEBUG: +- print self.table.repr2() ++ print(self.table.repr2()) + + def _build_join_clauses(self): + # In the case we have a self-reference, we need to build join clauses +@@ -1222,7 +1222,7 @@ def _get_join_clauses(local_table, local_cols1, local_ + # match. + + #TODO: rewrite this. Even with the comment, I don't even understand it myself. +- for cols, constraint in constraint_map.iteritems(): ++ for cols, constraint in constraint_map.items(): + if cols == cols1 or (cols != cols2 and + not cols1 and (cols2 in constraint_map or + cols2 is None)):