GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MAINT: Different workaround for old-style class. · wangtingpython/zipline@5a7bad4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎setup.py‎

Copy file name to clipboardExpand all lines: setup.py
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def __getitem__(self, key):
5656

5757
from Cython.Distutils import build_ext as cython_build_ext
5858

59-
class build_ext(cython_build_ext):
59+
# Cython_build_ext isn't a new-style class in Py2.
60+
class build_ext(cython_build_ext, object):
6061
"""
6162
Custom build_ext command that lazily adds numpy's include_dir to
6263
extensions.
@@ -73,11 +74,7 @@ def build_extensions(self):
7374
for ext in self.extensions:
7475
ext.include_dirs.append(numpy_incl)
7576

76-
# This explicitly calls the superclass method rather than the
77-
# usual super() invocation because distutils' build_class, of
78-
# which Cython's build_ext is a subclass, is an old-style class
79-
# in Python 2, which doesn't support `super`.
80-
cython_build_ext.build_extensions(self)
77+
super(build_ext, self).build_extensions()
8178
return build_ext
8279

8380

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.