distlib icon indicating copy to clipboard operation
distlib copied to clipboard

Shouldn't `distlib.metadata.Metadata.dictionary` be renamed into `_dictionary` (or instead return the results equivalent to the ones returned by `todict`)?

Open KOLANICH opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. .dictionary and .todict() return different results for Metadata 2.1, which is confusing (one uses tab-completion, sees dictionary, reads it, sees the dict, but it turns out the dict is incomplete (i.e. 'project_url' and other keys form ._legacy are missing), and after digging into the source one understands that one needs to use .todict() instead).

Describe the solution you'd like

  1. move .dictionary to ._dictionary.
  2. optionally create a dictionary read-only property returning the same as .todict()

KOLANICH avatar Feb 12 '23 17:02 KOLANICH