-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
V2.11.1rc1 #1936
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anjakefala
force-pushed
the
v2.11.1rc1
branch
2 times, most recently
from
July 17, 2023 00:14
0faa423
to
b85b381
Compare
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.
`pathlib.Path._parts` has been removed in Python 3.12: python/cpython#102476 Switch to pathlib.Path.parts which is a tuple. Closes #1934
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Collecting commits for v2.11.1.
The main goal is to ship fixes for Python 3.12.