GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Have the deprecated Commit.trailers property issue a warning · gitpython-developers/GitPython@03464d9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • git/objects
    • commit.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/objects/commit.py‎

Copy file name to clipboardExpand all lines: git/objects/commit.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from subprocess import Popen, PIPE
1515
import sys
1616
from time import altzone, daylight, localtime, time, timezone
17+
import warnings
1718

1819
from gitdb import IStream
1920

@@ -399,6 +400,11 @@ def trailers(self) -> Dict[str, str]:
399400
Dictionary containing whitespace stripped trailer information.
400401
Only contains the latest instance of each trailer key.
401402
"""
403+
warnings.warn(
404+
"Commit.trailers is deprecated, use Commit.trailers_list or Commit.trailers_dict instead",
405+
DeprecationWarning,
406+
stacklevel=2,
407+
)
402408
return {k: v[0] for k, v in self.trailers_dict.items()}
403409

404410
@property

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.