Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbc42ee5

Browse files
committed
Don't addNullHandlers
This stops adding `NullHandler` instances to GitPython's loggers.As noted in#1806, when they were added in#300 this preventederrors when GitPython logged messages and logging was not enabled,but since Python 3.2 there is a logger of last resort providing anicer default behavior of showing the messages. (They are stillshown with better formatting if logging is configured, even ifjust done with logging.basicConfig(), so applications should stilltypically configure logging.)
1 parent78a82b3 commitbc42ee5

File tree

6 files changed

+1
-12
lines changed

6 files changed

+1
-12
lines changed

‎git/cmd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
}
8383

8484
_logger=logging.getLogger(__name__)
85-
_logger.addHandler(logging.NullHandler())
8685

8786
__all__= ("Git",)
8887

‎git/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@
6060

6161
__all__= ("GitConfigParser","SectionConstraint")
6262

63-
6463
_logger=logging.getLogger(__name__)
65-
_logger.addHandler(logging.NullHandler())
66-
6764

6865
CONFIG_LEVELS:ConfigLevels_Tup= ("system","user","global","repository")
6966
"""The configuration level of a configuration file."""

‎git/objects/commit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
# ------------------------------------------------------------------------
5454

5555
_logger=logging.getLogger(__name__)
56-
_logger.addHandler(logging.NullHandler())
5756

5857
__all__= ("Commit",)
5958

‎git/objects/submodule/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141

4242
# typing ----------------------------------------------------------------------
43+
4344
fromtypingimportCallable,Dict,Mapping,Sequence,TYPE_CHECKING,cast
4445
fromtypingimportAny,Iterator,Union
4546

@@ -50,14 +51,11 @@
5051
fromgit.repoimportRepo
5152
fromgit.refsimportHead
5253

53-
5454
# -----------------------------------------------------------------------------
5555

5656
__all__= ["Submodule","UpdateProgress"]
5757

58-
5958
_logger=logging.getLogger(__name__)
60-
_logger.addHandler(logging.NullHandler())
6159

6260

6361
classUpdateProgress(RemoteProgress):

‎git/objects/submodule/root.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
__all__= ["RootModule","RootUpdateProgress"]
2424

2525
_logger=logging.getLogger(__name__)
26-
_logger.addHandler(logging.NullHandler())
2726

2827

2928
classRootUpdateProgress(UpdateProgress):

‎git/remote.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@
6464

6565
# -------------------------------------------------------------
6666

67-
6867
_logger=logging.getLogger(__name__)
69-
_logger.addHandler(logging.NullHandler())
70-
7168

7269
__all__= ("RemoteProgress","PushInfo","FetchInfo","Remote")
7370

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp