Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'portion.interval' has no attribute 'empty' #82

Closed
fredrikaverpil opened this issue Mar 29, 2023 · 3 comments
Closed
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented Mar 29, 2023

Hi 馃憢 and thanks for your hard work on this project!

I noticed I had a large amount of tests failing after updating from 2.3.1 to 2.4.0, with this error.

>       intervals = portion.interval.empty()
E       AttributeError: module 'portion.interval' has no attribute 'empty'

Is this expected?

Also, would you please confirm that the better syntax should be intervals = portion.Interval() to get an empty interval?

@AlexandreDecan
Copy link
Owner

Hello,

The various helpers to create intervals have been moved from portion.interval to portion.func. This is an internal change that should not have affected your code. Sorry ;-) These helpers should be accessed using the public API (i.e., portion.empty()). As a general rule, your code should only use the portion module, not its submodules ;)

@fredrikaverpil
Copy link
Author

Great, thanks for this clarification. 馃憤

@AlexandreDecan
Copy link
Owner

You're welcome ;-)

May I ask you some details about your use case? Are there things you would like to see in portion, or things that are difficult to use or that can be improved?

@AlexandreDecan AlexandreDecan added bug Something isn't working invalid This doesn't seem right labels Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants