From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AAMBHzwdIGAJIQAA0tVLHw (envelope-from ) for ; Sun, 07 Feb 2021 17:02:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AFPiGjwdIGAVVgAA1q6Kng (envelope-from ) for ; Sun, 07 Feb 2021 17:02:52 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 036A394021E for ; Sun, 7 Feb 2021 17:02:52 +0000 (UTC) Received: from localhost ([::1]:41518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8nSU-0003CA-UU for larch@yhetil.org; Sun, 07 Feb 2021 12:02:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8nPo-0003Ad-VF for guix-patches@gnu.org; Sun, 07 Feb 2021 12:00:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8nPn-0001tj-KU for guix-patches@gnu.org; Sun, 07 Feb 2021 12:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8nPn-0001hz-Iz for guix-patches@gnu.org; Sun, 07 Feb 2021 12:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45712] [PATCHES] Improve Python package quality Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Feb 2021 17:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45712 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer , Lars-Dominik Braun Cc: Ricardo Wurmus , 45712@debbugs.gnu.org Received: via spool by 45712-submit@debbugs.gnu.org id=B45712.16127171506429 (code B ref 45712); Sun, 07 Feb 2021 17:00:03 +0000 Received: (at 45712) by debbugs.gnu.org; 7 Feb 2021 16:59:10 +0000 Received: from localhost ([127.0.0.1]:48612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8nOw-0001fd-BU for submit@debbugs.gnu.org; Sun, 07 Feb 2021 11:59:10 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:58643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8nOu-0001fT-08 for 45712@debbugs.gnu.org; Sun, 07 Feb 2021 11:59:09 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DYb3G2tyTz1qsZy; Sun, 7 Feb 2021 17:59:06 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DYb3G2BPXz1sP6W; Sun, 7 Feb 2021 17:59:06 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Eolxy4bRpbEM; Sun, 7 Feb 2021 17:59:05 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-54-13.dynamic.mnet-online.de [188.174.54.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sun, 7 Feb 2021 17:59:04 +0100 (CET) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 5E52C60299; Sun, 7 Feb 2021 17:59:02 +0100 (CET) From: Hartmut Goebel References: <87czxs3jel.fsf_-_@gmail.com> Message-ID: <6ace098f-4e4a-0f6f-ba09-f66728bdb564@goebel-consult.de> Date: Sun, 7 Feb 2021 17:59:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <87czxs3jel.fsf_-_@gmail.com> Content-Type: multipart/alternative; boundary="------------E667A25DF5D2B335D45EC2AD" Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 036A394021E X-Spam-Score: -0.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: BZinKv72ugiD This is a multi-part message in MIME format. --------------E667A25DF5D2B335D45EC2AD Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Maxim, > > Attached is a small rework of your original patch. I've made the Python > script standalone, which should make it easier to maintain. I've also > refactored the tests somewhat and added your copyright information. > > Is this OK with you? I had discussed some change to his original patch with Lars. Can't remember all point, just these: + if group not in {'console_scripts', }: "gui_scripts"m are missing. Using a set there is uncommon, since it is a constant value anyway. + # And finally try to load top level modules. This should not have any + # side-effects. I'd try loading the top level module first. As this is a pre-condition for loading the entry-points. -- +++hartmut | Hartmut Goebel | | | hartmut@goebel-consult.de | www.goebel-consult.de | --------------E667A25DF5D2B335D45EC2AD Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Hi Maxim,

Attached is a small rework of your original patch.  I've made the Python
script standalone, which should make it easier to maintain.  I've also
refactored the tests somewhat and added your copyright information.

Is this OK with you?

I had discussed some change to his original patch with Lars. Can't remember all point, just these:

+ if group not in {'console_scripts', }:

"gui_scripts"m are missing. Using a set there is uncommon, since it is a constant value anyway.

+ # And finally try to load top level modules. This should not have any

+ # side-effects.

I'd try loading the top level module first. As this is a pre-condition for loading the entry-points.

-- 
+++hartmut

| Hartmut Goebel            |                       |
| hartmut@goebel-consult.de | www.goebel-consult.de |
--------------E667A25DF5D2B335D45EC2AD--