From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 132DF6DE0F3E for ; Mon, 11 Feb 2019 10:22:46 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.041 X-Spam-Level: X-Spam-Status: No, score=-0.041 tagged_above=-999 required=5 tests=[AWL=-0.042, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bkhpKxqShifD for ; Mon, 11 Feb 2019 10:22:45 -0800 (PST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by arlo.cworth.org (Postfix) with ESMTPS id E54C66DE0EE3 for ; Mon, 11 Feb 2019 10:22:44 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id v14-v6so9686800ljv.1 for ; Mon, 11 Feb 2019 10:22:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fq8NCF+qiYMeOqIuIu5NoAWeSouMP1dukjL80XnNxgM=; b=xfGkN3RkNaJyjGC0r3oK0Dey7hof04GEuG6P5iIf5zq5g5b9V1XdgsFBrjLEUDfVo2 Se1aXM981Q94m8i+sOP8dBNl352l+urYrWsBCVAAytocUYmmf3Ylfjluz0HAHtNskPIP ecHht2aISWEUgr8p0wq4sv7+dYfNx5rEBx4v4dvLhC6mqI8uQ5lB+ysebUvsYJ3nvny/ H6i9ksPLzSbut9r259Wd6hLLis4IHCRv8VOc+tboD+QqZQ9Wbi+QmiJqH7DVjZqUQ6TJ 0TEMAINf+66InRZ14s4EcDQnyGSHz+zN5rN5POa59oxHkQ7ZW3RekOv8cWZJb5u2PpSC 7xgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fq8NCF+qiYMeOqIuIu5NoAWeSouMP1dukjL80XnNxgM=; b=bKR01TIVmhKGPJbDdXSfjGAtTYxZhI76dK4TYwqnktohPO+DeriYA5uB8o+agvRbAD Pl+B21IoYAU8KBrjpqIgmS3zaK6xKVY/9MwWE5fFGBLalf0ZvcwQCx5/8G1w7/IEzPIJ mlM4443dYpxKG92j9FwUtPqayJ9mT9khY4cwU8thELnoxJAx2B+TBegBXaEm8HvDBoSG WUFRuw1wlnoENyVKCBp1OxnZlIKQ4zAEJLCtJPP7R3nmfIo30FdqHaYzjsqfbKP4yvkW beFs9r7NBYDgLaTMekBoCfAPZXmXp+O6QHTCiHBC/+1fsucSnYfbohgyxpVDv533fJWl MCEw== X-Gm-Message-State: AHQUAuYmhvF+/p2UQFTWUo4fk6PA+o31xqEX/tr3cSdkaektf0MMVcly dpYyLcR2SpjqHJRKybFrL+qMTC05XOxywg== X-Google-Smtp-Source: AHgI3IYfMEVb0lN3XPKPGjTyklo8bkU9g/7bYt9giD97y+ommjFI8cp3fEPAvTYMvtGQF8l6TH1maQ== X-Received: by 2002:a2e:9e0a:: with SMTP id e10-v6mr11519445ljk.157.1549909362247; Mon, 11 Feb 2019 10:22:42 -0800 (PST) Received: from localhost (213-216-253-97.bb.dnainternet.fi. [213.216.253.97]) by smtp.gmail.com with ESMTPSA id g6sm1088460lfh.35.2019.02.11.10.22.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 11 Feb 2019 10:22:40 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 1/3] python: fix documentation build with python 3.7 Date: Mon, 11 Feb 2019 20:22:35 +0200 Message-Id: <20190211182237.32201-1-jani@nikula.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2019 18:22:46 -0000 From: Jani Nikula The simplistic mocking in conf.py falls short on python 3.7. Just use unittest.mock instead. Fixes: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 368, in eval_config_file execfile_(filename, namespace) File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "/path/to/notmuch/bindings/python/docs/source/conf.py", line 39, in from notmuch import __VERSION__,__AUTHOR__ File "/path/to/notmuch/bindings/python/notmuch/__init__.py", line 54, in from .database import Database File "/path/to/notmuch/bindings/python/notmuch/database.py", line 25, in from .globals import ( File "/path/to/notmuch/bindings/python/notmuch/globals.py", line 48, in class NotmuchDatabaseS(Structure): TypeError: __mro_entries__ must return a tuple --- bindings/python/docs/source/conf.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/bindings/python/docs/source/conf.py b/bindings/python/docs/source/conf.py index 5b901c4ec4d8..8b43c5ca3f9f 100644 --- a/bindings/python/docs/source/conf.py +++ b/bindings/python/docs/source/conf.py @@ -13,22 +13,13 @@ import sys, os +from unittest.mock import Mock + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0,os.path.abspath('../..')) -class Mock(object): - def __init__(self, *args, **kwargs): - pass - - def __call__(self, *args, **kwargs): - return Mock() - - @classmethod - def __getattr__(self, name): - return Mock() if name not in ('__file__', '__path__') else '/dev/null' - MOCK_MODULES = [ 'ctypes', ] -- 2.20.1