36 Commits

Author SHA1 Message Date
Kovid Goyal
520c46dfb9
Minor fixups for changes when removing py3 conditionals 2020-08-22 18:47:56 +05:30
Kovid Goyal
36d81d74d5
Remove hardcoding of mbcs for filesystem names 2020-08-22 18:47:55 +05:30
Kovid Goyal
9ff27782de
Remove useless __future__ imports
Not needed on python3
2020-08-22 18:47:55 +05:30
Kovid Goyal
29cd8d64ea
Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30
Eli Schwartz
d0a30b1f84
py3: add string_or_unicode to polyglot
To facilitate universal __future__s, we prefer native_string_type to
str. Since we cannot compare things as instance(f, (str, unicode_type))
and it gets a bit ridiculous to compare:

from polyglot.builtins import native_string_type, unicode_type
isinstance(f, (native_string_type, unicode_type))

allow using isinstance(f, string_or_unicode) instead. This matches the
existing string_or_bytes comparator.
2019-08-20 07:52:41 -04:00
Kovid Goyal
b86e9f0f27
py3: Various MOBI fixes found while reviewing the previous py3 merge 2019-07-07 18:14:13 +05:30
Kovid Goyal
c243fa2358
Cleanup getenv 2019-06-10 19:06:36 +05:30
Kovid Goyal
057b873933
Dont depend on win32api in polyglot 2019-06-10 18:21:38 +05:30
Kovid Goyal
ee97edc94d
Merge branch 'calibre-complete' of https://github.com/eli-schwartz/calibre 2019-05-20 06:31:45 +05:30
Eli Schwartz
09b4218b83
py3: recursive forcing to unicode missed converting set()
This resulted in e.g. ebook-convert-complete still storing most formats
in msgpack as bytestrings, and therefore not being completed.
2019-05-19 14:34:47 -04:00
Kovid Goyal
a08bdbeb4e
Dont depend on calibre in polyglot 2019-05-15 16:42:52 +05:30
Kovid Goyal
a78ede4c35
py3: Port constants.py to use unicode literals 2019-05-15 15:49:22 +05:30
Kovid Goyal
a2fa719545
Better naming 2019-04-29 21:29:47 +05:30
Kovid Goyal
1744a2b2fd
Micro-optimization 2019-04-29 21:27:14 +05:30
Kovid Goyal
05816c2c85
oops 2019-04-29 21:02:31 +05:30
Kovid Goyal
ed2e2e060f
Ensure completion dict for ebook-convert has unicode strings 2019-04-29 20:48:52 +05:30
Kovid Goyal
03df438219
py3: Port bytes() 2019-04-15 19:48:42 +05:30
Kovid Goyal
13961abd16
Also check python files using python 3 flake8 2019-04-13 09:17:31 +05:30
Kovid Goyal
3c64ea0995
py3: Port terminal I/O module 2019-04-03 14:28:51 +05:30
Kovid Goyal
152689812a
py3: Port use of Exception.message 2019-04-02 15:04:26 +05:30
Kovid Goyal
8b280c03c3
py3: Port RTF metadata module 2019-03-31 13:45:46 +05:30
Kovid Goyal
57e11977b7
py3: get rid of __cmp__ 2019-03-28 11:24:37 +05:30
Kovid Goyal
0aee163cf7
... 2019-03-26 18:03:17 +05:30
Kovid Goyal
e1c7ab579d
... 2019-03-26 14:53:32 +05:30
Kovid Goyal
1fed6604e0
py3: port use of raw_input 2019-03-26 14:45:36 +05:30
Kovid Goyal
d9ab752f94
DRYer 2019-03-25 18:54:01 +05:30
Kovid Goyal
5d46f5fbeb
Get rid of iterkeys
dict.__iter__() is the same as iterkeys on both py2 and py3
2019-03-25 14:31:32 +05:30
Kovid Goyal
dc274d8c1c
Use ABC to test for numbers type
This is important as long does not exist on py3 and anyway using an ABC
is more robust.  Also fix a few uses of long() for py3.
2019-03-16 12:17:14 +05:30
Kovid Goyal
dbcb63c290
Ensure worker env keys are bytes/unicodeon py2/3 2019-03-15 21:45:54 +05:30
Kovid Goyal
55151a3cdd
Get rid of basestring 2019-03-13 14:57:26 +05:30
Kovid Goyal
5b76089839
Various py3 related fixes exposed by the unicode patch 2019-03-13 06:41:39 +05:30
Eli Schwartz
cbc42bec23
python3: add unicode/unichr wrappers to polyglot 2019-03-13 06:41:38 +05:30
Eli Schwartz
8e853a3ff8 python3: add polyglot compat layer for builtins / __builtin__ 2019-02-20 23:05:04 -05:00
Kovid Goyal
f39f3951f4
dict fixes in the setup package 2018-09-10 20:54:35 +05:30
Kovid Goyal
5234e43f0e
Port future_builtins to polyglot 2018-09-10 20:12:01 +05:30
Kovid Goyal
b1435f9b44
Replace the six module with the polyglot module 2018-09-10 15:46:56 +05:30