[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-16 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37598> ___ ___

[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-16 Thread Vinay Sajip
Vinay Sajip added the comment: > Since order of kwargs is guaranteed from Python 3.6 can this be removed? Well, the statement about order isn't inaccurate when talking about Python in general and the cookbook is a resource meant to be useful across multiple Python implementati

[issue37598] Don't use _ as a function name in logging documentation cookbook

2019-07-15 Thread Vinay Sajip
Vinay Sajip added the comment: The comment at the end of the "_ = ..." line indicates clearly that it's optional to do that, and I assume that any reader will realise that they can use any suitable variable name rather than "_". There's no particular "recommendation

[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: > This is a fallacy. What fallacy? I was responding to "does anyone else have opinions on this?" I can't read minds of people all over the world, so I have to go by my best guess, which is based on how many times this issue has been reported befo

[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Vinay Sajip
Vinay Sajip added the comment: > the prose clearly say that the default is sys.stderr, however the code > doesn't show that Which code are you looking at? Here is the entirety of StreamHandler.__init__: def __init__(self, stream=None): """ I

[issue37563] Documentation - default for StreamHandler

2019-07-12 Thread Vinay Sajip
Vinay Sajip added the comment: The devil is in the detail. If stream=sys.stderr is specified, that takes effect at import time. If stream=None is specified and the implementation chooses to treat that as sys.stderr, that takes effect at the time of the call. The two are not equivalent

[issue37563] Documentation - default for StreamHandler

2019-07-11 Thread Vinay Sajip
Vinay Sajip added the comment: If None is passed, that is interpreted to mean whatever the implementation default is, and that is sys.stderr. For backwards compatibility, that won't change: and I don't see any need to update the documentation, as it makes it perfectly clear that sys.stderr

[issue37470] Make it explicit what happens when using a bounded queue with QueueHandler

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37470] Make it explicit what happens when using a bounded queue with QueueHandler

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 91f9f098fcdb023dbb89d06c8833e89a11cbae4c by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14533) https://github.com/python/cpython/commit

[issue37470] Make it explicit what happens when using a bounded queue with QueueHandler

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 844a9d64a4f640d1b20dc6ea54ab375680332d93 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) (GH-14534) https://github.com/python/cpython/commit

[issue37470] Make it explicit what happens when using a bounded queue with QueueHandler

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 0f4e8132820947d93eccf31b9e526b81c6ffa53d by Vinay Sajip in branch 'master': bpo-37470: Document more clearly the error handling for QueueHandler.emit(). (GH-14532) https://github.com/python/cpython/commit/0f4e8132820947d93eccf31b9e526b81c6ffa53d

[issue37470] Make it explicit what happens when using a bounded queue with QueueHandler

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +14345 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14532 ___ Python tracker <https://bugs.python.org/issu

[issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue.

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue.

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 6cde61369e8174c493ca240cb52ebc9c2a2fe667 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14525) https://github.com/python/cpython/commit

[issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue.

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset b0ab95bbe792b38e952688f8fa1657a78b35410e by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) (GH-14526) https://github.com/python/cpython/commit

[issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue.

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset e6b64b756f940147728ea7808fb686ffcae89176 by Vinay Sajip in branch 'master': bpo-37469: Document usability of SimpleQueue with QueueHandler and QueueListener. (GH-14521) https://github.com/python/cpython/commit

[issue37469] Make it explicit that logging QueueHandler / QueueListener accepts a SimpleQueue.

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +14335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14521 ___ Python tracker <https://bugs.python.org/issu

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 471d785dc759eb2e9c06f077f323cf136d32506b by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) (GH-14508) https://github.com/python/cpython/commit

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3db5c5c7630af92336a8c0a269e05607cd68f9e7 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) (GH-14507) https://github.com/python/cpython/commit

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-07-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 84de34e39eb9e49b2ae691c6f67df8d7da3561de by Vinay Sajip in branch 'master': bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498) https://github.com/python/cpython/commit

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-07-01 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +14314 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14498 ___ Python tracker <https://bugs.python.org/issu

[issue34556] Add --upgrade-deps to venv module

2019-06-29 Thread Vinay Sajip
Vinay Sajip added the comment: > Is there any way other than discussing with the release manager to have this > considered? I don't believe so. -- ___ Python tracker <https://bugs.python.org/i

[issue34556] Add --upgrade to venv module

2019-06-24 Thread Vinay Sajip
Vinay Sajip added the comment: > included with latest 3.8 or is there no chance of that? Unfortunately not, I think, as it missed the cut for 3.8beta1. Never mind! Thanks for your contribution. -- resolution: -> fixed stage: patch review -> resolved status: open -> clo

[issue34556] Add --upgrade to venv module

2019-06-22 Thread Vinay Sajip
Vinay Sajip added the comment: Can this issue be closed now? -- ___ Python tracker <https://bugs.python.org/issue34556> ___ ___ Python-bugs-list mailin

[issue32934] logging.handlers.BufferingHandler capacity is unclearly specified

2019-06-22 Thread Vinay Sajip
Vinay Sajip added the comment: Python isn't a low-level language, and there isn't *in general* a particular intention "to give a bound to memory usage". When using "buffer" in a general sense, rather than a buffer object (which is more akin to a byte-array), it's usuall

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-21 Thread Vinay Sajip
Vinay Sajip added the comment: > It's stored in pyvenv.cfg. Is it? $ python3.8maint -m venv --prompt "foo bar" /tmp/venv $ more /tmp/venv/pyvenv.cfg home = /home/vinay/projects/python/3.8 include-system-site-packages = false version = 3.8.0 prompt = 'foo bar' The source Py

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-21 Thread Vinay Sajip
Vinay Sajip added the comment: > I'll take a stab at implementing this [custom_script_path] I'll certainly look at a PR for this functionality. -- ___ Python tracker <https://bugs.python.org/issu

[issue28890] logging.handlers: Document that QueueListener is a daemon thread

2019-06-21 Thread Vinay Sajip
Change by Vinay Sajip : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue28890> ___ ___ Python-bugs-list

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: > Is there an architecture that would be less objectionable? One thing I would consider is the ability to configure a custom_script_path in the same way as other parameters are now. It would be used as follows: If not None, it should specify a direct

[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: How would you plan to replace the functionality where the venv's bin path is substituted into the script? Purely through introspecting its own path? I see that PowerShell is/will be portable to e.g. Linux environments, but I presume the security requirements

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: > Common python libraries that make use of environmental variables I didn't say environment variables weren't commonly used. I'm talking about the specific functionality this issue is about. > Overriding setup scripts is hardly a trivial task. O

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: > I'd prefer correctness to be always there automatically, rather than > something the user must remember to enable by setting a flag such as > lockCallHandling Yes, I agree, I was just looking at different approaches while mulling all this over. Co

[issue37349] venv.EnvBuilder environmental variable hooks

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: I'm not very keen on this approach, because it needs to be implemented across all shells and maintenance in this area can be a headache because not everyone has knowledge of multiple shells. There already are hooks for customising behaviour - you can subclass

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2019-06-20 Thread Vinay Sajip
Vinay Sajip added the comment: > I'd definitely suggest we go for a solution that doesn't hit performance of > normal logging I agree, but correctness is important. I'm tending to the following: 1. Introduce a lockCallHandling module-level variable, defaulting to False to maximise l

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- stage: -> resolved ___ Python tracker <https://bugs.python.org/issue37258> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- stage: resolved -> ___ Python tracker <https://bugs.python.org/issue37258> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue29001] logging.handlers.RotatingFileHandler rotation broken under gunicorn

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: Closing, as per last comment. -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35185] Logger race condition - loses lines if removeHandler called from another thread while logging

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: The other alternative would be to lock around callHandlers(). With the change you propose to addHandler/removeHandler, there are no errors, but the output of your test program is (with the lock acquisition/release in place): Thread finished after 468

[issue28890] logging.handlers: Document that QueueListener is a daemon thread

2019-06-19 Thread Vinay Sajip
New submission from Vinay Sajip : Why does that particularly need documenting? If it were a non-daemon thread, that might need documenting as the program would have to join() it or else seem to hang, but what does it matter if it's a daemon thread

[issue36033] logging.makeLogRecord should update "rv" using a dict defined with bytes instead of strings

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: Closing, as no further feedback from issue reporter. Feel free to reopen if you have a good response to my last comment. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Pytho

