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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New syntax for string formatting ? #154

Closed
sandeepbalagopal09 opened this issue May 18, 2020 · 7 comments
Closed

New syntax for string formatting ? #154

sandeepbalagopal09 opened this issue May 18, 2020 · 7 comments
Assignees
Labels
Milestone

Comments

@sandeepbalagopal09
Copy link

I got an error from this line https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/api/serializers.py#L203

Is this a new format in python ? I used do raise Exception('Unexpected value for flag: {}'.format(value.flag))

@danirus
Copy link
Owner

danirus commented May 18, 2020

It's a python 3 formatting string.
It's indeed an issue when using Python 2.7.

@sandeepbalagopal09
Copy link
Author

It's a python 3 formatting string.
It's indeed an issue when using Python 2.7.

But I am using python 3.5.2. Is it a 3.6 syntax ?

@danirus danirus self-assigned this May 18, 2020
@danirus danirus added the bug label May 18, 2020
@danirus
Copy link
Owner

danirus commented May 18, 2020

It should support Python 3.5.

@sandeepbalagopal09
Copy link
Author

It says support started from 3.6 https://www.python.org/dev/peps/pep-0498/

@danirus
Copy link
Owner

danirus commented May 18, 2020

Yes, I meant, django-comments-xtd should support Python 3.5.
I removed compatibility introducing that formatting style.
So it's a bug.

danirus added a commit that referenced this issue May 18, 2020
@danirus
Copy link
Owner

danirus commented May 18, 2020

It's fixed in master.
It will be released with the next v2.6.2.
Thanks for the report!

@danirus danirus added this to the 2.6.2 milestone May 18, 2020
danirus pushed a commit that referenced this issue Jul 5, 2020
@danirus
Copy link
Owner

danirus commented Jul 5, 2020

Thanks again for the report.
The issues has been resolved and fixed in PR #177.

@danirus danirus closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants