William Ting
96ae111824
feat: default to Python 3.
2 years ago
William Ting
bc4ea61546
Create temporary file on the same device as data.
...
One idea for why the database is occasionally purged is due to the
temporary file being on a separate device than the database. This
patch implements @lilydjwg's suggestion here:
https://github.com/wting/autojump/issues/391#issuecomment-419349650
6 years ago
William Ting
a0719f488e
(Running pre-commit) Use Yelp-style indentation.
7 years ago
William Ting
d529790278
Run pre-commit on repo.
8 years ago
William Ting
23be6ab233
Tweak Windows temp.close() comment line.
10 years ago
timotei
c889aa013e
Close the temporary file before re-opening it.
...
On Windows, we cannot reuse the temp.name to
reopen the file *unless* it has been closed
before [0].
This problem in turn made the `move_file`
request to fail, since the file was still
open at the time.
[0] https://docs.python.org/2/library/tempfile.html#tempfile.NamedTemporaryFile
10 years ago
William Ting
581b8d9617
autopep8'ed
10 years ago
William Ting
2100f993b3
formatting cleanup
10 years ago
William Ting
4826a0ef6b
Use temporary files to prevent IO race conditions.
...
Refer to #260 .
10 years ago
William Ting
4bd62e2293
minor refactor
10 years ago
William Ting
d0578b2c10
Remove accidentally creating tuples.
...
Fixes #244 .
10 years ago
William Ting
35bc63c66e
Fix encoding issues.
...
The original implementation used str.encode() on input and str.decode() on
output. However this would cause UnicodeDecodeError since certain characters
can't be encoded / decoded in ASCII.
The new solution is to use unicode() on all input strings and output UTF-8
encoded strings. This makes the assumption that the shell can handle UTF-8
strings.
11 years ago
William Ting
e5a97294ac
fix data save
11 years ago
William Ting
a59d671fb0
rename python files to prevent system wide installation collisions
11 years ago