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

Provide clear method for dbm/gdbm module #107122

Closed
corona10 opened this issue Jul 23, 2023 · 1 comment
Closed

Provide clear method for dbm/gdbm module #107122

corona10 opened this issue Jul 23, 2023 · 1 comment
Assignees
Labels
type-feature A feature request or enhancement

Comments

@corona10
Copy link
Member

corona10 commented Jul 23, 2023

There was a similar discussion about adding MutableMapping interface from dbm/gdbm module.
I didn't follow up on all of the progress in adding those methods but at this moment adding a clear method looks good even consider the situation of #107089

I am working on adding clear() method :)

Linked PRs

@corona10 corona10 added the type-feature A feature request or enhancement label Jul 23, 2023
@corona10 corona10 self-assigned this Jul 23, 2023
@corona10
Copy link
Member Author

cc @eendebakpt

corona10 added a commit to corona10/cpython that referenced this issue Jul 23, 2023
corona10 added a commit to corona10/cpython that referenced this issue Jul 23, 2023
corona10 added a commit to corona10/cpython that referenced this issue Jul 23, 2023
corona10 added a commit to corona10/cpython that referenced this issue Jul 23, 2023
jtcave added a commit to jtcave/cpython that referenced this issue Jul 23, 2023
The prior performance fix could have disrupted non-dbm subclasses of
Shelf. The code has been refactored to put the clear logic in the
DbfilenameShelf class, which can assume the backing object is a dbm
object. The code still attempts to call the clear method on the backing
object (see pythongh-107122).
corona10 added a commit to corona10/cpython that referenced this issue Jul 23, 2023
jtcave added a commit to jtcave/cpython that referenced this issue Jul 24, 2023
Because pythongh-107089 is peculiar to implementation details of dbm objects,
it would be less disruptive to implement it in the DbfilenameShelf
class, which is used for calls to shelve.open. Since it is known that
the backing object is specifically one of the dbm objects, its clear
method (see pythongh-107122) can be used with no fallback code.
carljm added a commit to carljm/cpython that referenced this issue Jul 24, 2023
* main: (73 commits)
  Thoroughly refactor the cases generator (python#107151)
  Docs: Add missing markup to Argument Clinic docs (python#106876)
  pythongh-107162: Document errcode.h usage in its comment (python#107177)
  pythongh-106320: Remove private _PyDict C API (python#107145)
  Fix PyVectorcall_Function doc versionadded (python#107140)
  Docs: Remove duplicate word in Argument Clinic howto heading (python#107169)
  pythongh-107017: Change Chapter Strings to Texts in the Introduction chapter. (python#107104)
  pythongh-106320: Remove private _PyObject C API (python#107159)
  Docs: fix typo in os.pwrite docstring (python#107087)
  pythongh-105291: Add link to migration guide for distutils (python#107130)
  pythongh-106948: Docs: Disable links for C standard library functions, OS utility functions and system calls (python#107062)
  pythongh-106320: Remove _PyBytes_Join() C API (python#107144)
  pythongh-106320: Remove private _PyObject C API (python#107147)
  pythongh-106320: Remove _PyTuple_MaybeUntrack() C API (python#107143)
  pythongh-106320: Remove _PyIsSelectable_fd() C API (python#107142)
  Remove superflous whitespaces in `layout.html`. (pythonGH-107067)
  pythongh-107122: Update what's news for dbm.*dbm.clear() method (pythongh-107135)
  pythongh-107122: Add clear method to dbm.ndbm module (pythongh-107126)
  pythongh-62519: Make pgettext search plurals when translation is not found (python#107118)
  pythongh-107122: Add clear method to dbm.gdbm.module (pythongh-107127)
  ...
jtcave added a commit to jtcave/cpython that referenced this issue Jul 27, 2023
Because pythongh-107089 is peculiar to implementation details of dbm objects,
it would be less disruptive to implement it in the DbfilenameShelf
class, which is used for calls to shelve.open. Since it is known that
the backing object is specifically one of the dbm objects, its clear
method (see pythongh-107122) can be used with no fallback code.
jtcave added a commit to jtcave/cpython that referenced this issue Jul 27, 2023
Because pythongh-107089 is peculiar to implementation details of dbm objects,
it would be less disruptive to implement it in the DbfilenameShelf
class, which is used for calls to shelve.open. Since it is known that
the backing object is specifically one of the dbm objects, its clear
method (see pythongh-107122) can be used with no fallback code.
jtcave added a commit to jtcave/cpython that referenced this issue Jul 28, 2023
Because pythongh-107089 is peculiar to implementation details of dbm objects,
it would be less disruptive to implement it in the DbfilenameShelf
class, which is used for calls to shelve.open. Since it is known that
the backing object is specifically one of the dbm objects, its clear
method (see pythongh-107122) can be used with no fallback code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant