[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-10-26 Thread Jose M. Alcaide
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

[issue25870] textwrap is very slow on long words without spaces

2015-12-15 Thread Bernhard M. Wiedemann
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

[issue25870] textwrap is very slow on long words without spaces

2015-12-15 Thread Bernhard M. Wiedemann
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

Re: [issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-03 Thread M.-A. Lemburg
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

Re: [issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-05 Thread M.-A. Lemburg
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

Re: [issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread M.-A. Lemburg
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

Re: [issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-05 Thread M.-A. Lemburg
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

Re: [issue15369] pybench and test.pystone poorly documented

2016-09-15 Thread M.-A. Lemburg
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

[issue8630] Keepends param in codec readline(s)

2010-05-05 Thread André M . C . Campos
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

[issue8630] Keepends param in codec readline(s)

2010-05-06 Thread André M . C . Campos
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

[issue8630] Keepends param in codec readline(s)

2010-05-06 Thread André M . C . Campos
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

Py_Initialize: can't initialize sys standard streams

2010-05-12 Thread M. Bashir Al-Noimi
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

[issue45145] Case of headers in urllib.request.Request

2021-09-08 Thread E . M . P . Höller
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

[issue45698] Error on importing getopt

2021-11-02 Thread Mgs M Rizqi Fadhlurrahman
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

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
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

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
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

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
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

[issue45698] Error on importing getopt

2021-11-03 Thread Mgs M Rizqi Fadhlurrahman
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

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-17 Thread Mauro S. M. Rodrigues
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

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Mauro S. M. Rodrigues
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

[issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts)

2020-09-13 Thread Edson Tadeu M. Manoel
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 &

[issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts)

2020-09-13 Thread Edson Tadeu M. Manoel
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

[issue23883] __all__ lists are incomplete

2015-06-17 Thread Mauro S. M. Rodrigues
Changes by Mauro S. M. Rodrigues : Added file: http://bugs.python.org/file39718/issue23883_fileinput.patch ___ Python tracker <http://bugs.python.org/issue23883> ___ ___

[issue23883] __all__ lists are incomplete

2015-06-17 Thread Mauro S. M. Rodrigues
Changes by Mauro S. M. Rodrigues : Removed file: http://bugs.python.org/file39140/issue23883_fileinput.patch ___ Python tracker <http://bugs.python.org/issue23

[issue25024] Allow passing "delete=False" to TemporaryDirectory

2015-10-05 Thread Mauro S. M. Rodrigues
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

[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-08 Thread Mauro S. M. Rodrigues
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

[issue23883] __all__ lists are incomplete

2015-11-14 Thread Mauro S. M. Rodrigues
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

[issue23883] __all__ lists are incomplete

2015-11-15 Thread Mauro S. M. Rodrigues
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

[issue1564547] Py_signal_pipe

2007-12-07 Thread Gustavo J. A. M. Carneiro
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 <[

[issue1564547] Py_signal_pipe

2007-12-09 Thread Gustavo J. A. M. Carneiro
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

[issue1564547] Py_signal_pipe

2007-12-09 Thread Gustavo J. A. M. Carneiro
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... __

[issue1583] Patch for signal.set_wakeup_fd

2007-12-15 Thread Gustavo J. A. M. Carneiro
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

[issue1583] Patch for signal.set_wakeup_fd

2007-12-15 Thread Gustavo J. A. M. Carneiro
Changes by Gustavo J. A. M. Carneiro: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1583> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1772673] Replacing char* with const char*

2007-12-17 Thread Gustavo J. A. M. Carneiro
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",

[issue1715] Make pydoc list submodules

2007-12-31 Thread Gustavo J. A. M. Carneiro
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) {

[issue2663] shutil.copytree glob-style filtering [patch]

2008-04-20 Thread Gustavo J. A. M. Carneiro
Changes by Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]>: -- nosy: +gustavo __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2663> __ ___ Python-bugs

[issue975646] tp_(get|set)attro? inheritance bug

2009-02-14 Thread Gustavo J. A. M. Carneiro
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

[issue41111] Convert a few stdlib extensions to the limited C API

2020-06-28 Thread Gustavo J. A. M. Carneiro
Change by Gustavo J. A. M. Carneiro : -- nosy: +gustavo ___ Python tracker <https://bugs.python.org/issue4> ___ ___ Python-bugs-list mailing list Unsub

[issue32528] Change base class for futures.CancelledError

2018-09-24 Thread Gustavo J. A. M. Carneiro
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

[issue20519] uuid.uuid4().hex generates garbage when ctypes available

2014-02-05 Thread Gustavo J. A. M. Carneiro
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

[issue20519] uuid.uuid4().hex generates garbage when ctypes available

2014-02-05 Thread Gustavo J. A. M. Carneiro
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

[issue20519] uuid.uuid4().hex generates garbage when ctypes available

2014-02-05 Thread Gustavo J. A. M. Carneiro
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__': , '

[issue20519] ctypes.create_string_buffer creates reference cycles

2014-02-05 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-07-15 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-08-06 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-08-06 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-08-07 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-08-07 Thread Gustavo J. A. M. Carneiro
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

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-26 Thread Gustavo J. A. M. Carneiro
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

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-26 Thread Gustavo J. A. M. Carneiro
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

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-28 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-30 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-30 Thread Gustavo J. A. M. Carneiro
Changes by Gustavo J. A. M. Carneiro : Added file: http://bugs.python.org/file38741/Issue23812.diff ___ Python tracker <http://bugs.python.org/issue23812> ___ ___ Pytho

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-30 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-30 Thread Gustavo J. A. M. Carneiro
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

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-31 Thread Gustavo J. A. M. Carneiro
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

<    1   2   3   4   5