Roy Assis added the comment:
Resolution in this post:
https://stackoverflow.com/questions/26692284/how-to-prevent-brokenpipeerror-when-doing-a-flush-in-python/26738736
code was changed to:
#sample.py
import sys
from time import sleep
try:
for line in sys.stdin:
print(line
New submission from Roy Assis :
problem:
---
Python raises exception when piping to head. Exception is not caught by try
except.
code:
#sample.py
import sys
from time import sleep
try:
for line in sys.stdin:
print(line, flush=True)
sleep(2)
except:
print(&q
Roy Smith added the comment:
I agree that this is confusing and that what we need is an assertion for the
top-level mock having specific calls in a specific order, and ignores any
intervening extra calls to mocked functions. In other words, a version of
assert_has_calls() which looks at
Roy Smith added the comment:
It's nice to see this is still being worked on after all these years :-)
I'm not actually convinced the proposed fix makes sense. It swaps out one
incorrect behavior for a different incorrect behavior. If it really is more
effort than it's wo
New submission from Roy Smith :
At https://docs.python.org/3.9/library/unittest.mock.html#unittest.mock.Mock,
it says:
unsafe: By default if any attribute starts with assert or assret will raise an
AttributeError.
That's not an English sentence. I think what was intended was, "
Nihar Ranjan Roy added the comment:
Thank you dennis. This is helpful.
With Regards
Nihar Ranjan Roy
Mobile: +91 9810 977 908
___
On Thu, May 27, 2021 at 10:47 AM Dennis Sweeney
wrote:
>
> Dennis Sweeney added the comment:
>
> An attribute name starting w
Nihar Ranjan Roy added the comment:
Dear Dennis
Thanx for the prompt reply.
I am talking about protected members (those starting with single
underscore). Take it other way, What is the difference between public and
private membership in python?
With Regards
Nihar Ranjan Roy
Mobile: +91 9810
New submission from Nihar Ranjan Roy :
As per literature protected members are not accessible in other modules but I
found that there is no difference between public and protected members in
python 3.9.0
--
files: Screenshot (108).png
messages: 394509
nosy: niharranjanroy
priority
Roy Smith added the comment:
The https://bitbucket.org/cliff/cpython#python24258 URL 404's
Looking at the attached bz2.py diff, I would change:
if isinstance(filename, (str, bytes, os.PathLike)):
self._fp = _builtin_open(filename, mode)
+self.fil
Change by Roy Smith :
--
nosy: +roysmith
___
Python tracker
<https://bugs.python.org/issue24258>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Roy Smith :
See https://docs.python.org/3.7/library/bz2.html
For bz2.open(), the section header says:
bz2.open(filename, mode='r' ...)
but the text says:
The mode argument ... The default is 'rb'.
As I understand it, 'r' and 'rb'
Roy Smith added the comment:
Just as another edge case, type() can do the same thing:
Foo = type("Foo", (object,), {"a b": 1})
f = Foo()
for example, will create a class attribute named "a b". Maybe this actually
calls setattr() under the covers, but if i
Roy Smith added the comment:
I just got bit by this in Python 3.5.3.
I get why it does this. I also get why it's impractical to change the behavior
now. But, it really isn't the obvious behavior, so it should be documented at
https://docs.python.org/3.5/library/argparse.html
Roy Smith added the comment:
Just for the archives:
https://bugs.chromium.org/p/chromium/issues/detail?id=1022011
--
___
Python tracker
<https://bugs.python.org/issue38
Roy Smith added the comment:
Yeah, that's weird. Looks like this may be a Chrome bug. I'm seeing it in
Chrome (Version 77.0.3865.90 (Official Build) (64-bit)), but not Safari. This
is on MacOS (High Sierra).
In the attached screenshot, I narrowed the window a bit. In
New submission from Roy Smith :
In https://docs.python.org/3.5/reference/import.html#importsystem, section "5.2
Packages", second sentence, the word "naming" is broken across two lines.
In 3.7.5rc1 as well. Didn't check any others.
--
assignee: docs@python
New submission from Roy Wellington :
The documentation for os.rename (e.g., here,
https://docs.python.org/3/library/os.html#os.rename but also for 3.8 and 3.9)
currently reads,
> On Unix, if src is a file and dst is a directory or vice-versa, anq:q
> IsADirectoryErro
nilanjan roy added the comment:
@serhiy.storchaka:
If I concur with your comment then probably declaration of *__all__** over xml
initializer(__init__) is little contradictory - because whenever we declare
__all__ to enable global-scope means API provides the flexibility to use *
during
nilanjan roy added the comment:
@scoder: *xml* package organization have little confusion
1. Current xml have exposed all the sub-packages from *__all__* scope from the
initializer - so there are possibilities to write code from script
a. *import xml as x* or *import xml.somepackage as x
New submission from nilanjan roy :
As xml package make the availability of separate global name-space by *__all__*
so considerably *etree* should have included of all the parser files in its
initialize(i.e. in *__init__.py*).
So if any script consider as "from xml import *" t
Roy Belio added the comment:
as seen in the config.log:
LIBFFI_INCLUDEDIR='/root/rc3/dist/lib/libffi-3.2.1/include'
I'm attaching the config.log just in case
--
Added file: https://bugs.python.org/file47729/config.log
___
Python
Roy Belio added the comment:
Sure, I'll attach it. one more thing to mention is that during configure it
printed: configure: WARNING: --with(out)-system-ffi is ignored on this platform
We are also providing all the dependency libraries ourselves (building,
linking, h files and what no
Roy Belio added the comment:
Also happens on suse 11 x86_64 with python 3.7
Same issue exactly building locally (but with cross compiling flag for system
independency)
Building our own libffi 3.2.1 and adding it in the CPPFLAGS includes.
--
nosy: +rbelio
New submission from Roy Belio :
Following issue 18259 which was solved by extern sethostname I managed to build
python 3.7 on solaris only after patching away the ifdef for _AIX.
We need to add SOLARIS flag and check for that also in the same line of
#ifdef _AIX.
This error only appears in
Marc Le Roy added the comment:
No solution found to solve this issue ?
The anomaly is not a cross platform inconsistency, it is an inconsistency
between the behaviours of GCC and ctypes, both under Linux or Cygwin, when
defining packed structures :
[Marc@I7-860 ~/dev/python/ctypes-bitfields
Change by Marc Le Roy :
--
nosy: +mleroy003
___
Python tracker
<https://bugs.python.org/issue29753>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Marc Le Roy :
The structure :
typedef struct __attribute__ ((packed)) {
unsigned int F0:24;
unsigned int F3:24;
unsigned int F6:24;
unsigned int F9:24;
} StructF_T;
is mapped as expected by GCC under both Linux and Cygwin.
As expected, the memory layout
Roy Williams added the comment:
Ignore my comment re: pathlib, it looks like PathLike is defined in `os` and
not `pathlib`.
--
___
Python tracker
<https://bugs.python.org/issue31
New submission from Roy Williams :
Repro:
```python
from pathlib import Path
import subprocess
subprocess.run([Path('/bin/ls')]) # Works Fine
subprocess.run(Path('/bin/ls')) # Fails
```
The problem seems to originate from here:
https://github.com/python/cpython/blob/mast
Changes by Roy Williams :
--
pull_requests: +2081
___
Python tracker
<http://bugs.python.org/issue30605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Roy Williams added the comment:
Repro:
```
import re
re.compile(br'^(.*?)$(?m)')
```
Results in
```
Traceback (most recent call last):
File "test_compile.py", line 2, in
re.compile(br'^(.*?)$(?m)')
File "/usr/lib/python3.6/re.py", line 233
New submission from Roy Williams:
import re
re.compile(br'^(.*?)$(?m)')
--
components: Regular Expressions
messages: 295473
nosy: Roy Williams, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.compile fails when compiling bytes under `-bb` mod
Roy Williams added the comment:
@arp11 sorry for the too-minimal repro :D - the issue is with FileInput
attempting to cast `files` to a tuple. Instead, if passed a PathLike object
FileInput should set `files` to a tuple just as it does with a str
Changes by Roy Williams :
--
pull_requests: +1822
___
Python tracker
<http://bugs.python.org/issue30432>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Roy Williams:
```
from fileinput import FileInput
from pathlib import Path
p = Path('.')
FileInput(p)
```
Results in:
Traceback (most recent call last):
File "", line 1, in
File
"/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/V
Roy Marples added the comment:
It is, sorry for noise.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue29170>
___
___
Python-bugs-lis
Roy Marples added the comment:
Remove WINDOW test
Add is_keypad test
Change #define in _cursesmodule.c
--
keywords: +patch
Added file: http://bugs.python.org/file46163/cursesmodule.patch
___
Python tracker
<http://bugs.python.org/issue29
New submission from Roy Marples:
checking whether WINDOW has _flags... no
The ncurses library can be built with an opaque window structure.
As such, it's not always possible to query it's flags.
Luckily there is the is_keypad function which works regardless of how ncurses
was built
Changes by Roy Williams :
--
nosy: +Roy Williams
___
Python tracker
<http://bugs.python.org/issue22294>
___
___
Python-bugs-list mailing list
Unsubscribe:
Roy Williams added the comment:
> What about PYTHON_OPT and allowing to pass any options via an environment > >
> variable? There is a number of precedences (gzip, less, etc).
>
>export PYTHON_OPT="-t -b -3"
I'd be open to this, but it seems like a much
Roy Williams added the comment:
Thanks for the feedback Berker! This is my first CPython patch :D.
Added in a note in pyporting. I actually did a much more detailed write up
here https://gist.github.com/rowillia/c0feed97c1863b2d8e5a3ed73712df65, but it
seems a bit verbose for this document
Roy Williams added the comment:
Thanks for the feedback Berker. I addressed your feedback, but unfortunately I
get a 500 from Rietveld when I try to attach a new patchset. I've uploaded the
new patchset here.
--
___
Python tracker
Changes by Roy Williams :
Added file: http://bugs.python.org/file44947/pythonenable3kwarningsflag.patch
___
Python tracker
<http://bugs.python.org/issue28288>
___
___
Roy Williams added the comment:
Thanks for your support! Here's a patch to enable the `PYTHON3WARNINGS`
environment variable.
--
keywords: +patch
Added file: http://bugs.python.org/file44894/pythonenable3kwarningsflag.patch
___
Python tr
Roy Williams added the comment:
@Brett @Berker In a similar vein, it'd be great to expose the `-b` flag in
Python 3 in a similar manner to test for invalid byte comparisons.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Roy Williams:
I'm finding the `-3` flag to be super useful, but it's quite a huge pain to
thread it through all of the places that spawn python subprocesses, sometimes
requiring forking of third party code.
This would be much simpler if, like PYTH
Changes by Roy Williams :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue28279>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Roy Williams:
Howdy,
I'm attempting to make a change to the mock package in Python (related to
http://bugs.python.org/issue28260), and it appears their CI is broken in Python
3.6 only. The problem appears to originate from setuptools, but this only fails
in Pytho
Roy Williams added the comment:
OK, let's close this issue and I'll ping the TIP thread/this issue again.
On Sun, Sep 25, 2016, 11:16 AM Ned Batchelder
wrote:
>
> Ned Batchelder added the comment:
>
> Roy, the code on GitHub isn't a literal copy of the Python
Roy Williams added the comment:
Hey Antti
My understanding is the version available on PyPi is now a strict backport
of what's in Python 3, so they suggested filling the bug in bugs.python.org
so it can be backported.
http://lists.idyll.org/pipermail/testing-in-python/2016-September/0
New submission from Roy Williams:
I'm finding the -3 flag to be super useful at identifying problems with code
when porting to Python 3. One of the most common failures, however, is
"DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x".
While impl
Changes by Roy Williams :
--
nosy: +Roy Williams
___
Python tracker
<http://bugs.python.org/issue26219>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Roy Williams :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue28260>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Roy Williams:
I am investigating a migration to Python 3, and to facilitate this we are using
the -3 flag as decribed here:
https://docs.python.org/3/howto/pyporting.html#prevent-compatibility-regressions
. When using this flag I encountered
some issues inside of mock
New submission from Roy Shmueli:
While creating class of List and using a Optional as part of the typing system.
I have got an error when I was importing one of my module. I was able to
simplify the problem by creating a one module that replicate the crash.
--
files: bug.py
messages
Remy Roy added the comment:
>From my point of view, Issue 25994 is about the potential file
>descriptor/handle leaks and this issue is about being unable to perform some
>filesystem calls because of a hidden unclosed file descriptor/handle.
I am not going to protest if you want to t
Remy Roy added the comment:
This issue is not same as Issue 25994 but it is quite related. Some kind of
close() method and/or context manager support could help here as well.
--
___
Python tracker
<http://bugs.python.org/issue26
Remy Roy added the comment:
I believe Eryk's explanation on how a file in Windows doesn't actually get
unlinked until all handles and kernel pointer references are closed is spot on
about the problem I had.
I had a complex example that could probably have been simplified to what Er
New submission from Remy Roy:
On Windows, os.scandir will keep a handle on the directory being scanned until
the iterator is exhausted. This behavior can cause various problems if try to
use some filesystem calls like os.chmod or os.remove on the directory while the
handle is still being kept
Roy Hyunjin Han added the comment:
The behavior may not be surprising from a technical perspective, but it is
unintuitive.
I think exceptions inside a with statement should trigger a traceback, unless
you are saying that it is the responsibility of the author to catch and raise
the exception
New submission from Roy Hyunjin Han:
Exceptions and arguments disappear when using argparse inside a "with"
statement. The behavior was confusing and frustrating because I could not
pinpoint why certain arguments were missing or unrecognized.
Unhandled exceptions inside the with
New submission from Roy Smith:
At https://docs.python.org/2/library/hmac.html, hmac.new() is shown as
hmac.new(key[, msg[, digestmod]])
This implies that digestmod can only be given if msg is given. This is
incorrect. Either can be given without the other.
--
assignee: docs@python
Roy Smith added the comment:
How about something like this:
Note: The current iglob() implementation is optimized for the case of many
files distributed in a large directory tree. Internally, it iterates over the
directory tree, and stores all the names from each directory at once. This
Roy Smith added the comment:
The thread that led to this started out with the use case of a directory that
had 200k files in it. If I ran iglob() on that and discovered that it had
internally generated a list of all 200k names in memory at the same time, I
would be pretty darn surprised
New submission from Roy Smith:
For background, see:
https://mail.python.org/pipermail/python-list/2014-August/676291.html
In a nutshell, the iglob() docs say, "Return an iterator which yields the same
values as glob() without actually storing them all simultaneously." The
New submission from Roy Wellington:
Inheriting from collections.MutableSet mixes in several methods, however, it
does not mix in a .update method. This can cause a variety of confusion if you
expect a MutableSet to act like a set. Moreover, MutableMapping does provide a
.update method, which
Roy Hyunjin Han added the comment:
Yes, I think closing this issue is reasonable. If the error reappears, we can
just reopen it.
--
___
Python tracker
<http://bugs.python.org/issue1
Roy Hyunjin Han added the comment:
Hi Lita,
I no longer have access to a Domino server.
I'm not sure whether there are enough users trying to access Domino with
imaplib for this to warrant investigation.
RHH
--
___
Python tracker
Roy Hyunjin Han added the comment:
Is imaplib choking on the IBM-specific X-MIMETrack header? Is Lotus Notes
properly formatting the multi-line headers? Can RFC822 headers contain the
PIPE | symbol?
--
___
Python tracker
<http://bugs.python.
Audrey Roy added the comment:
Mark, I and a number of others simply misinterpreted the text in that section.
--
___
Python tracker
<http://bugs.python.org/issue21
Audrey Roy added the comment:
> Since it isn't linked from the 3.4 index, it may be more effort than
> it is worth to get someone to delete the file from the 3.4 tree on the
> server.
It would be worthwhile to delete or fix it in the 2.7 and 3.4 tree.
It accidentally gets
New submission from Roy:
In the documentation in 15.2 (https://docs.python.org/3/library/hmac.html),
under hmac.new(key, msg=None, digestmod=None), it says "Paramter digestmod",
which should be "Parameter digestmod"
--
messages: 222623
nosy: thosehippos
prior
Roy Smith added the comment:
(ugh, hit return too soon)
>>> '{1}'.format()
Traceback (most recent call last):
File "", line 1, in
IndexError: tuple index out of range
This is a confusing error message. The user hasn't written any tuples, so a
message abo
New submission from Roy Smith:
https://mail.python.org/pipermail/python-list/2014-June/674188.html
--
messages: 221846
nosy: roysmith
priority: normal
severity: normal
status: open
title: str.format() gives poor diagnostic on placeholder mismatch
New submission from Roy Smith:
http://docs.python.org/2/library/functions.html#reload says:
It is legal though generally not very useful to reload built-in or dynamically
loaded modules, except for sys, __main__ and __builtin__.
It is unclear what the "except for ..." part is re
Roy Smith added the comment:
What might make sense is for all of those, document the function call as taking
"native_flags" (or something like that), with a single note at the top of the
page saying, "native_flags means look up the specific values in the man page"
and li
New submission from Roy Smith:
http://docs.python.org/2/library/socket.html
The description for getnameinfo() says, "... Depending on the settings of
flags, the result can contain a fully-qualified domain name or numeric address
representation in host.", but does not say what t
Roy Smith added the comment:
Ugh, that should say, "if you CLICK on random()". Really wish I was filing
this from my phone so I could blame it on autocorrect.
--
___
Python tracker
<http://bugs.python.o
New submission from Roy Smith:
On http://docs.python.org/2/library/random.html, the links to random() go to
the module, not the function. Thus:
Almost all module functions depend on the basic function random(),
If you lick on random(), you get to
http://docs.python.org/2/library/random.html
New submission from Roy Smith:
http://docs.python.org/2/library/nntplib.html contains intra-page references
such as:
NNTP.next()
Send a NEXT command. Return as for stat().
The problem is that the link for "stat" points to the stat module (i.e.
http://docs.python.org/2/library
Roy Smith added the comment:
The new text suggested by terry.reedy works for me.
--
___
Python tracker
<http://bugs.python.org/issue19006>
___
___
Python-bug
Roy Smith added the comment:
Adding a note that there are more methods in the tables below would be useful.
Otherwise, you assume you've seen them all when you've read the first table.
I agree that the assertions about exceptions and warnings belong in a different
group, but I don
New submission from Roy Smith:
http://docs.python.org/2/library/unittest.html#assert-methods
The docs say, "The TestCase class provides a number of methods to check for and
report failures, such as", and then when you scroll a couple of screens down,
there's another list,
Changes by Roy Ivy III :
--
nosy: +rivy
___
Python tracker
<http://bugs.python.org/issue12641>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Roy Smith added the comment:
Um, make that msg185972.
--
___
Python tracker
<http://bugs.python.org/issue17629>
___
___
Python-bugs-list mailing list
Unsubscribe:
Roy Smith added the comment:
I'm the guy who was searching for astral characters in msg18597. I should
mention that while what I did was certainly inefficient, the database was so
much slower that it didn't have any observable impact on the overall process
time (a bit over 2 days
New submission from Roy Wellington:
The following:
s = set(range(10))
s -= (1, 2, 3)
raises a TypeError. Yet the following, which is more verbose and equivalent,
succeeds:
s.difference_update((1, 2, 3))
Under the hood, __isub__ calls difference_update to do its work. Unfortunately
New submission from Roy Smith:
>>> re.compile('(?P=)')
Traceback (most recent call last):
File "", line 1, in
File "/home/roy/env/python/lib/python2.7/re.py", line 190, in compile
return _compile(pattern, flags)
File "/home/roy/env/python
Changes by Roy Smith :
--
nosy: +roysmith
___
Python tracker
<http://bugs.python.org/issue11204>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Roy Smith :
--
nosy: +roysmith
___
Python tracker
<http://bugs.python.org/issue15606>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Roy Smith:
# Python 2.7.3
# Ubuntu 12.04
import re
pattern = r"( ?P.*)"
regex = re.compile(pattern, re.VERBOSE)
The above raises an exception in re.compile():
Traceback (most recent call last):
File "./try.py", line 6, in
regex = re.compile
New submission from Roy Smith:
The following code, when run with "--help", omits the trailing newlines from
the epilog. It should just emit the string verbatim. If the developer didn't
want the extra newlines, he/she wouldn't have put them there.
im
Changes by Roy Smith :
--
nosy: +roysmith
___
Python tracker
<http://bugs.python.org/issue14452>
___
___
Python-bugs-list mailing list
Unsubscribe:
Roy Jacobson added the comment:
This bug is a really annoying one, any chance it will be fixed in 2.7? It's
really a matter when you want to deploy a program using distutils (my case),
because you cannot really require your clients to edit the registry themselves
:/
Is there any problem
New submission from Roy Smith:
Running this code:
---
import argparse
p = argparse.ArgumentParser()
p.add_argument('--foo',
help=u'This is a very long help string. ex:
"--s3\u00A0s3://my.bucket/dir1/
Roy Smith added the comment:
Ooops, clicked the wrong button.
--
Added file: http://bugs.python.org/file27165/test-cases.py
___
Python tracker
<http://bugs.python.org/issue15
Roy Smith added the comment:
I've started collecting some test cases. I'll keep adding to the collection.
I'm going to start trolling ISO 8601:2004(E) for more. Let me know if there
are other sources I should be considering.
--
___
Roy Smith added the comment:
I see I mis-stated my example. When I wrote:
s = str(d1)
d2 = datetime.datetime(s)
assert d1 == d2
what I really meant was:
s = d1.isoformat()
d2 = datetime.datetime(s)
assert d1 == d2
But, now I realize that while that is certainly an absolute lower bound, it
Roy Smith added the comment:
We need to define the scope of what input strings will be accepted. ISO-8601
defines a lot of stuff which we may not wish to accept.
Do we want to accept both basic format (MMDD) and extended format
(-MM-DD)?
Do we want to accept things like "1985-
New submission from Roy Smith:
Opening this bug at Ben Finney's request. See
https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/wmDUrpW2ZCU
for the full thread discussing the problem. Here's a significant excerpt:
---
1 - 100 of 160 matches
Mail list logo