Closed iamdefinitelyahuman closed 5 years ago
Hi! This is indeed a regression related to the recent new features.
However, the .specs
API is deprecated, and removal planned in the next major version; could you describe how you're using it? I didn't see it as actually useful, but it seems I was wrong ;)
I'm using it to standardize pragma statements within solidity smart contracts. Perhaps there's a cleaner or different way to do this and certainly I'll have to look for one before the major upgrade :)
Here is the code where I'm accessing .specs
- https://github.com/iamdefinitelyahuman/brownie/blob/05e34c0c9e3b7595071ffaff2f0c19c81da58471/brownie/project/compiler.py#L183-L201
For now tho my build is failing everywhere as this is an integral component... do you think you can push a fix soon-ish or am I better off releasing another version of my package that requires ==2.6.0
? (hope that doesn't sound demanding, very happy to deal with it on my end and grateful to you that this package exists)
Thanks :)
I'll give it my best.
Regarding your code, I strongly suggest taking a look at the new design with custom spec syntax parsers and subcomponents; it might be useful to directly parse your pragmas.
:pray: will do, thanks heaps
Fixed in version 2.8.2! :wink:
Thanks! I'm just finishing up tests on my own updated version to move away from .specs
- the new NpmSpec
class has allowed me to refactor out a bunch of code. Great stuff!
Python version:
3.6.8
semantic_version
version:2.8.1
OS: Ubuntu18.04
Possibly related to #79 - I'm getting a
TypeError
whenever I try to accessSpec.specs
with any of the following conditions:Spec
includes a patch versionSpec
operator is any of (>=
,>
,<=
,<
)The traceback is identical in every case:
Without a patch version, or using a
^
operator (even with a patch version) I have no issues: