Jose M. Alcaide added the comment:
My previous comment was incorrect, sorry.
I thought that this issue was fixed in time for the release of Python 3.5, but
it wasn't (fix was committed on Sep 26, two weeks after 3.5's release).
My
New submission from Bernhard M. Wiedemann:
Many python scripts use textwrap to break base64-encoded strings from openssl
into lines - e.g. https://bugs.launchpad.net/python-keystoneclient/+bug/1404402
and https://github.com/diafygi/acme-tiny/blob/master/acme_tiny.py#L166
Steps To Reproduce
Bernhard M. Wiedemann added the comment:
should probably be
lines = [x[n*64:(n+1)*64] for n in range(((len(x)-1)//64)+1)]
to avoid an empty line added when the last line is full
which once again shows why people prefer to use standard libraries
for this kind of work
On 03.02.2016 18:05, STINNER Victor wrote:
>
>> python -m timeit "sum([x * x * 1 for x in range(100)])"
>
> If you only want to benchmark x*y, x+y and list-comprehension, you
> should use a tuple for the iterator.
... and precalculate that in the setup:
python -m
On 05.02.2016 16:14, STINNER Victor wrote:
>
> Please don't. I would like to have time to benchmark all these patches (there
> are now 9 patches attached to the issue :-)) and I would like to hear
> Serhiy's feedback on your latest patches.
Regardless of the performance, the fastint5.patch look
FWIW: I just ran into a situation where the new approach resulted
in pip, setuptools and zc.buildout not working anymore.
This was on an AIX system which did come with CA root certificates
at all.
Now, I knew how to fix this, but the solution was not
an obvious one. I had to use truss to figure o
On 05.04.2015 22:49, Donald Stufft wrote:
>
> Donald Stufft added the comment:
>
>> I don't consider monkey patching a proper way to configure a Python
>> installation.
>
> The point is that that TLS validation on/off isn't conceptually a Python level
> configuration option, that's going to be a
On 15.09.2016 11:11, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> Hum, since the discussion restarted, I reopen the issue ...
>
> "Well, pybench is not just one benchmark, it's a whole collection of
> benchmarks for various different aspects of the CPython VM and per concept
New submission from André M. C. Campos :
Some methods in StreamReaderWriter class (codecs library) has different
signatures from StreamReader methods. More precisely it's missing the keepends
parameter in readline and readlines methods.
So, we cannot code:
fp = codecs.open(fileName, &quo
André M. C. Campos added the comment:
The parameter would not be a new feature since the codecs docs states that:
"The StreamReaderWriter allows wrapping streams which work in both
read and write modes".
The reader (StreamReader) accepts the parameter, so it's expected that
Str
Changes by André M. C. Campos :
Added file: http://bugs.python.org/file17235/codecs.py
___
Python tracker
<http://bugs.python.org/issue8630>
___
___
Python-bugs-list m
Hi All,
After installing python-3.1.2.msi I'm not able to run to python.exe at
all because it gives me the following error message:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding: cp720
This application has requested the Runtime to term
New submission from E. M. P. Höller :
urllib.request.Request internally .capitalize()s header names before adding
them, as can be seen here:
https://github.com/python/cpython/blob/3.9/Lib/urllib/request.py#L399
Since HTTP headers are case-insensitive, but dicts are not, this ensures that
New submission from Mgs M Rizqi Fadhlurrahman :
It looks like there is a breaking change related to python 3.10.0
implementation that impacted getopt package.
https://docs.python.org/3/library/getopt.html
https://github.com/python/cpython/blob/3.10/Lib/getopt.py
Steps to reproduce:
1. Run
Mgs M Rizqi Fadhlurrahman added the comment:
Screenshot attached
https://bugs.python.org/file50422/OnPaste.20211103-125049.png
--
___
Python tracker
<https://bugs.python.org/issue45
Mgs M Rizqi Fadhlurrahman added the comment:
Here:
```
Python 3.10.0 (default, Oct 30 2021, 15:16:25) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import getopt
Traceback (most recent call las
Mgs M Rizqi Fadhlurrahman added the comment:
@eric.smith Wow you're right! Somehow the """ got deleted. (screenshot attached)
It can run normally now after I added the """ back.
More details:
I'm using Ubuntu 18.04.2.
I installed python 3.10.0 using
Mgs M Rizqi Fadhlurrahman added the comment:
OK, thank you for the answers. Sorry for the false alarm.
--
___
Python tracker
<https://bugs.python.org/issue45
Mauro S. M. Rodrigues added the comment:
Hi Anthony,
Thanks for asking, yeah I'm interested in push a new version. I'll do it later
today and I'll post a link to the pr here.
--
___
Python tracker
<https://bugs.pyt
Mauro S. M. Rodrigues added the comment:
So per Serhiy comment can I assume the patch is not necessary? If so I believe
the issue should be closed as well.
--
___
Python tracker
<https://bugs.python.org/issue25
New submission from Edson Tadeu M. Manoel :
Here is the inconsistent behavior, when running with `python -bb` (or just
`python -b`), caused by an internal cache:
>>> import struct
>>> struct.calcsize(b'!d') # cache for '!d' uses bytes
8
&
Edson Tadeu M. Manoel added the comment:
> I'm not sure if this warning is intentional, since in Python 3 there seems to
> be no special reason for dicts to try to compare 'a' with b'a' (other than
> possible implementation details).
Okay, there's on
Changes by Mauro S. M. Rodrigues :
Added file: http://bugs.python.org/file39718/issue23883_fileinput.patch
___
Python tracker
<http://bugs.python.org/issue23883>
___
___
Changes by Mauro S. M. Rodrigues :
Removed file: http://bugs.python.org/file39140/issue23883_fileinput.patch
___
Python tracker
<http://bugs.python.org/issue23
Mauro S. M. Rodrigues added the comment:
Hi everybody!
This is my second patch on the community, although the first one is not merged,
so any feedback is appreciated.
I've added tests to cover this new situation and docs to let people know about
the possibility of keeping their temp
Mauro S. M. Rodrigues added the comment:
Hi Barry, I was testing this and it seems to work, am I doing something wrong
in order to reproduce it? I've used the same parameters from the unit tests
Python 3.5.0+ (3.5:1e99ba6b7c98, Oct 8 2015, 17:12:06)
[GCC 4.8.4] on linux
Type
Mauro S. M. Rodrigues added the comment:
Yes, I'm, I have a commitment now but I'll submit a new version later today
--
___
Python tracker
<http://bugs.python.o
Mauro S. M. Rodrigues added the comment:
New version.
--
Added file: http://bugs.python.org/file41052/issue23883_fileinput.v2.patch
___
Python tracker
<http://bugs.python.org/issue23
Gustavo J. A. M. Carneiro added the comment:
"My understanding is that there are some things that the current patch
does not address."
Well, I don't know what those things are, so it's hard for me to address
them. :-)
_
Tracker <[
Gustavo J. A. M. Carneiro added the comment:
Minimal patch that just adds the pipe but does not attempt to fix
anything else.
Added file: http://bugs.python.org/file8898/python-signals-minimal.diff
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.p
Gustavo J. A. M. Carneiro added the comment:
> The minimal patch doesn't initialize dummy_char or dummy_c. It's
harmless here, but please fix it. ;)
The variable is called 'dummy' for a reason. The value written or read
is irrevelant...
__
Gustavo J. A. M. Carneiro added the comment:
The patch looks great.
But I was wondering if there is any chance to export a C API in addition
to the Python one? That is because PyGTK is mostly C, the code that
needs this is C, it would be easier to call a C API.
--
nosy: +gustavo
Changes by Gustavo J. A. M. Carneiro:
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1583>
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python
Gustavo J. A. M. Carneiro added the comment:
I was about to submit the very same patch :-)
I missed PyErr_NewException, but you missed the PyMapping_* methods ;)
Please look into this matter. GCC 4.2 has arrived and it has a new
warning. The code:
char* kwlist[] = { "target",
New submission from Gustavo J. A. M. Carneiro:
Often python extension modules define submodules like this:
static PyObject *
initfoo_xpto(void)
{
PyObject *m;
m = Py_InitModule3("foo.xpto", foo_xpto_functions, NULL);
[...]
return m;
}
PyMODINIT_FUNC
initfoo(void)
{
Changes by Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]>:
--
nosy: +gustavo
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2663>
__
___
Python-bugs
Gustavo J. A. M. Carneiro added the comment:
If this problem does not apply to Python 3.x, by all means go ahead and
close it. It probably is a bug, but probably not worth fixing;
workaround is simple enough, and affected extensions have already
adapted to it
Change by Gustavo J. A. M. Carneiro :
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/issue4>
___
___
Python-bugs-list mailing list
Unsub
Gustavo J. A. M. Carneiro added the comment:
What a shame, I've seen this error many times as well.
Surely making it BaseException will not break that much code?...
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/is
New submission from Gustavo J. A. M. Carneiro:
If you try the attached program, you will find that for every iteration the
uuid.uuid4() call generates objects that contain reference cycles and need the
help of the garbage collector. This is not nice. If I make the ctypes module
not able to
Gustavo J. A. M. Carneiro added the comment:
Well, this isn't a big problem, but I have an application that needs to run
with the GC disabled, since it causes pauses of a couple of seconds each time a
full collection runs (we have a few million objects allocated). I will run the
GC only
Gustavo J. A. M. Carneiro added the comment:
I have narrowed it down to one line of code:
ctypes.create_string_buffer(16)
That is enough to create 7 objects that have reference cycles.
[, {'__module__': 'ctypes', '__doc__': None,
'__weakref__': , '
Gustavo J. A. M. Carneiro added the comment:
Regardless, if you don't mind, take this patch for Python 3.5 to avoid ctypes,
at least in the Linux case (I don't have Windows to test). Creating a proper
extension module is safer and really not that hard...
--
keywords: +p
Gustavo J. A. M. Carneiro added the comment:
Don't know if it helps, but I made a github pull request for this:
https://github.com/python/asyncio/pull/256
--
___
Python tracker
<http://bugs.python.org/is
Gustavo J. A. M. Carneiro added the comment:
I don't think the order for multiple concurrent getters matters that much.
With analogy with the threading case, if multiple threads are blocked get()ing
an item from the same queue, I would not presume to expect anything about the
ordering
Gustavo J. A. M. Carneiro added the comment:
Sure, just give me a couple of days.
--
___
Python tracker
<http://bugs.python.org/issue23812>
___
___
Python-bug
Gustavo J. A. M. Carneiro added the comment:
I was wrong, there still needs to be some cleanup in cancellation, even with
the new approach. But it does solve the out-of-order problem.
I don't know if it should be applied to rc1. I wish I had more time to test.
Up to you
Gustavo J. A. M. Carneiro added the comment:
I am not using hg anymore, since asyncio migrated to git.
Here's a github PR, does that help?
https://github.com/python/asyncio/pull/260
--
___
Python tracker
<http://bugs.python.org/is
Gustavo J. A. M. Carneiro added the comment:
This patch fixes the Mac OS X issue @haypo pointed out.
--
Added file: http://bugs.python.org/file40865/issue20519_10941v2.diff
___
Python tracker
<http://bugs.python.org/issue20
Gustavo J. A. M. Carneiro added the comment:
One issue of note is regarding generate_time(). Originally I found ctypes
bindings for this function, so I wrapped it as well in the extension module.
However, it doesn't appear to be
Gustavo J. A. M. Carneiro added the comment:
New patch that:
1. adds assert(sizeof(uuid_t) == 16); to the extension module;
2. fixes the code path when ctypes has to be used instead of the extension
module (needed a bit more refactoring, apologies if it makes the diff harder to
read);
3
New submission from Gustavo J. A. M. Carneiro:
I have a pattern where I read from a queue with a timeout, generally like this:
while True:
reader = asyncio.async(wait_for(queue.get(), 0.1))
try:
item = (yield from reader)
except asyncio.TimeoutError:
reader.cancel()
continue
Changes by Gustavo J. A. M. Carneiro :
Added file: http://bugs.python.org/file38741/Issue23812.diff
___
Python tracker
<http://bugs.python.org/issue23812>
___
___
Pytho
Gustavo J. A. M. Carneiro added the comment:
I created a codereview issue: https://codereview.appspot.com/222930043
--
___
Python tracker
<http://bugs.python.org/issue23
Gustavo J. A. M. Carneiro added the comment:
> - Are there other places where a cancellation can have a similar effect?
> Maybe the same logic in put()?
Hm.. I didn't look, but yes, it does look like it might be affected by the same
issue. I'll try to create a test for
Gustavo J. A. M. Carneiro added the comment:
So I uploaded a new patch version fixing a similar problem in put().
--
___
Python tracker
<http://bugs.python.org/issue23
401 - 456 of 456 matches
Mail list logo