Commit Graph

29210 Commits

Author SHA1 Message Date
Eli Schwartz e37cf6ab3c Update PyRSS2Gen to 1.1
Pull functional changes adapted to in-tree calibre cleanups. Upstream
officially supports python3 so this should be all that is needed.
2019-03-17 09:15:02 -04:00
Eli Schwartz 9505fdf226 Remove ancient db migration code.
The last caller for this function was removed in 2012.
This gets rid of a python2-specific cStringIO import.
2019-03-17 09:15:02 -04:00
Kovid Goyal 86c1d17474 Migrate .pickle config files to JSON format on first read 2019-03-17 18:37:12 +05:30
Kovid Goyal d0b99d7e68 Move the old .py based config files to JSON
The .py format relied on pickle for serialization of complex datatypes
and is not stable against multiple python versions.

As witht he migration of the .pickle config files, an upgrade/downgrade
will make the settings disjoint.
2019-03-17 18:23:09 +05:30
Kovid Goyal 1e1ad23ec7 Forgot to keep from/to_json in config namespace 2019-03-16 14:23:25 +05:30
Kovid Goyal 7b2620a0ac Move JSON serialization function into config_base 2019-03-16 14:12:23 +05:30
Kovid Goyal dcb128eb8b py3: Allow serializing utf-8 bytestrings to JSON
This matches behavior of py2
2019-03-16 14:06:15 +05:30
Kovid Goyal b23ba9dbdb ... 2019-03-16 13:58:54 +05:30
Kovid Goyal 256d770f47 Use a more efficient serialization for notified versions 2019-03-16 13:56:32 +05:30
Kovid Goyal 457ab4616e ... 2019-03-16 13:30:32 +05:30
Kovid Goyal f6e15704b3 Do not use pickle to store DynamicConfig
pickle is not portable between python versions, which makes it
particularly unsuited for config files.

Old settings are automatically migrated from *.pickle to *.pickle.json

Note this has the unfortunate side-effect that upgrading/downgrading or
using multiple versions of calibre on the same config directory will
make the settings disjoint. I dont see a reasonable way to avoid that.
2019-03-16 13:29:10 +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 8921bb8324 Reduce file lock time 2019-03-16 11:09:23 +05:30
Kovid Goyal 138a0338f7 DRYer 2019-03-16 10:22:54 +05:30
Kovid Goyal 869c2bf89e Persist QByteArray as python bytearrays in JSONConfig 2019-03-16 09:59:37 +05:30
Kovid Goyal 4a967a28c3 Remove unused code 2019-03-16 09:06:47 +05:30
Kovid Goyal d3ccd4369b Make use of pickle in ipc.pool work on py3 as well 2019-03-15 21:57:32 +05:30
Kovid Goyal 20b9cc3a81 Remove unused code 2019-03-15 21:46:48 +05:30
Kovid Goyal dbcb63c290 Ensure worker env keys are bytes/unicodeon py2/3 2019-03-15 21:45:54 +05:30
Kovid Goyal e73e782b56 Remove use of pickle for passing listen address to calibre workers 2019-03-15 21:33:26 +05:30
Kovid Goyal 313ce6b0c9 A spot of refactoring 2019-03-15 21:16:37 +05:30
Kovid Goyal e9b26ebb00 Dont rely on constants from the pickle module 2019-03-15 15:48:32 +05:30
Kovid Goyal fae355fe65 Replace use of pickle for icon theme cache on Linux 2019-03-15 15:38:12 +05:30
Kovid Goyal 69210a7783 Dont use pickle to calculate etags for tag browser data dumps 2019-03-15 15:25:58 +05:30
Kovid Goyal c98cc3383d Dont use pickle for calculating book hashes for the server
This has the unfortunate side-effect of making existing caches stale,
but cant be helped, given the instability of pickle as a serialization
format.
2019-03-15 15:06:26 +05:30
Kovid Goyal 74497a4ff8 Dont use pickle to pass temp dir to worker processes 2019-03-15 14:59:33 +05:30
Kovid Goyal 7e670497eb Move pickle implementation into the serialize module
And make it work on both py2 and py3. Note that unpickling of data
between python major versions is not likely to work well.
2019-03-15 14:49:56 +05:30
Kovid Goyal 6ad782cb29 Replace use of pickle for sending data to viewer print worker 2019-03-15 14:39:06 +05:30
Kovid Goyal 74e316e20b Replace use of pickle in update URL 2019-03-15 14:04:54 +05:30
Kovid Goyal 1e6d9e9583 Replace use of pickle for the editor completion worker 2019-03-15 11:59:46 +05:30
Kovid Goyal fc61fc88bc Replace use of pickle for D'nD in the tag browser 2019-03-15 11:50:31 +05:30
Kovid Goyal 046f43446e Replace use of pickle when repairing db on windows 2019-03-15 11:43:17 +05:30
Kovid Goyal 52c371e8b5 Replace another use of pickle 2019-03-14 21:05:13 +05:30
Kovid Goyal 54ef601e91 Get rid of a pointless use of pickle 2019-03-14 20:46:20 +05:30
Kovid Goyal 7fcf90ba97 Dont use pickle for the db thumbnail cache index 2019-03-14 20:17:58 +05:30
Kovid Goyal 6b9d4a16d5 Fix a regression that caused a harmless error popup when displaying tooltips in the select format dialog 2019-03-14 11:57:27 +05:30
Eli Schwartz 373f300ed7 Fix syntax error introduced while getting rid of basestring 2019-03-14 01:53:52 -04:00
Kovid Goyal 9cf2e2f671 Finish getting rid of xrange 2019-03-13 18:44:05 +05:30
Kovid Goyal b4e467ea18 Get rid of more xrange 2019-03-13 18:30:31 +05:30
Kovid Goyal 2d4127f7b9 Get rid of more xrange 2019-03-13 18:19:24 +05:30
Kovid Goyal ea33a5d6ad Get rid of more xrange 2019-03-13 15:51:21 +05:30
Kovid Goyal 6b5c3bd7c9 Get rid of more xrange 2019-03-13 15:44:45 +05:30
Kovid Goyal d1e30dfcac Get rid of some xrange 2019-03-13 15:34:10 +05:30
Kovid Goyal 55151a3cdd Get rid of basestring 2019-03-13 14:57:26 +05:30
Kovid Goyal 073e97121e Micro-optimization 2019-03-13 13:46:40 +05:30
Kovid Goyal 7fd5940ef8 Merge branch 'py3' of https://github.com/eli-schwartz/calibre 2019-03-13 13:31:24 +05:30
Kovid Goyal 2d21a8efa2 Some more fixes for the unicode type
Now replaced in all dynamically loaded code. Recipes/metadata
sources/etc. In the case of recipes, since they get compiled by calibre
we simply make the unicode/unichr names available, no need for any
changes to the actual recipes themselves.
2019-03-13 12:04:47 +05:30
Eli Schwartz 1a687a3d57 Port lzma_binding plugin to build on python2/python3 2019-03-13 01:08:25 -04:00
Eli Schwartz 9139fccbf4 Port cpalmdoc plugin to build on python2/python3 2019-03-13 01:08:25 -04:00
Eli Schwartz 1d5c89f69b Port libusb plugin to build on python2/python3 2019-03-13 01:08:25 -04:00