Vinay Sajip added the comment:
New changeset 174fbd85f60d7877d3a4f58214a852209f8dfbea by Vinay Sajip in branch
'main':
bpo-44399: Document another example of unexpected behavior. (GH-27407)
https://github.com/python/cpython/commit/174fbd85f60d7877d3a4f58214a852209f8dfbea
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Vinay Sajip :
--
pull_requests: +25940
pull_request: https://github.com/python/cpython/pull/27407
___
Python tracker
<https://bugs.python.org/issue44
Vinay Sajip added the comment:
> the problem with namer solution is that it will stop respecting backupCount
> parameter
Not necessarily, as far as I can tell. Can you give a specific rationale for
your statement - how does that happen, if the namer has been implemented
carefully
Vinay Sajip added the comment:
New changeset 5a0c6abb569cadfc6b418a7d23ecffec01bd234d by Miss Islington (bot)
in branch '3.9':
[3.9] bpo-44399: Update logging cookbook to document patterns to be avoided.
(GH-27348) (GH-27350)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset 628baf6fef4d633e756024cf813941a4075360c1 by Miss Islington (bot)
in branch '3.10':
[3.10] bpo-44399: Update logging cookbook to document patterns to be avoided.
(GH-27348) (GH-27352)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset 59058a65a27de434a79adb749637b74a7fe418ba by Miss Islington (bot)
in branch '3.10':
[3.10] bpo-43184: Add information about added attribute and method. (GH-27347)
(GH-27355)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset ce2033694ef4bf4c304e5c98d19fdeb684cd961b by Miss Islington (bot)
in branch '3.9':
[3.9] bpo-43184: Add information about added attribute and method. (GH-27347)
(GH-27353)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset 9751f85914e0ef3324671a91da34a635d48b17fb by Vinay Sajip in branch
'main':
bpo-44399: Update logging cookbook to document patterns to be avoided.
(GH-27348)
https://github.com/python/cpython/commit/9751f85914e0ef3324671a91da34a635d48b17fb
Vinay Sajip added the comment:
New changeset 50b72768ffe6413424dc4eba916dd1ff89a2fe7b by Vinay Sajip in branch
'main':
bpo-43184: Add information about added attribute and method. (GH-27347)
https://github.com/python/cpython/commit/50b72768ffe6413424dc4eba916dd1ff89a2fe7b
Change by Vinay Sajip :
--
keywords: +patch
pull_requests: +25889
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27348
___
Python tracker
<https://bugs.python.org/issu
Change by Vinay Sajip :
--
keywords: +patch
pull_requests: +25888
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27347
___
Python tracker
<https://bugs.python.org/issu
Vinay Sajip added the comment:
In this case, there are two reasons IMO for not doing this:
1. Backward compatibility might be affected.
2. It may be more important to conform to venv conventions than Powershell
conventions in this specific case.
I wasn't aware that PowerShell scripts out
Vinay Sajip added the comment:
> But, the prepare method doesn't do the enqueuing operation, it just prepares
> the record and returns it back, so it seems like this statement is not
> accurate?
It merely states what happens to the return value. It doesn't say it has
already been
Change by Vinay Sajip :
--
keywords: +patch
pull_requests: +25682
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27140
___
Python tracker
<https://bugs.python.org/issu
Vinay Sajip added the comment:
> It looks like an unexpected behavior to me when reading the doc.
Perhaps you missed this?
https://docs.python.org/3/library/logging.html?highlight=exc_text#logging.Formatter.format
"Note that the formatted exception information is cached in attribute
Vinay Sajip added the comment:
As Henk-Jaap points out, this is not a bug. You can't take a single sentence or
even paragraph without considering the whole picture. In particular, this
section
https://docs.python.org/3/howto/logging.html#what-happens-if-no-configuration-is-provided
Change by Vinay Sajip :
--
type: -> enhancement
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue44489>
___
___
Python-
Vinay Sajip added the comment:
> But I understand if this is out of scope.
I think it's out of scope here (as discussion of such issues will obscure the
basic point about how to use the namer and rotator).
However, it might be useful to have a "gotchas" section somewhere in
Vinay Sajip added the comment:
The cookbook example is (by design) limited in scope and doesn't especially
discuss usage in multi-thread or multi-process scenarios - as with other
examples in the cookbook which aren't specifically concerned with such
scenarios. I don't think
Vinay Sajip added the comment:
> Oh, sorry bad wording.
OK, I see. Will take a look soon.
> it looks like we can refactor SysLogHandler to inherit from SocketHandler.
> Not sure if it should be done in this PR
Better a separate PR for that, I feel.
Removing the older Pyt
Vinay Sajip added the comment:
> i thought any warning message or exception handling was necessary. Or (venv)
> doesn't show up.
No, because these are just scripts created by venv and placed in the venv's
directory tree. If you then move the files to a different location, they
Vinay Sajip added the comment:
> right now it has reconnection logic for unixsocket but not for tcp/udp
Should it not have UDP/TCP supported as well as domain sockets, before being
reviewed?
--
nosy: +vinay.sajip
___
Python tracker
<
Vinay Sajip added the comment:
venvs aren't meant to be portable (i.e. renaming the directory or moving to a
new location). Scripts installed into a venv have absolute paths pointing to
the location when the venv was created.
venvs should be treated as throwaway resources that can
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python
Change by Vinay Sajip :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue17153>
___
___
Change by Vinay Sajip :
--
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
Seems a bit of a pathological case - out of interest, why do you need to create
tens of thousands of loggers and handlers? Each logger is supposed to represent
an area of the application. If you want to track e.g. client IP requests or
similar
Vinay Sajip added the comment:
You can't expect things to work if you introduce ambiguities such as a
attribute `bar` in module `foo` as well as a `foo.bar` module. If there were a
clear delineation between where a module stops and where a set of attributes
starts, e.g
Vinay Sajip added the comment:
> bar module use logging module of stdlib not bar.logging module in this test
> case.
Then bar.logging is ambiguous. There's no reason one has to use a stdlib
package name in one's own package.
--
___
Vinay Sajip added the comment:
The problem is caused by the "import logging" in bar/__init__.py, which causes
bar.logging to not be found because it clashes with the stdlib logging package.
If you change the statement to
from . import logging
then the error does not occur. So I d
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
This is not a bug - venvs are primarily *run*-time (as opposed to
development-time) environments, into which you install pre-built Python
packages (including ones with C extensions). Can you give a specific example
where creating a venv and installing packages
Change by Vinay Sajip :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43344>
___
___
Vinay Sajip added the comment:
I'll add to the cookbook recipe with this real-world example, when I get a
chance.
--
___
Python tracker
<https://bugs.python.org/issue43
Vinay Sajip added the comment:
> Thanks Vinay, I was able to do this
Glad to hear it, Kevin. That namer is exactly what I had in my mind's eye ;-)
So shall I close the issue?
--
___
Python tracker
<https://bugs.python.org/issu
Vinay Sajip added the comment:
Sure, I'll look at a PR that mentions the other usage above the "changed in
3.4" section.
--
___
Python tracker
<https://bugs.python.o
Vinay Sajip added the comment:
As per the documentation at
https://docs.python.org/3/library/logging.handlers.html#logging.handlers.BaseRotatingHandler.namer
You can set the handler's "namer" attribute to a callable that returns a
computed name for the rotated file - this can b
Vinay Sajip added the comment:
This is not a bug. See
https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes
You should use SocketHandler or QueueHandler to deal with a situation where
multiple processes log to files (whether rotating
Vinay Sajip added the comment:
> As far as I know, this only happens during shutdown. During shutdown it has
> already removed the attribute as part of the teardown process. In this case
> adding the attribute at the begining will do no good.
Certainly, that's true - there are
Vinay Sajip added the comment:
TBH as I said in the now-closed PR, using a NullSocket seems overkill. As
mentioned in msg359594, it seems to make more sense to assign a socket
attribute to None early in the constructor. If an error occurs during socket
creation, the socket attribute
Vinay Sajip added the comment:
This is not a bug - this is how it is supposed to work. The handlers module
isn't automatically loaded; you have to import it. The basic handlers
(NullHandler, StreamHandler, FileHandler) are in the logging module -
additional handlers are in logging.handlers
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset f8bea0a44d718296a249bdb766b8dbc92f38e8df by Zackery Spytz in
branch '3.9':
[3.9] bpo-4bpo-42314: Fix the documentation for venv --upgrade-deps (GH-22113)
(GH-23232)
https://github.com/python/cpython/commit/f8bea0a44d718296a249bdb766b8dbc92f38e8df
Vinay Sajip added the comment:
> Should this be closed and pushed back to fixing logging?
It's not particularly a logging issue, though it can surface in logging because
that's a mechanism to notify users about stuff. After all, most parts of the
stdlib would expect open() to alw
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset dff9161821032acfd2588d42d88511ebdbabaaf3 by Miss Skeleton (bot)
in branch '3.9':
bpo-42011: Update documentation of logging.Filter.filter() (GH-22692) (GH-22725)
https://github.com/python/cpython/commit/dff9161821032acfd2588d42d88511ebdbabaaf3
Vinay Sajip added the comment:
New changeset 8f7eab788aedcf1a23ef9be767e1b3502a6bbd5c by Miss Skeleton (bot)
in branch '3.8':
bpo-42011: Update documentation of logging.Filter.filter() (GH-22692) (GH-22724)
https://github.com/python/cpython/commit/8f7eab788aedcf1a23ef9be767e1b3502a6bbd5c
Vinay Sajip added the comment:
New changeset e9959c71185d0850c84e3aba0301fbc238f194a9 by Necdet Can Atesman in
branch 'master':
bpo-42011: Update documentation of logging.Filter.filter() (GH-22692)
https://github.com/python/cpython/commit/e9959c71185d0850c84e3aba0301fbc238f194a9
Change by Vinay Sajip :
--
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue42011>
___
___
Python-bugs-list mailin
Vinay Sajip added the comment:
I agree that the documentation now should use Booleans rather than ints for the
return type. It's a hangover from the pre-bool days of Python 1.5.2 ...
> P.S. As a side note, the API for filter() is quite counter-intuitive
That depends on if you consi
Vinay Sajip added the comment:
New changeset f5393dc2a0ced7bf670ebc56b5fd10a3eb328d1a by Victor Stinner in
branch '3.9':
bpo-41739: Fix test_logging.test_race_between_set_target_and_flush() (GH-22655)
(GH-22656)
https://github.com/python/cpython/commit
Change by Vinay Sajip :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41483>
___
___
Change by Vinay Sajip :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue41943>
___
___
Python-bugs-list mailing list
Unsubscribe:
Vinay Sajip added the comment:
OK, I'll mark as pending and close in a few days if nothing more is heard from
Kostis.
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issu
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset faa8c6a8f1fe9c3bac31061e8a59a686b983ebb8 by Miss Skeleton (bot)
in branch '3.9':
bpo-41898: add caveat on root logger seeing all messages in assertLogs doc
(GH-22526) (GH-22540)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset b2611fac05ed391d68f09781903aae7394fab832 by Miss Skeleton (bot)
in branch '3.8':
bpo-41898: add caveat on root logger seeing all messages in assertLogs doc
(GH-22526) (GH-22537)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
New changeset 1ed54435268b285964141fb74d47ceaa33ea79ab by Irit Katriel in
branch 'master':
bpo-41898: add caveat on root logger seeing all messages in assertLogs doc
(GH-22526)
https://github.com/python/cpython/commit/1ed54435268b285964141fb74d47ceaa33ea79ab
Vinay Sajip added the comment:
You make reasonable points. I won't close this issue, and get to those updates
when I can/as time allows. Meanwhile, if you or someone else proposes specific
changes by way of a pull request, I'll look at that too. And thanks for your
kind words about
Vinay Sajip added the comment:
The value of the '()' key should be a factory - something that returns a filter
(either something that has a filter method or a callable). That returned
callable, or the filter method, will be called with a LogRecord and its return
value used to determine
Vinay Sajip added the comment:
FYI I'm in the process of updating distlib to add the get_platform() /
get_host_platform() distinction. The next release should have it.
--
keywords: +3.5regression
___
Python tracker
<https://bugs.python.
Vinay Sajip added the comment:
It's as Eric said. So I'll close this issue as "not a bug". An additional point
- by using f-strings, you may be doing unnecessary string formatting - e.g. if
the event doesn't actually get handled because of logger or handler level or
filter sett
Vinay Sajip added the comment:
If no PR is forthcoming for this, I'd like to close this issue as out of date.
Any objections?
--
___
Python tracker
<https://bugs.python.org/issue30
Vinay Sajip added the comment:
As there's (AFAIK) been no progress on this, I'd like to close this issue. Any
objections?
--
___
Python tracker
<https://bugs.python.org/issue28
Vinay Sajip added the comment:
I'd like to close this issue as out of date - anyone object?
--
___
Python tracker
<https://bugs.python.org/issue12174>
___
___
Vinay Sajip added the comment:
Can we close this? I guess this enhancement is no longer needed.
--
___
Python tracker
<https://bugs.python.org/issue22
Vinay Sajip added the comment:
Closing, as the OP said "Since I can work around it easily enough, I'm set for
now."
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs
Vinay Sajip added the comment:
@Oleg In the interests of clarity, can you please give more detail about the
network topology and sequence of events in your use case? Where the machine
with the SocketHandler is, where the socket server is that it's sending to,
where the TCP balancer comes
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset c978be283db768743d995f04414c65439a632bdd by Miss Islington (bot)
in branch '3.9':
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.*
functions (GH-21763) (GH-5)
https://github.com/python/cpython/commit
Change by Vinay Sajip :
--
versions: -Python 3.7
___
Python tracker
<https://bugs.python.org/issue33239>
___
___
Python-bugs-list mailing list
Unsubscribe:
Vinay Sajip added the comment:
New changeset bf50b0e80a8a0d651af2f953b662eeadd27c7c93 by Miss Islington (bot)
in branch '3.8':
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.*
functions (GH-21763) (GH-6)
https://github.com/python/cpython/commit
Change by Vinay Sajip :
--
versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6
___
Python tracker
<https://bugs.python.org/issue33239>
___
___
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset 3fd69991f47a6672c510fafd76bf183f17ac52ec by Irit Katriel in
branch 'master':
bpo-38762: Extend logging.test_multiprocessing to cover missing cases.
(GH-22142)
https://github.com/python/cpython/commit/3fd69991f47a6672c510fafd76bf183f17ac52ec
Vinay Sajip added the comment:
> if any author of any module that you use changes the global logger
> configuration
This is an anti-pattern - any library module which does this should have a bug
report raised about it. Only applications should change the logging
configuration. C
Vinay Sajip added the comment:
See also bpo-8200, which relates to the way the code is currently.
--
___
Python tracker
<https://bugs.python.org/issue38
Vinay Sajip added the comment:
> It is enough to reopen the socket and send the current message again.
A common reason for connection failure in SocketHandler is the other end going
offline for some reason. The offline period can often be measured in seconds to
hours, or even lon
Vinay Sajip added the comment:
> But when we use TCP it is expected that log messages will not be lost.
I wouldn't go that far: logging is not a primary program function (i.e. the
library or application should work exactly the same if logging were to be
disabled). For the situation wh
Vinay Sajip added the comment:
> Implementing a work-around solely based on x64 ABI is not correct.
But AFAIK the test_array_in_struct test passes on AIX and exercises the
workaround - why does it work if the workaround is faulty? If OTOH the test is
faulty, could you update it with c
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset 2353d77fad7ed9d11d8a4d66b5dd1306cdb94125 by Irit Katriel in
branch 'master':
bpo-41503: Fix race between setTarget and flush in
logging.handlers.MemoryHandler (GH-21765)
https://github.com/python/cpython/commit
Vinay Sajip added the comment:
> an array definition in a structure is always part of the struct itself and is
> never a pointer
True, but a problem only arises in practice when passing by value in registers.
It's still an open libffi issue that doesn't look like it's going to be
Vinay Sajip added the comment:
> stgdict.c currently includes a target-specific work-around for small
> structures that is not restricted to the one target (x64) affected. What's
> the best way to proceed?
I think more data is needed to determine the best way to proceed. The
Vinay Sajip added the comment:
Thanks for the PR. I reviewed it and requested changes about 3 weeks ago - you
should have received a notification from GitHub when that happened.
--
___
Python tracker
<https://bugs.python.org/issue41
Vinay Sajip added the comment:
New changeset c82dda1e08c4b74ca24f88d6a549d93108c319cf by Zackery Spytz in
branch 'master':
bpo-35328: Set VIRTUAL_ENV_PROMPT at venv activation (GH-21587)
https://github.com/python/cpython/commit/c82dda1e08c4b74ca24f88d6a549d93108c319cf
Vinay Sajip added the comment:
Agreed that a library on PyPI is the appropriate way to resolve this.
--
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.org/i
Change by Vinay Sajip :
--
nosy: -vinay.sajip
___
Python tracker
<https://bugs.python.org/issue40275>
___
___
Python-bugs-list mailing list
Unsubscribe:
Vinay Sajip added the comment:
OK, seems like a reasonable use case. I haven't looked at the PR yet, as it
still has a "CLA not signed" label, and I normally wait until the CLA is signed
before looking more closely at PRs.
--
___
Pyth
Vinay Sajip added the comment:
> If it is not goal
I don't have a goal to make these part of a documented API. OP, can you share a
use case where you need to iterate over these internal structures?
--
___
Python tracker
<https://bugs.pyth
Vinay Sajip added the comment:
> I think the other issue here is that the ConvertingX classes aren't
> documented apart from comments in the code where they are defined.
That's deliberate - they're considered an internal implementation
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
New changeset 6b34d7b51e33fcb21b8827d927474ce9ed1f605c by Kit Choi in branch
'master':
bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)
https://github.com/python/cpython/commit/6b34d7b51e33fcb21b8827d927474ce9ed1f605c
Vinay Sajip added the comment:
This is a change in behaviour, so probably needs to be added to future versions
only.
--
nosy: +vinay.sajip
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.org/issue41
Change by Vinay Sajip :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Vinay Sajip added the comment:
The problem appears to be in importlib. I put in a breakpoint in the test just
before it tries to import the module é. (At this point it has successfully
imported a module called वमस in an earlier loop iteration.)
Then, in a different terminal console, I cd'd
Vinay Sajip added the comment:
Yes, they could have a docstring indicating that it is better to use
critical(). Feel free to update the PR along that line.
--
___
Python tracker
<https://bugs.python.org/issue40
101 - 200 of 2016 matches
Mail list logo