[issue35995] logging.handlers.SMTPHandler

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: Closing, as no answer has been received to the last question. -- resolution: -> not a bug status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset d7232f0e4646803f0bbaede6e1fa124156135512 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234) (GH-14235) https://github.com/python/cpython/commit

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset b64e42e931a3598d6f0605ec78673772f97ecd4c by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234) (GH-14236) https://github.com/python/cpython/commit

[issue36704] logging.FileHandler currently hardcodes errors='strict'

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: Fixed as part of the fix for bpo-37111. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.or

[issue28595] shlex.shlex should not augment wordchars

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.or

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset f06b569305cf604f070776ea3f800ed61fdd7d61 by Vinay Sajip in branch 'master': bpo-37331: Clarify format of socket handler messages in the documentation. (GH-14234) https://github.com/python/cpython/commit/f06b569305cf604f070776ea3f800ed61fdd7d61

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +14070 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14234 ___ Python tracker <https://bugs.python.org/issu

[issue37331] logging.handlers.DatagramHandler sends bad data to socketserver.DatagramRequestHandler

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: It is mentioned here: https://docs.python.org/3/library/logging.handlers.html?highlight=datagramhandler#logging.handlers.SocketHandler.makePickle although that doesn't go into the detail of the struct.pack format. I'll update the documentation to rectify

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37258> ___ ___ Pyth

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 95ff622028b4f5d2eefbff557eadbb08fbcd42b1 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229) (GH-14230) https://github.com/python/cpython/commit

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 9eb4b2c8a3387ea901dad793e8d5586880a5968e by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229) (GH-14231) https://github.com/python/cpython/commit

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 015000165373f8db263ef5bc682f02d74e5782ac by Vinay Sajip in branch 'master': bpo-37258: Not a bug, but added a unit test and updated documentation. (GH-14229) https://github.com/python/cpython/commit/015000165373f8db263ef5bc682f02d74e5782ac

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +14065 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14229 ___ Python tracker <https://bugs.python.org/issu

[issue37258] Logging cache not cleared properly when setting level

2019-06-19 Thread Vinay Sajip
Vinay Sajip added the comment: This is not actually a bug, but happens because the logger is instantiated directly, rather than through logging.getLogger(...). Because of the direct instantiation, the logger cache isn't tracked via setLevel() - because the logger doesn't end up

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-17 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.or

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-17 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset ca7b504a4d4c3a5fde1ee4607b9501c2bab6e743 by Vinay Sajip in branch 'master': bpo-37111: Add 'encoding' and 'errors' parameters to logging.basicCon… (GH-14008) https://github.com/python/cpython/commit/ca7b504a4d4c3a5fde1ee4607b9501c2bab6e743

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-12 Thread Vinay Sajip
Vinay Sajip added the comment: > On the other hand, couldn't we use different default error handler? "replace" or "backslashescape" seems better default error handler for the logging. I've left it as is using the same rationale as I guess open() has at the moment - &q

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-12 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: +13871 pull_request: https://github.com/python/cpython/pull/14008 ___ Python tracker <https://bugs.python.org/issue37

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-09 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +13798 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/13932 ___ Python tracker <https://bugs.python.org/issu

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: Different people have different ideas of what a default should be. You can pretty much guarantee that whatever a default is, someone will think it should be something else. The basicConfig functionality has been around in its present form since 2003

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: Learning is not a waste of time. You're entitled to your opinion, but this is not a bug in logging. We'll have to agree to disagree. -- ___ Python tracker <https://bugs.python.org/issue37

[issue28595] shlex.shlex should not augment wordchars

2019-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 56624a99a916fd27152d5b23364303acc0d707de by Vinay Sajip (Evan) in branch 'master': bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071) https://github.com/python/cpython/commit/56624a99a916fd27152d5b23364303acc0d707de

[issue37117] Simplify customization of the logging time through datefmt

2019-06-01 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37117> ___ ___

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: > This seems like an attempt at victim blaming. Er, no, it was a straight question about whether you'd read the documentation. > I'm afraid this line of reasoning is suffering from selection bias, cherry > picking, confirmation bias, and probably so

[issue37117] Simplify customization of the logging time through datefmt

2019-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: > AFAIK, the converter attribute is only to "be set" with a function of such > signature. It is not documented that it can be used and it is only used on > the format time function. What do you mean by "it is not documented"?

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: > Doing something as basic as logging unicode shouldn't require knowledge of > "handlers" - that's failing "simple is better than complex". I reiterate my statement that it appears that you aren't sufficiently familiar with how l

[issue37117] Simplify customization of the logging time through datefmt

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: The documentation mentions that the converter attribute of the formatter should be signature-compatible with time.localtime() and time.gmtime(), and some users will have set this attribute with one or the other or a compatible function. Doesn't your change

[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: > Given that the file created by the logger is utf-8, it's unclear why it > doesn't work ... I found a workaround by using a Handler Loggers don't create files - handlers do. The file that you attached seems to be just a text file containing ASCII tex

[issue37092] LoggerAdapter doesn't have fatal() like Logger

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: FATAL and fatal() are synonyms for CRITICAL and critical(), and they are only around because of backward compatibility constraints on the Logger class at the time logging was added to Python. Because LoggerAdapter has no backward compatibility constraints

[issue37104] logging.Logger.disabled is not documented

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: As it's not documented, people would come across it by browsing the source. I'd just mention in the source (Logger constructor) that it's for internal use, and leave it at that. -- ___ Python tracker <ht

[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: I grant that your version is more compact, but I don't find it more readable in general (perhaps it is for very experienced Python developers/developers who like a functional style, but I persoanlly don't think it improves readability). Since the rationale

[issue37104] logging.Logger.disabled is not documented

2019-05-31 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for looking at this, Mario, but I'd rather not document this attribute, for the reason stated on the PR when I closed it: "I'd like to avoid documenting this attribute, as it's really meant for internal use by the configuration machinery. I re

[issue22454] Adding the opposite function of shlex.split()

2019-05-29 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset ca804955927dddb6ae5a846dbc0248a932be9a4e by Vinay Sajip (Bo Bayles) in branch 'master': bpo-22454: Add shlex.join() (the opposite of shlex.split()) (GH-7605) https://github.com/python/cpython/commit/ca804955927dddb6ae5a846dbc0248a932be9a4e

[issue36015] streamhandler cannot represent streams with an integer as name

2019-05-15 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: not a bug -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36015] streamhandler cannot represent streams with an integer as name

2019-05-15 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 78dd781ef4d41dfefad53aa3bc52c39b0d443b19 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) (GH-13183) https://github.com/python/cpython/commit

[issue36015] streamhandler cannot represent streams with an integer as name

2019-05-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset ca87eebb22d202c33f3317cbf85059cadc64fa9f by Vinay Sajip (Riccardo Magliocchetti) in branch 'master': bpo-36015: Handle StreamHandler representaton of stream with an integer name (GH-11908) https://github.com/python/cpython/commit

[issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories

2019-04-09 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue33456] site.py: by default, a virtual environment is *not* isolated from the system-level site-packages directories

2019-04-09 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset c324c748871804f31f56b3bd02a8650b3bf1bae7 by Vinay Sajip (Lukas Waymann) in branch 'master': bpo-33456: site module documentation - fix wrong default for key in pyvenv.cfg (GH-6755) https://github.com/python/cpython/commit

[issue35726] QueueHandler formatting affects other handlers

2019-04-07 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 2dad96013ca24abdc5ba5a369ea42d70ff02487a by Vinay Sajip (Xtreak) in branch 'master': bpo-35726: Add test for QueueHandler with multiple handlers (GH-11659) https://github.com/python/cpython/commit/2dad96013ca24abdc5ba5a369ea42d70ff02487a

[issue35726] QueueHandler formatting affects other handlers

2019-04-07 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: -11458 ___ Python tracker <https://bugs.python.org/issue35726> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35726] QueueHandler formatting affects other handlers

2019-04-07 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: -11459 ___ Python tracker <https://bugs.python.org/issue35726> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35726] QueueHandler formatting affects other handlers

2019-04-07 Thread Vinay Sajip
Change by Vinay Sajip : -- pull_requests: -11460 ___ Python tracker <https://bugs.python.org/issue35726> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36532] Example of logging.formatter with new str.format style

2019-04-05 Thread Vinay Sajip
Vinay Sajip added the comment: But there is an example in the cookbook already: https://docs.python.org/3/howto/logging-cookbook.html#use-of-alternative-formatting-styles It's right there in the first code sample in that section. You might want to amend your change to point to this section

[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-18 Thread Vinay Sajip
Vinay Sajip added the comment: > If the `disabled` attribute should not be part of the public API it should > have been name `_disabled`. A bit late for that now, and AFAIK it hasn't caused people insuperable problems heretofore - the code has been like this pretty much since the l

[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-18 Thread Vinay Sajip
Vinay Sajip added the comment: > Actually people do this all the time, to deactivate the logging of some > third-party libraries (me included). It would be better to set the level of those loggers to e.g. ERROR or CRITICAL rather than disabling them altogether - presumably if somethi

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-18 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker <https://bugs.python.or

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-18 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 6a7a9f1d83cef628d2bacd71ee568b93f53fd6b4 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-36272: Logging now propagates RecursionError (GH-12312) (GH-12391) https://github.com/python/cpython/commit

[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-17 Thread Vinay Sajip
Vinay Sajip added the comment: I don't see any value in configuring a logger which starts as disabled - making it completely useless - why would one want to do this? I don't think the "consistency" argument flies in this case. --

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-15 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 65f64b1903ae85b97a30f514bbc1b7ce940c3af2 by Vinay Sajip (RĂ©mi Lapeyre) in branch 'master': bpo-36272: Logging now propagates RecursionError (GH-12312) https://github.com/python/cpython/commit/65f64b1903ae85b97a30f514bbc1b7ce940c3af2

[issue36015] streamhandler cannot represent streams with an integer as name

2019-03-06 Thread Vinay Sajip
Vinay Sajip added the comment: Sorry, Riccardo, been very busy lately and not had time to look at it :-( Soon, I hope. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36193] Redirected stderr not reset properly when using logging

2019-03-06 Thread Vinay Sajip
Vinay Sajip added the comment: The StreamHandler allows you to specify *exactly* which stream you want to use to log to; sys.stderr is provided as a convenient default argument because that's what a lot of people want a lot of the time. This is typically done at logging configuration time

[issue35995] logging.handlers.SMTPHandler

2019-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: The existing implementation supports doing an SSL handshake using STARTTLS, which provides encryption for the actual email traffic. You are asking, it seems, to support a server that only listens on an already encrypted connection, and doesn't use STARTTLS

[issue36033] logging.makeLogRecord should update "rv" using a dict defined with bytes instead of strings

2019-02-19 Thread Vinay Sajip
Vinay Sajip added the comment: If the arguments are retrieved from a byte source, why can't they be converted to strings before passing to logging? This may be an issue for OpenStack. It's not logging's job to convert bytes passed to APIs that expect strings

[issue36015] streamhandler cannot represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Change by Vinay Sajip : -- title: streamhandler canont represent streams with an integer as name -> streamhandler cannot represent streams with an integer as name ___ Python tracker <https://bugs.python.org/issu

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: > That is, when opening a file descriptor the name is set to the value of that > file descriptor as an integer. I see. But I wonder if there is anything that relies on the name being an integer? It seems pretty counter-intuitive for a 'name' att

[issue36015] streamhandler canont represent streams with an integer as name

2019-02-18 Thread Vinay Sajip
Vinay Sajip added the comment: I'm not sure this is a problem with logging. The code immediately preceding the failure is: name = getattr(self.stream, 'name', '') if name: name += ' ' So, the failure occurs because the stream has a name attribute which is not a string. Even

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-28 Thread Vinay Sajip
Vinay Sajip added the comment: > I'm not sure which part of what I wrote you think is inaccurate. It's just that language can be tricky. When you said "pass to the parent logger" this might be misconstrued as some kind of call to a method of the parent logger. Your OP says t

[issue35821] Clarify when logging events are propagated when propagate is true

2019-01-25 Thread Vinay Sajip
Vinay Sajip added the comment: That isn't quite accurate. A logger's attached handlers will always be offered a chance to handle an event if the logger's level and filters allow. However, the event is not actually passed to ancestor loggers - it is directly offered to any handlers attached

<    1   2   3   4   5   6   7   8   9   10   >