> +SAMPLE_RESOURCE = '{"%s": "%s"}' % (SAMPLE_KEY, SAMPLE_VALUE)
>
> There are a lot of strings being combined with %-notation in here. Please use
> the new .format() notation for string formatting instead, as %-notation is
> deprecated. As the new notation uses {0} for example as insertion markers, you
> probably should use unicode({u'{0}'.format(SAMPLE_KEY):
> u'{0}'.format(SAMPLE_VALUE)}) for this perhaps.
The SAMPLE_RESOURCE is just a json-like sequence of bytes used for testing, so the fix requested is wrong.
It should be something like:
+SAMPLE_RESOURCE = '{{"{0}": "{1}"}}'.format(SAMPLE_KEY, SAMPLE_VALUE)
> +SAMPLE_RESOURCE = '{"%s": "%s"}' % (SAMPLE_KEY, SAMPLE_VALUE) {u'{0}' .format( SAMPLE_ KEY): format( SAMPLE_ VALUE)} ) for this perhaps.
>
> There are a lot of strings being combined with %-notation in here. Please use
> the new .format() notation for string formatting instead, as %-notation is
> deprecated. As the new notation uses {0} for example as insertion markers, you
> probably should use unicode(
> u'{0}'.
The SAMPLE_RESOURCE is just a json-like sequence of bytes used for testing, so the fix requested is wrong. '.format( SAMPLE_ KEY, SAMPLE_VALUE)
It should be something like:
+SAMPLE_RESOURCE = '{{"{0}": "{1}"}}
Also, and for the record, the string interpolation operator % is not deprecated; not even in python 3.3: docs.python. org/dev/ library/ stdtypes. html#old- string- formatting- operations
"there are no current plans to deprecate printf-style formatting."
http://