port _Compatproperty to attrs

This commit is contained in:
Ronny Pfannschmidt 2017-12-18 10:20:15 +01:00
parent afc607cfd8
commit 94608c6110
1 changed files with 5 additions and 3 deletions

View File

@ -1,12 +1,14 @@
from __future__ import absolute_import, division, print_function
from collections import MutableMapping as MappingMixin
import os
import six
import py
import attr
import _pytest
SEP = "/"
tracebackcutdir = py.path.local(_pytest.__file__).dirpath()
@ -48,9 +50,9 @@ def ischildnode(baseid, nodeid):
return node_parts[:len(base_parts)] == base_parts
@attr.s
class _CompatProperty(object):
def __init__(self, name):
self.name = name
name = attr.ib()
def __get__(self, obj, owner):
if obj is None: