Ben Feinstein added the comment:
Here is a code that demonstrate the bug:
```python
import logging
class LogRecordTypeFilter(logging.Filter):
def __init__(self, cls):
self.cls = cls
def filter(self, record):
t = type(record)
if t is not self.cls
Ben Feinstein added the comment:
I use the logging module to log records of lab experiments. I have two
types of loggers, one for experiment results ("data") and another for
general information. I think that having a different managers for data
loggers is the easiest way to do it.
O
Ben Feinstein added the comment:
General loggers are used in the standard way (message, args, etc), but data
loggers are used for different types of data. Instead of message, they
receive the experiment results (dict/list/np.array/binary data) and their
`formatMessage()` method should be
Ben Elliston added the comment:
Is there a simple workaround that one can put into setup.py in the meantime? I
tried using compiler.compiler.remove('-Wstrict-prototypes') to no avail.
--
nosy: +bje
___
Python tracker
<https://bu
New submission from Ben FrantzDale :
The sortedness of glob.glob's output is platform-dependent. While the docs do
not mention sorting, and so are strictly correct, if you are on a platform
where its output is sorted, it's easy to believe that the output is always
sorted.
I propose
Ben FrantzDale added the comment:
Fascinating. That seems like an even wilder gotcha: It sounds like a script
assuming sorted results would work in one directory (on one filesystem) but not
on another. Or even weirder, if I had a mounted scratch partition, the script
could work until I (or a
Ben FrantzDale added the comment:
Great point. Looks like the phrase is "in arbitrary order" in the docs for
those (both 2.7 and 3), which is better than saying nothing. I'd still
prefer a bit more specificity about the potential gotcha since "arbitrary"
seems a lo
Ben FrantzDale added the comment:
I looked into it a bit more. With python 2.7 on macOS High Sierra on APFS
(Encrypted) with a FAT32 thumb drive... I have a directory that
glob.glob('/Volumes/thumb/tmp/*') shows as sorted. I cp -r that to /tmp with
bash. glob.glob('/tmp/tmp
Ben Mather added the comment:
The patch is indeed a little outdated, but I would be happy to pick it and get
it working again.
First we need a resolution to #22630 though.
Currently calling `cancel` will invoke callbacks, but waiters won't be
triggered until `set_running_or_notify_cance
Ben Mather added the comment:
@Nathaniel
RE `remove_done_callback`: This was added as an optimisation to allow the
`as_completed` iterator to remove callbacks for future that it has visited
instead of having to store a separate set of visited futures and ignore them
when their callbacks are
New submission from Ben Burrill :
fractions.Fraction enforces its numerator and denominator to be rational. This
is a good idea for purely numeric fractions, but the abstractions that
fractions.Fraction offers would also be useful for more abstract fractions.
Some places where this might be
Change by Ben Burrill :
--
nosy: +mark.dickinson, rhettinger
___
Python tracker
<https://bugs.python.org/issue31707>
___
___
Python-bugs-list mailing list
Unsub
Ben Burrill added the comment:
The core operators, like multiplication and division, should work for any type
that defines the right operators. Hashing is tricky, and reducing the fraction
is pretty much off the table. This is why I suggested a superclass. I'll try
making a patch som
New submission from Ben Bolker :
In two places in https://www.python.org/dev/peps/pep-0485/ floating point
numbers are incorrectly formatted: 1-e8 and 1-e9 rather than 1e-8 and 1e-9
("absolute tolerance default", para. 3 and "relative tolerance default", para.
1)
---
Ben Hoyt added the comment:
I don't think this is a good idea. I still use time.clock() out of habit (on
Windows), and from the PR it's clear that the standard library and tests do
too. I wouldn't be at all surprised to find others do as well.
I realize it's been depre
Ben Finney added the comment:
On 23-Oct-2017, Serhiy Storchaka wrote:
> Is it all with this issue?
I accept Nick's reasoning:
> As a general principle, we don't give value information in type
> errors, since the error is structural rather than value based.
as suff
Ben Darnell added the comment:
It's worse than a resource leak - the same file descriptor number could be
reused for a different file/socket, and then depending on the selector in use,
you could see the data from a completely different connection.
I did see a bug like this years ag
Ben Darnell added the comment:
Note that a guard on socket objects can only solve part of the problem: in the
case where i've seen this bug, it was with raw file descriptors from libcurl,
and there's nothing python can do about that because there are no (python)
sock
New submission from Ben Hyde :
With the fix below is becomes possible to build rpms on the Mac.
The developer will need to install rpm tooling. That's easy via "brew install
rpm".
That, for example, installs /usr/local/bin/rpmbuild.
Sadly bdist_rpm.py only supports rpmbuil
Ben North added the comment:
PR4823 created as per msg308086.
--
___
Python tracker
<https://bugs.python.org/issue18533>
___
___
Python-bugs-list mailin
Change by Ben North :
--
pull_requests: +4716
___
Python tracker
<https://bugs.python.org/issue32137>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Finney added the comment:
On 14-Jun-2018, Pablo Galindo Salgado wrote:
> I think this should be something that is not included in argparse
> itself. I can imagine a scenario in which the manpage is accessible
> through `./python foo.py --manpage` but the manpage is not
Ben Finney added the comment:
On Thu, 2018-06-14 20:02 +, Pablo Galindo Salgado
wrote:
> The (possible) confusion is the existence of a manpage only available
> though argparse (`./python foo.py --manpage`)
This report isn't asking for that. (I see only one person propos
Ben Finney added the comment:
On Thu, 2018-06-14 23:46 +, Aaron Meurer wrote:
> Couldn't such a tool exist outside the standard library.
I've tried writing such a tool. It would ideally re-use as much as feasible of
the functionality that assembles the usage message
Ben Doremus added the comment:
Did this patch die? I ran into the same issue noted in the SO post. It's
bizarre that KeyError is the only error message to handle things this way.
--
nosy: +bdoremus
___
Python tracker
<https://bugs.py
Change by Ben McGinnes :
--
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue1016626>
___
___
Python-bug
Ben Spiller added the comment:
Hi it's been a few years now since this was reported and it's still a problem,
any chance of a fix for this? The API gives the impression that if you pass
python strings to the XML API then the library will generate valid XML. It
takes care of t
New submission from Ben Darnell :
Currently, most type annotations for the standard library are provided in
typeshed rather than in the library itself. Not all consumers of type
annotations are aware of typeshed, and this can cause problems. Specifically,
Sphinx 1.8 accesses type hints via
New submission from Ben Hoyt :
There are a couple of examples in the "Input and Output" section of the
tutorial that use an unusual / non-PEP 8 Python style or whitespace. I think
our examples, especially in the tutorial, should reflect good, PEP 8 style.
I'll fix these in
Change by Ben Hoyt :
--
keywords: +patch
pull_requests: +8784
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34712>
___
___
Python-
Ben Hoyt added the comment:
GitHub PR link with changes and commit notes attached.
--
___
Python tracker
<https://bugs.python.org/issue34712>
___
___
Python-bug
Ben Darnell added the comment:
Yeah, I think that would work at least for the sphinx use case. It seems like a
strange partially-degraded mode and anything that needs structured access to
the annotation would still need typeshed, but just getting the string would
probably be enough for a
Ben Spiller added the comment:
To help anyone else struggling with this bug, based on
https://lsimons.wordpress.com/2011/03/17/stripping-illegal-characters-out-of-xml-in-python/
the best workaround I've currently found is to define this:
def escape_xml_illegal_chars(unicodeS
Ben Darnell added the comment:
We have an easy reproduction of this "[Errno 0] Error" on the server side in
https://github.com/tornadoweb/tornado/issues/2504#issuecomment-426782158
It is triggered by a connection from `nc -z` (which I think is doing a TCP
handshake and shuttin
Change by Ben Spiller :
--
nosy: +Ben Spiller
___
Python tracker
<https://bugs.python.org/issue5166>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ben Spiller :
I just came across a fairly serious thread-safety / race condition bug in the
logging.Loggers class, which causes random log lines to be lost i.e. not get
passed to some of the registered handlers, if (other, unrelated) handlers are
being added/removed using
Ben Hyde added the comment:
ping
--
___
Python tracker
<https://bugs.python.org/issue32281>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Changes by Ben Hearsum :
--
nosy: +Ben.Hearsum
___
Python tracker
<http://bugs.python.org/issue18167>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Finney added the comment:
I'm reading the existing `test.support.import_fresh_module` docstring, and have
re-formatted it for PEP 257 compliance and for reading clarity.
--
keywords: +patch
nosy: +bignose
Added file:
http://bugs.python.org/file30857/issue12645.reformat_docs
Ben Finney added the comment:
> import_fresh_module raises an ImportError if *name* can't be imported, or
> returns None if the fresh module is not found.
The implementation doesn't seem to raise ImportError when a module import
fails. Instead, from what I can tell,
Ben Wolfson added the comment:
Ping.
--
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
New submission from Ben North:
#18019 noted the following crash in earlier 2.7:
>>> d={}
>>> d[42]=d.viewvalues()
>>> d
This issue has been fixed; the behaviour now is that a RuntimeError is
produced for a recursive dictionary view:
>>> d={}
>>&
Ben North added the comment:
New patch including tests attached, against 3.3. Terry Reedy's example
above now gives
>>> d = {}
>>> d[1] = d.keys()
>>> d[2] = d.values()
>>> d
{1: dict_keys([1, 2]), 2: dict_values([dict_keys([1,
Ben North added the comment:
New patch, fixing nit noted in msg193624:
non-error-recursive-dictview-3.3-1.patch
Otherwise same as previous
non-error-recursive-dictview-3.3.patch
--
Added file:
http://bugs.python.org/file31025/non-error-recursive-dictview-3.3-1.patch
Changes by Ben North :
Added file: http://bugs.python.org/file31089/against-9bf89c909bd4-3.3-1.patch
___
Python tracker
<http://bugs.python.org/issue18533>
___
___
Pytho
Ben North added the comment:
I'll attach fresh patches, one against latest 2.7 and one against
latest 3.3 (unchanged apart from headers from previous patch).
Both branches pass
./python -m test.regrtest -R20:30 test_dictviews
--
___
P
Changes by Ben North :
Added file: http://bugs.python.org/file31088/against-6e1dd1ce95b8-2.7-1.patch
___
Python tracker
<http://bugs.python.org/issue18533>
___
___
Pytho
Ben Finney added the comment:
On 01-Aug-2013, Eli Bendersky wrote:
> Ben, would you like to provide an updated patch?
Unfortunately, contributions are not accepted under the Apache Software
Foundation License (as I had thought), but also require assigning extra
privileges to the Pyt
Ben Hoyt added the comment:
Thanks, Tim! Works for me! A couple of code review comments:
1) On 2.7, guess_type(s)[0] is a byte string as usual if the type doesn't exist
in the registry, but it's a unicode string if it came from the registry. Seems
like it should be a byte string in
Ben Hoyt added the comment:
All looks great. I like what you've done with default_encoding now. Thanks, Tim
(and Dave for the original report).
--
___
Python tracker
<http://bugs.python.org/is
Changes by Ben Darnell :
--
nosy: +Ben.Darnell
___
Python tracker
<http://bugs.python.org/issue17997>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben North added the comment:
Is anything further needed from me before this can be reviewed?
--
___
Python tracker
<http://bugs.python.org/issue18533>
___
___
New submission from Ben Finney:
The library documentation for ‘pydoc’ expects that the ‘pydoc’ module will only
ever be run as a command-line program. This ignores the general usefulness of
several of the functions in that module when imported from the library.
The documentation should
Changes by Ben Finney :
--
nosy: +bignose
___
Python tracker
<http://bugs.python.org/issue12916>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Wolfson added the comment:
Ping!
--
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Wolfson added the comment:
> Are you still willing to rework the patches?
Sure. Now that I've actually looked at unicode_format.h it looks like the
biggest (relevant) difference might just be that the file isn't named
string_format.h, so I suspect it will be pretty st
Ben Wolfson added the comment:
Here's a patch that works against the current unicode_format.h and implements
what Petri suggested.
--
Added file: http://bugs.python.org/file25699/strformat-no-braces.diff
___
Python tracker
<http://bugs.py
Ben Wolfson added the comment:
I can certainly address those issues---I'll hold off on doing so, though, until
it's clearer whether more substantive things come up, so I can just do it in a
swoop.
--
___
Python tracker
<http://bu
New submission from Ben Longbons :
I encountered this bug with the following filesystem layout
project/build/bin/main-gdb.py -> ../src/main-gdb.py
project/build/src -> ../src/
project/src/main-gdb.py -> ../py/main-gdb.py
project/py/main-gdb.py
where root/py/main-gdb.py contains
import
Ben Longbons added the comment:
Yeah, this is a duplicate of issue 6975.
Sorry also about the version thing.
Although I can set this as closed: duplicate, I don't seem to be able to set
what bug this is a duplicate of.
--
resolution: -> duplicate
status: open ->
Ben Longbons added the comment:
After filing a duplicate, issue 15196, I analyzed this:
What happens:
test/one/that_dir
test/one/../two/this_dir/this_dir/this_dir/this_dir
test/two/this_dir/this_dir/this_dir/this_dir
test/two/this_dir/this_dir/this_dir/../two
test/two/this_dir/this_dir/two
New submission from Ben Longbons :
I frequently construct lists of tuples, such as:
[
(1, 2, 3) # oops, missing comma!
(4, 5, 6)
]
It would be nice if the error message gave a hint on what was *actually* wrong.
Although I always use homogeneous containers, the type that's not cal
Ben Longbons added the comment:
This kind of "debug your code" is the kind of thing I've gotten used to from
the Clang C/C++ compiler. Granted, compiled languages have an advantage here,
but enough residual information remains for the interpreter at runtime.
And I am in no
Ben Wolfson added the comment:
Ping!
--
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ben Darnell:
In python 3.2, unittest.main by default modifies the warning configuration if
no -W options were given on the command line. This undoes the effect of -bb,
turning BytesWarning back into a warning instead of an error.
If both -bb and -Werror::BytesWarning are
Ben Darnell added the comment:
Related pypy issue: https://bugs.pypy.org/issue1238
--
nosy: +Ben.Darnell
___
Python tracker
<http://bugs.python.org/issue8
Ben Finney added the comment:
Here is an updated patch. I examined the implementation in the code for UTC
offset and DST handling, and updated the code comments, the docstrings, and the
library documentation.
--
keywords: +patch
nosy: +bignose, ncoghlan
Added file: http
Ben Finney added the comment:
Attached is a patch which is more comprehensive (covering the additional
locations pointed out to me by ncoghlan), and also consolidating the details
into the library documentation so they're not verbosely repeated in so many
places.
I agree with Nick'
Ben Finney added the comment:
Apologies, my previous comment and patch was sent to the wrong issue (should
have gone to #8810).
--
___
Python tracker
<http://bugs.python.org/issue15
Ben Finney added the comment:
Attached is a patch which is more comprehensive (covering the additional
locations pointed out to me by ncoghlan), and also consolidating the details
into the library documentation so they're not verbosely repeated in so many
places.
I agree with Nick'
Ben Hoyt added the comment:
This is definitely a real issue, and makes mimetypes.guess_type() useless out
of the box on Windows.
However, I believe the reason it's broken is that the fix for Issue4969 doesn't
actually work, and I'm not sure this is possible with the Windows reg
New submission from Ben Rousch:
The subprocess.Popen function uses /bin/sh in Unix environments. Android is
detected as a Unix environemnt, but has moved that executable to
/system/bin/sh. This can be worked around by adding a parameter
"executable='/system/bin/sh'" to
Ben Rousch added the comment:
@rpetrov thanks for finding that - I was having trouble hunting down what the
standard is. I think you're quoting from
http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html
--
___
Python tracker
Ben Rousch added the comment:
> Is there some document describing procedure for
> building/installing/running_tests at Android device?
I'm using the android-python27 project, but you can also reproduce it under
SL4A:
Start SL4A
Menu -> View -> Interpreters
Python 2.6.2 or P
Changes by Ben Gamari :
--
status: open -> languishing
___
Python tracker
<http://bugs.python.org/issue10782>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Ben Gamari:
argparse suffers from a failing assertion when formatting a long usage message
with an option whose metavar contains a comma. This can be seen in the attached
testcase, which fails with,
Traceback (most recent call last):
File "/home/ben/hi.py", l
New submission from Ben W.:
The link to http://www.python.org/editors/ at the bottom of the answer to "Is
Python a good language for beginning programmers?" in the General Python FAQ is
broken.
--
assignee: docs@python
components: Documentation
messages: 213671
nosy: d
New submission from Ben Boeckel:
In the --ignore-dir handling of trace.py, the following is done:
s = s.replace("$prefix",
os.path.join(sys.base_prefix, "lib",
"python" + sys.v
Ben Darnell added the comment:
Giampaolo, where do you see that send() may return zero if the other side has
closed? I've always gotten an error in that case (EPIPE)
I vote -1 to adding a new flag to control whether it returns zero or raises and
+0 to just fixing it in Python 3.5 (I
New submission from Ben Ma:
>>> import ntpath
>>> ntpath.splitdrive(None)
Traceback (most recent call last):
File "", line 1, in
File "E:\python3\lib\ntpath.py", line 159, in splitdrive
if p and len(p) > 1:
TypeError: object of type 'None
New submission from Ben Hoyt:
I asked recently on python-dev [1] about adding a "st_winattrs" attribute to
stat result objects on Windows, to return the full set of Windows file
attribute bits, such as "hidden" or "compressed" status. Copying from that
thre
Ben Hoyt added the comment:
Fair call -- "st_file_attributes" sounds good to me, and matches the prefix of
the FILE_ATTRIBUTES_* constants better too.
--
___
Python tracker
<http://bugs.python.o
Ben Hoyt added the comment:
I've got a patch for this. Need to finish the docs and add tests, and then I'll
post here.
--
___
Python tracker
<http://bugs.python.o
New submission from Ben Hoyt:
Per my email on core-mentorship, the instructions for compiling CPython on
Windows at
https://docs.python.org/devguide/setup.html#windows are good, however I did
have one issue where the dev guide didn't help. During the link
step, I got this error:
LINK :
Changes by Ben Hoyt :
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue21745>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Hoyt added the comment:
Full patch to add this to Python 3.5 attached:
* code changes to posixmodule.c and _stat.c
* tests added in test_os.py and test_stat.py
* docs added to os.rst and stat.rst
--
keywords: +patch
Added file: http://bugs.python.org/file35615/issue21719.patch
Ben Hoyt added the comment:
Cool, thanks for applying. Out of curiosity, how often is the online devguide
HTML updated?
--
___
Python tracker
<http://bugs.python.org/issue21
Ben Hoyt added the comment:
Updated patch attached based on code reviews.
I'm replying to the code review here as when I tried to reply on
bugs.python.org/review I got a Python exception, "AttributeError: NoneType has
no attribute something or other". FYI, it seems Django is
Ben Hoyt added the comment:
> The idea is that _stat.c will use system-provided values wherever
> possible, but stat.py should be as accurate as we can make it to
> provide a backup for when _stat isn't around (either when it's just
> not built, which isn't an issu
Ben Hoyt added the comment:
Uploading a (hopefully final! :-) patch to fix Zach Ware's points from the code
review:
1) use stat.FILE_ATTRIBUTE_DIRECTORY constant in test_os.py
2) break line length in stat.rst doc source
--
Added file: http://bugs.python.org/file35632/issue21
Ben Hoyt added the comment:
Great, thanks for committing!
--
___
Python tracker
<http://bugs.python.org/issue21719>
___
___
Python-bugs-list mailing list
Unsub
Ben Hoyt added the comment:
Ah, thanks for making this an issue of its own! As I commented over at
Issue10551, it's a serious problem, and makes mimetypes.guess_type() unusable
out of the box on Windows.
Yes, the fix in Issue4969 uses "MIME\Database\Content Type", which
Ben Hoyt added the comment:
Either way -- this needs to be reverted or fixed. It's a nasty gotcha for folks
writing Python web services at the moment. I'm still for reverting, per my
reasons above.
Dave Chambers, I'm not for "faster but broken" but for "faster
Ben Hoyt added the comment:
Actually, I was suggesting using the hardcoded types for Windows only (i.e.,
only removing read_windows_registry). Several bugs have been opened on problems
with the Windows registry mimetypes, but as far as I know this isn't an issue
on Linux -- in other word
Ben Morgan added the comment:
Okay, I've emailed a contributor agreement.
--
___
Python tracker
<http://bugs.python.org/issue12004>
___
___
Python-bugs-list m
Ben Morgan added the comment:
I've sent it again.
--
___
Python tracker
<http://bugs.python.org/issue12004>
___
___
Python-bugs-list mailing list
Unsubsc
Ben Hoyt added the comment:
Any update on this, Tim or other Windows developers?
--
___
Python tracker
<http://bugs.python.org/issue15207>
___
___
Python-bug
Changes by Ben Wolfson :
--
versions: +Python 3.4
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Hoyt added the comment:
BTW, thanks for the mention in "What's New in Python 3.5":
https://docs.python.org/3.5/whatsnew/3.5.html#os
Can I make one small suggestion for a tweak there? A link to the docs for
os.stat() would be good. So maybe instead of mentioning "os.st
Ben Galin added the comment:
Added a patch with these two 8859-8 aliases and a corresponding test in
test_codecs.py (couldn't find test_encodings.py mentioned in an earlier
message). The test also found a missing 'tactis' codec (issue 1251921), so
I've commented it out in
301 - 400 of 595 matches
Mail list logo