View Single Post
Old 06-30-2019, 04:41 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by siebert View Post
I'm a bit confused about the supported statement... supported by whom? Python 2.7 supports it according to the official docs (https://docs.python.org/2/reference/...tring-literals),
Supported by calibre.

Quote:
if you mean supported by Calibre, where would I find the "documented contracts of correctness" of Calibre regarding this case?
There is none, that's the point. Instead, you (try to) rely on python itself, and the entire creation and evolution of Python 3.x is a rather strong testimony that this is wrong. They deprecated significant parts of the programming language semantics, en masse, just to stop people from doing this.

Aside: it might be more advisable, at least for Windows, to explicitly work with bytes and decode to utf-8. Windows paths are weird and fragile things. But I don't know why your recipe hardcodes a path to C:\ so

Quote:
From my point of view, calibre "magically" changed my valid Python 2.7 raw string literal to an illegal raw unicode string literal
Report a bug to the Python Software foundation that python2 unicode string literals don't act like python3 unicode string literals and therefore introduce behavior that surprised you.

Quote:
which breaks my recipe.
Which fixes everyone else's recipes and a lot more code besides.

I'm not sure what else you want. Clearly, no other recipes had this issue. And no one can possibly know what issues you will be having with your recipes that hardcode paths to C:\, since no one else is doing any such thing and the one person who *is* (you) is not discussing his needs or use cases, nor contributing to the ongoing development of the recipe subsystem -- so who exactly is supposed to *know* that you're having an issue?

This is the inevitable problem faced by lone wolf coders.

Last edited by eschwartz; 06-30-2019 at 04:43 PM.
eschwartz is offline   Reply With Quote