Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.11.1rc1 #1936

Merged
merged 30 commits into from
Jul 17, 2023
Merged

V2.11.1rc1 #1936

merged 30 commits into from
Jul 17, 2023

Conversation

anjakefala
Copy link
Collaborator

Collecting commits for v2.11.1.

The main goal is to ship fixes for Python 3.12.

@midichef
Copy link
Contributor

midichef commented Jul 8, 2023

A couple of others that would be good:
d40fc93
(which fixes graphs not showing data on edges #1850),.

Also this series of 4, which I should have squashed into 1:
d6f8952 eed0761 c853a03 a39d5f9
(which fixes slow display of JSON with wide columns #1747)

@anjakefala anjakefala force-pushed the v2.11.1rc1 branch 2 times, most recently from 0faa423 to b85b381 Compare July 17, 2023 00:14
saulpw and others added 22 commits July 16, 2023 17:34
pathlib.Path('.').name is ''. By default, sheets passed through `open-file` get their name
from Path().name. This has resulted in the DirSheet getting a default
blank name when loaded through `open-file`.

Blank sheet names resulted in givenpath.ext returning a '', and VisiData
falling back to options.save_filetype. Setting an explicit name
addresses these issues.

Closes #1768
This was a subtle and terrible bug.

BaseSheet.__copy__ calls ret.__dict__.update(self.__dict__), so all
attributes are copied over; and they will be references (since it is a
shallow copy).  This is avoided for attributes created with
Extensible.init(copy=False), since they are re-created with the init
function after this update in the copy, and so they are set to fresh
values.  All other attributes, including those created by
@Extensible.lazy_property, won't be re-set.

There are some other lazy_property attributes that would be affected by
this, like the sheet-specific optionsSheet, and _deferredAdds/Mods/Dels.
But the lazy_property with the most obvious consequences, was
cmdlog_sheet, the cmdlog for this sheet only.  All copied sheets had the
same cmdlog_sheet as the sheet they were copied from, even though they
should have their own.  So commands for all dup'ed sheets would
erroneously share the cmdlog, and undo (which uses this cmdlog_sheet to
find the last modification to undo) would appear to be a more global
undo, as an undo on any of these copied sheets would undo the last
modification that happened to any of them.

This change makes lazy_property create its persisted attributes using .init(copy=False), so they won't be copied.
There is no way to make a @lazy_property share its result across copied sheets; this would have to be done manually.
when writing, FileProgress has to be the outer file object, whereas when reading, gzip has to be the outer one.

- when writing, gzip/etc .close() does not call close or flush on the inner fp, so the file is not finalized properly.
- when reading, progress should be based on the uncompressed bytes
Previously the fixed width saver would truncate saved data to match
viewed column widths.
Now it saves all the data regardless of the viewed column widths.

Co-authored-by: Anja Kefala <[email protected]>
* Choose only exactly matching strings in chooser

Given a list of choices such as x, x2, x3, previously chooseMany() would
select all three if you entered 'x' into the chooser input prompt.

Now it just selects the exact match 'x'. You can still select multiple
values by entering them separated by spaces.
@anjakefala anjakefala marked this pull request as ready for review July 17, 2023 03:57
@anjakefala anjakefala merged commit 675d4f2 into stable Jul 17, 2023
6 checks passed
@anjakefala anjakefala deleted the v2.11.1rc1 branch July 17, 2023 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants