Skip to content

apple/build_xcframework.py: python syntax#18948

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:python_syntax
Nov 30, 2020
Merged

apple/build_xcframework.py: python syntax#18948
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:python_syntax

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Nov 27, 2020

  • make happy old Python linters

Error message ( /usr/bin/flake8 (ver: 2.5.4) ):

./platforms/apple/build_xcframework.py:13:113: E901 SyntaxError: invalid syntax
    assert sys.version_info >= (3, 6), f"Python 3.6 or later is required! Current version is {sys.version_info}"
                                                                                                                ^
1
1       E901 SyntaxError: invalid syntax

relates #18826

/cc @colejd

force_builders_only=Docs
build_image:Docs=docs-js

- make happy old Python linters
@colejd
Copy link
Copy Markdown
Contributor

colejd commented Nov 27, 2020

If you're getting rid of the 3.6 string interpolation, you can bring the minimum required Python version down to a lower version of 3. That said, I think the MacOS version requirement means that 3.6+ is installed anyway, so maybe it doesn't matter.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Nov 27, 2020

There is also Path (from pathlib) which is introduced in Python 3.4.
Also, Python 3.6 is necessary to pass these values into standard Python library (like os calls).

I believe we can keep Python 3.6 limitation here.

@asmorkalov asmorkalov self-requested a review November 30, 2020 09:12
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants