[issue45328] http.client.HTTPConnection doesn't work without TCP_NODELAY
New submission from R : I'm working on trying to run python under SerenityOS. At the moment, SerenityOS doesn't implement the TCP_NODELAY socket option. This makes the HTTPConnection.connect() method raise an OSError for an operation that is otherwise optional. Additionally, the connection object can be left in an intermediate state: the underlying socket is always created, but depending on what method was invoked (either connect() directly or a higher-level one such as putrequest()) the connection object can be in IDLE or REQ_STARTED state. I have a patch that works (attached), and I'll be working on submitting a PR now. Usage of TCP_NODELAY was introduced in 3.5 (#23302), so even though I've been testing against 3.10rc2 for the time being I'm sure it will affect all versions in between. -- components: Library (Lib) files: http-client.patch keywords: patch messages: 402937 nosy: rtobar2 priority: normal severity: normal status: open title: http.client.HTTPConnection doesn't work without TCP_NODELAY type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50316/http-client.patch ___ Python tracker <https://bugs.python.org/issue45328> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45386] xmlrpc.client unimportable due to strfmt ValueError
New submission from R : This is a problem caused by https://bugs.python.org/issue13305. When running python in SerenityOS (https://serenityos.org/), the xmlrpc.client module fails to be imported. This is because the code that decides which format to use for getting 4-digit years, which issues a call to strfmt, raises a ValueError. The ValueError is raised because the second format that is tested yields no output with Serenity's strfmt implementation, so timemodule.strfmt returns NULL. For reference, this is the code that fails: _day0 = datetime(1, 1, 1) if _day0.strftime('%Y') == '0001': # Mac OS X def _iso8601_format(value): return value.strftime("%Y%m%dT%H:%M:%S") elif _day0.strftime('%4Y') == '0001': # Linux <-- ValueError def _iso8601_format(value): return value.strftime("%4Y%m%dT%H:%M:%S") else: def _iso8601_format(value): return value.strftime("%Y%m%dT%H:%M:%S").zfill(17) del _day0 We have a local patch that improves on the current code, which I'll post as a PR now. -- components: Library (Lib) messages: 403288 nosy: rtobar2 priority: normal severity: normal status: open title: xmlrpc.client unimportable due to strfmt ValueError versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue45386> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1354] windows installer problem
New submission from Raja R: Hi, I downloaded the python-2.5.msi yesterday and tried installing it but i am getting the following error "This installation package could not be opened . cOntact the application vendor to verify that this is a valid WIndows Installer package." I was able to install python 2.4.4 successfully in my system. I want python 2.5 urgently as I need to work in PyQt. My machine config is: Microsoft Windows XP, Media Center Edition Version 2002, Service Pack 2. Please advice on this problem at the earliest. Thanks, Raja. -- components: Installation messages: 56901 nosy: rajar severity: urgent status: open title: windows installer problem versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1354> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13206] while loop vs for loop test
New submission from R Blackmore : Using Python 3.2.2 on Windows 7 See attached file Was having problem with a program I was doing... couldn't get around issue unless I changed from "while" loop to "for" loop... WTF??? So restarted computer and then Python Shell and IDLE I wrote a very simple loop file... The 1st loop is a while loop that hangs and only prints divisor 1 and divisor 2 (Should also print divisor 5) For loop works as expected printing divisor 1 divisor 2 divisor 3 Unless I'm missing something both loops should return (i.e. print) same! Cheers -- components: IO files: LOOP_Test1.py messages: 145775 nosy: JavaJunkie priority: normal severity: normal status: open title: while loop vs for loop test versions: Python 3.2 Added file: http://bugs.python.org/file23436/LOOP_Test1.py ___ Python tracker <http://bugs.python.org/issue13206> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13206] while loop vs for loop test
R Blackmore added the comment: for loop works correctly prints divisor 1 divisor 2 divisor 5 (original post incorrectly listed divisor 3,) -- ___ Python tracker <http://bugs.python.org/issue13206> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13206] while loop vs for loop test
R Blackmore added the comment: I knew it was late... Should have slept on it Thanks --- On Tue, 10/18/11, Mark Dickinson wrote: > From: Mark Dickinson > Subject: [issue13206] while loop vs for loop test > To: squan...@yahoo.com > Date: Tuesday, October 18, 2011, 12:13 AM > > Mark Dickinson > added the comment: > > Your 'i = i + 1' is at the wrong indentation level. > > -- > nosy: +mark.dickinson > resolution: -> invalid > status: open -> closed > > ___ > Python tracker > <http://bugs.python.org/issue13206> > ___ > -- ___ Python tracker <http://bugs.python.org/issue13206> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3550] Socket Python 3k Documentation failure OR Unicode string is not supported with socket.send
New submission from Andrew R. <[EMAIL PROTECTED]>: I am confused by the socket docs for Python 3000. It says to pass a string through socket.send or socket.sendall, however, it does not seem to account for the ASCII to Unicode transition. Trying to send an ordinary Python 3k string through socket.send fails with a TypeError stating that the first arg must be bytes or buffers but not a str. Besides the misdocumented sockets, I would think it would be easier to translate a Unicode string to ASCII, however, I fear this might violate the "Explicit is better than implicit" rule and RFC tables. -- assignee: georg.brandl components: Documentation messages: 71105 nosy: georg.brandl, st33med severity: normal status: open title: Socket Python 3k Documentation failure OR Unicode string is not supported with socket.send type: behavior versions: Python 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3550> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3550] Socket Python 3k Documentation mistake OR Unicode string is not supported with socket.send
Andrew R. <[EMAIL PROTECTED]> added the comment: http://docs.python.org/dev/3.0/library/socket.html The examples at the bottom also add to the confusion. Also, changed title to be friendlier (failure? Mistake, more likely) and changed type to no selection. -- title: Socket Python 3k Documentation failure OR Unicode string is not supported with socket.send -> Socket Python 3k Documentation mistake OR Unicode string is not supported with socket.send type: behavior -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3550> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35737] crypt AuthenticationError introduced with new Linux kernel
Brett R added the comment: I'm marking this closed. We're past the issue, and won't be providing any more details or chasing this further. Feel free to reopen if others want to push it. Thanks for the tips. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35737> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45616] Python Launcher Matches 3.10 instead of 3.1
New submission from Gabe R. : I have both Python 3.1-64 and 3.10-64 installed on the same Windows machine. If I attempt to launch Python 3.1 using the command `py -3.1-64`, the launcher incorrectly starts Python 3.10. -- components: Windows messages: 405054 nosy: Marsfan, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python Launcher Matches 3.10 instead of 3.1 type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue45616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/queue.py: put() does not acquire not_empty lock before notifying on it
Change by r n : -- components: Library (Lib) nosy: r n2 priority: normal severity: normal status: open title: cpython/queue.py: put() does not acquire not_empty lock before notifying on it type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/queue.py: put() does not acquire not_empty lock before notifying on it
Change by r n : -- versions: +Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/queue.py: put() does not acquire not_empty before notifying on it
Change by r n : -- title: cpython/queue.py: put() does not acquire not_empty lock before notifying on it -> cpython/queue.py: put() does not acquire not_empty before notifying on it ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it
Change by r n : -- nosy: +rhettinger -r n2 title: cpython/queue.py: put() does not acquire not_empty before notifying on it -> cpython/lib/queue.py: put() does not acquire not_empty before notifying on it ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it
Change by r n : -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it
r n added the comment: Thanks for the response. However, if you see, every condition object has their own queue of waiters in self._waiters, that get notified during notify(), which are different for not_empty and not_full. I see a hang very very rarely, like 1/25 times, in my program, which keeps, reading from and writing to a queue from multiple threads. -- nosy: +r n2 ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40907] cpython/lib/queue.py: put() does not acquire not_empty before notifying on it
r n added the comment: Sorry, please ignore my previous comment, I can see that the issue is not in the queue, but probably be somewhere in my setup. I'll close this bug therefore. Thanks again for the clarification. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue40907> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41683] Python3: Installation error on Ubunti-18
New submission from Prasanth R : Got this error on Ubuntu-18 alone ``` _PYTHON_PROJECT_BASE=python3-3.8.3/Python-3.8.3 _PYTHON_HOST_PLATFORM=linux-x86_64 PYTHONPATH=python3-3.8.3/Python-3.8.3/build/lib.linux-x86_64-3.8/sysconfigdata:./Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_x86_64-linux-gnu python3.8 -m ensurepip \ $ensurepip --root=toolchain/ ; \ fi ERROR: Exception: Traceback (most recent call last): File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 188, in main status = self.run(options, args) File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/commands/install.py", line 286, in run with self._build_session(options) as session: File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/cli/base_command.py", line 101, in _build_session session = PipSession( File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/download.py", line 559, in __init__ self.headers["User-Agent"] = user_agent() File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_internal/download.py", line 144, in user_agent zip(["name", "version", "id"], distro.linux_distribution()), File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 122, in linux_distribution return _distro.linux_distribution(full_distribution_name) File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 677, in linux_distribution self.version(), File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 737, in version self.lsb_release_attr('release'), File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 899, in lsb_release_attr return self._lsb_release_info.get(attribute, '') File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 552, in __get__ ret = obj.__dict__[self._fname] = self._f(obj) File "/tmp/tmp48him7rr/pip-19.2.3-py2.py3-none-any.whl/pip/_vendor/distro.py", line 1012, in _lsb_release_info stdout = subprocess.check_output(cmd, stderr=devnull) File "python3-3.8.3/Python-3.8.3/Lib/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "python3-3.8.3/Python-3.8.3/Lib/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1. Makefile:1189: recipe for target 'install' failed make[1]: *** [install] Error 2 make[1]: Leaving directory 'python3-3.8.3/Python-3.8.3' ``` -- components: Build messages: 376177 nosy: prasanth priority: normal severity: normal status: open title: Python3: Installation error on Ubunti-18 type: compile error versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41948] Runtime error while trying to use Python3.9 with virtualenv
New submission from Abhi R : I tried to create a new virtual environment using virtualenv and the newly released Python3.9 version and I got a runtime error saying " failed to find interpreter for Builtin discover of python_spec='python3.9'". -- components: Interpreter Core files: Untitled picture.png messages: 378074 nosy: abhicantdraw priority: normal severity: normal status: open title: Runtime error while trying to use Python3.9 with virtualenv type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49496/Untitled picture.png ___ Python tracker <https://bugs.python.org/issue41948> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42313] rstrip removes the trailing `e`s.
New submission from Athul R : rstrip removes the trailing `e`s. i = "external_e_object" i = i.rstrip('_object') print(i) """ It should have printed `external_e` but it prints only `external_`. """ It happens only when I user rstrip("_object") not for other strings. # === # it works fine in the below case. i = "external_e_trail" i = i.rstrip('_trail') print(i) """ It should have prints `external_e` """ -- components: Library (Lib) files: python-bug.py messages: 380678 nosy: Athul-R priority: normal severity: normal status: open title: rstrip removes the trailing `e`s. type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49590/python-bug.py ___ Python tracker <https://bugs.python.org/issue42313> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35737] crypt AuthenticationError introduced with new Linux kernel
New submission from Brett R : We are seeing a crash apparently in crypt.py when invoked via SaltStack and have narrowed it down to some change in the Linux kernel introduced by this security update: https://access.redhat.com/errata/RHSA-2018:3083 Linux kernel 3.10.0-862.14.4.el7.x86_64 works fine Linux kernel 3.10.0-957.el7.x86_64 and later show this error: 2018-11-28T16:35:13.302740+00:00 ip-10-128-152-49 cloud-init: [INFO] Executing state cmd.script for [setup-secondary-ips] 2018-11-28T16:35:13.494523+00:00 ip-10-128-152-49 cloud-init: [ERROR ] An exception occurred in this state: Traceback (most recent call last): 2018-11-28T16:35:13.497189+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/state.py", line 1889, in call 2018-11-28T16:35:13.500053+00:00 ip-10-128-152-49 cloud-init: **cdata['kwargs']) 2018-11-28T16:35:13.502780+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1839, in wrapper 2018-11-28T16:35:13.505822+00:00 ip-10-128-152-49 cloud-init: return f(*args, **kwargs) 2018-11-28T16:35:13.508537+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/states/cmd.py", line 1118, in script 2018-11-28T16:35:13.511297+00:00 ip-10-128-152-49 cloud-init: cmd_all = __salt__['cmd.script'](source, python_shell=True, **cmd_kwargs) 2018-11-28T16:35:13.514308+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 2114, in script 2018-11-28T16:35:13.517107+00:00 ip-10-128-152-49 cloud-init: fn_ = __salt__['cp.cache_file'](source, saltenv) 2018-11-28T16:35:13.520171+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/modules/cp.py", line 474, in cache_file 2018-11-28T16:35:13.523112+00:00 ip-10-128-152-49 cloud-init: result = _client().cache_file(path, saltenv) 2018-11-28T16:35:13.526199+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 188, in cache_file 2018-11-28T16:35:13.529055+00:00 ip-10-128-152-49 cloud-init: return self.get_url(path, '', True, saltenv, cachedir=cachedir) 2018-11-28T16:35:13.532046+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 494, in get_url 2018-11-28T16:35:13.535280+00:00 ip-10-128-152-49 cloud-init: result = self.get_file(url, dest, makedirs, saltenv, cachedir=cachedir) 2018-11-28T16:35:13.538335+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 1145, in get_file 2018-11-28T16:35:13.541621+00:00 ip-10-128-152-49 cloud-init: data = self.channel.send(load, raw=True) 2018-11-28T16:35:13.544750+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 65, in wrap 2018-11-28T16:35:13.548071+00:00 ip-10-128-152-49 cloud-init: ret = self._block_future(ret) 2018-11-28T16:35:13.551304+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/utils/async.py", line 75, in _block_future 2018-11-28T16:35:13.554546+00:00 ip-10-128-152-49 cloud-init: return future.result() 2018-11-28T16:35:13.557950+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result 2018-11-28T16:35:13.561205+00:00 ip-10-128-152-49 cloud-init: raise_exc_info(self._exc_info) 2018-11-28T16:35:13.564478+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run 2018-11-28T16:35:13.568139+00:00 ip-10-128-152-49 cloud-init: yielded = self.gen.throw(*exc_info) 2018-11-28T16:35:13.571683+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 312, in send 2018-11-28T16:35:13.575103+00:00 ip-10-128-152-49 cloud-init: ret = yield self._crypted_transfer(load, tries=tries, timeout=timeout, raw=raw) 2018-11-28T16:35:13.578736+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run 2018-11-28T16:35:13.582255+00:00 ip-10-128-152-49 cloud-init: value = future.result() 2018-11-28T16:35:13.585869+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result 2018-11-28T16:35:13.589636+00:00 ip-10-128-152-49 cloud-init: raise_exc_info(self._exc_info) 2018-11-28T16:35:13.593537+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run 2018-11-28T16:35:13.597250+00:00 ip-10-128-152-49 cloud-init: yielded = self.gen.throw(*exc_info) 2018-11-28T16:35:13.604695+00:00 ip-10-128-152-49 cloud-init: File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 284, in _crypted_
[issue35737] crypt AuthenticationError introduced with new Linux kernel
Brett R added the comment: Karthikeyan, Thank you for looking into this. I have been trying, in the background, to make further progress on this issue but progress is slow and other issues crop up. While the version of Python here is old, it was the latest in RHEL/CentOS 7.5. We are trying to get RHEL 7.6 running as well. I understand that it appears 3rd party related, but I can't get much attention from the SaltStack folks either. Appreciate your patience as I try to narrow this down further. -- ___ Python tracker <https://bugs.python.org/issue35737> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29724] Itertools docs propose a harmful “speedup” without any explanation
Leonid R. added the comment: I think this is a "last resort" optimization and shouldn't be encouraged, especially in the official documentation. There are plenty of real optimizations you can do before doing micro-optimizations like this, and there is no reason it should be mentioned in the docs. -- nosy: +leovp ___ Python tracker <http://bugs.python.org/issue29724> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max
New submission from Naris R : if a generator passed to min/max throws an exception, the stack trace is normally shown on the line that caused the exception, but if the exception is a StopIteration, the trace only shows the line where the max/min function was called. I was writing a minimax and alphabeta search with generator expression and list comprehension and accidentally passed an empty iterator to the next function while computing states for minimax and it took a very long time to find out where the error was actually caused. -- messages: 315561 nosy: Naris R priority: normal severity: normal status: open title: inconsistent stack trace for exceptions thrown in generators passed to min/max type: behavior versions: Python 2.7, Python 3.6 ___ Python tracker <https://bugs.python.org/issue33323> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max
Naris R added the comment: This is a little bit contrived but it demonstrates the problem. ``` def good_exception(): raise Exception('something bad happened') def bad_exception(): return next(iter([])) def good(n): return good_exception() + n def bad(n): return n - bad_exception() import traceback try: max(good(i) for i in range(4)) # desirable behaviour except: traceback.print_exc() try: min(bad(i) for i in range(7)) # unhelpful error message except: traceback.print_exc() ``` -- ___ Python tracker <https://bugs.python.org/issue33323> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34427] calling MutableSequence.extend on self produces infinite loop
New submission from Naris R : Example: ``` from typing import MutableSequence, TypeVar CliffordGate = TypeVar('CliffordGate') class QCircuit(MutableSequence[CliffordGate]): def __init__(self, gates): self.gates = list(gates) def __repr__(self): return f'{self.__class__.__name__}({self.gates})' def __getitem__(self, key): return self.gates[key] def __setitem__(self, key, item): self.gates[key] = item def __delitem__(self, key): del self.gates[key] def insert(self, key, item): self.gates.insert(key, item) a = QCircuit(['H0', 'S2']) a += a ``` -- components: Library (Lib) messages: 323696 nosy: Naris R priority: normal severity: normal status: open title: calling MutableSequence.extend on self produces infinite loop type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34427] calling MutableSequence.extend on self produces infinite loop
Naris R added the comment: I forgot to copy over __len__ in the example -- ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34427] calling MutableSequence.extend on self produces infinite loop
Change by Naris R : -- nosy: +rhettinger, stutzbach ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34427] calling MutableSequence.extend on self produces infinite loop
Change by Naris R : -- keywords: +patch pull_requests: +8291 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
New submission from R. Jayakrishnan: Continuing the IDLE unittest framework initiated in http://bugs.python.org/issue15392. A small unit test for IDLE Delegator.py module. This patch introduces a test module named test_delegator.py inside Lib/idlelib/idle_test, considering the points README file in idle_test. The test method test_setdelegate() simply passes a text widget to Delegator by calling setdelegate(), and test the widget returned by getdelegate() for the same. -- components: IDLE files: test_delegator.patch keywords: patch messages: 190960 nosy: JayKrish priority: normal severity: normal status: open title: IDLE Improvements: Unit test for Delegator.py type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30544/test_delegator.patch ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
Changes by R. Jayakrishnan : -- versions: +Python 2.7, Python 3.3 ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18103] Create a GUI test framework for Idle
Changes by R. Jayakrishnan : -- nosy: +JayKrish ___ Python tracker <http://bugs.python.org/issue18103> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18104] Idle: make human-mediated GUI tests usable
Changes by R. Jayakrishnan : -- nosy: +JayKrish ___ Python tracker <http://bugs.python.org/issue18104> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
R. Jayakrishnan added the comment: The "from test.resource import requires" give me errors saying no module named resource in test (Am I missing anything?) For the moment I use "from test.support import requires" as in test_delegator1.patch . from test.support import requires requires('gui') class Test_delegator(unittest.TestCase): def setUp(self): . The results follows --- jaykrish@jaykrish-Vostro-1520:~/gsoc/cpy/cpython$ ./python -m test -ugui test_idle [1/1] test_idle 1 test OK. [189373 refs] -- jaykrish@jaykrish-Vostro-1520:~/gsoc/cpy/cpython$ ./python -m test test_idle [1/1] test_idle test test_idle failed -- Traceback (most recent call last): File "/home/jaykrish/gsoc/cpy/cpython/Lib/unittest/case.py", line 384, in _executeTestPart function() File "/home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py", line 32, in testFailure raise exception ImportError: Failed to import test module: idlelib.idle_test.test_delegator Traceback (most recent call last): File "/home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py", line 261, in _find_tests module = self._get_module_from_name(name) File "/home/jaykrish/gsoc/cpy/cpython/Lib/unittest/loader.py", line 239, in _get_module_from_name __import__(name) File "/home/jaykrish/gsoc/cpy/cpython/Lib/idlelib/idle_test/test_delegator.py", line 8, in requires('gui') File "/home/jaykrish/gsoc/cpy/cpython/Lib/test/support.py", line 390, in requires raise ResourceDenied(msg) test.support.ResourceDenied: Use of the 'gui' resource not enabled 1 test failed: test_idle [189233 refs] --- And yes, the teardown method using self.root.destroy() now. -- Added file: http://bugs.python.org/file30626/test_delegator1.patch ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
Changes by R. Jayakrishnan : Removed file: http://bugs.python.org/file30626/test_delegator1.patch ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
Changes by R. Jayakrishnan : Added file: http://bugs.python.org/file30627/test_delegator1.patch ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
Changes by R. Jayakrishnan : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18189] IDLE Improvements: Unit test for Delegator.py
R. Jayakrishnan added the comment: I wrapped requires('gui') as submitted in patch2. But this time commands "python -m test test_idle" and with -ugui does not skip delegatortest (it runs successfully to both). I took Lib/test/test_tk.py as an example. It calls runtktests.get_tests using support.run_unittest from test module. Exploring Lib/tkinter/test/runtktests.py the get_tests method begins like def get_tests(text=True, gui=True, packages=None): """Yield all the tests in the modules found by get_tests_modules. If nogui is True, only tests that do not require a GUI will be returned.""" attrs = [] if text: attrs.append('tests_nogui') if gui: attrs.append('tests_gui') also notice the main method calles "test.support.use_resources = ['gui']" Now the tktests have the line * require('gui') * before the class bigins, for example have a look on test_textensions.py So do we have to come up with the same procedure to skip and play with gui and non-gui tests for IDLE ? correct me if I am wrong anywhere. -- Added file: http://bugs.python.org/file30691/test_delegator2.patch ___ Python tracker <http://bugs.python.org/issue18189> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18292] IDLE Improvements: Unit test for AutoExpand.py
New submission from R. Jayakrishnan: Continuing the IDLE unittest framework initiated in #15392. Writing test for AutoExpand.py -- components: IDLE, Tests messages: 191795 nosy: JayKrish priority: normal severity: normal status: open title: IDLE Improvements: Unit test for AutoExpand.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue18292> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18425] IDLE Unit test for IdleHistory.py
New submission from R. Jayakrishnan: Continuing the IDLE unittest framework #15392, unit test for IdleHistory.py. This test depends on mockText and uses the patch by Terry at issue #18365. Because the mockText is still about to commit, first patch http://bugs.python.org/file30865/mock_text2.diff and then use test_idlehistory.patch to run test_idlehistory. Once the mock Text get committed I will improve the patch according to. -- components: IDLE files: test_idlehistory.patch keywords: patch messages: 192840 nosy: JayKrish, terry.reedy priority: normal severity: normal status: open title: IDLE Unit test for IdleHistory.py type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30885/test_idlehistory.patch ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17535] IDLE: Add an option to show line numbers along the left side of the editor window, and have it enabled by default.
Changes by R. Jayakrishnan : -- nosy: +JayKrish ___ Python tracker <http://bugs.python.org/issue17535> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18365] Idle: mock Text class and test thereof
Changes by R. Jayakrishnan : -- nosy: +JayKrish ___ Python tracker <http://bugs.python.org/issue18365> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18425] IDLE Unit test for IdleHistory.py
R. Jayakrishnan added the comment: Now we have the mockText, So I updated my test for Idlehistory. The submitted patch2 contains tests for two methods in Idlehistory (history_store and History_do). I hope the tests for history_store are done. But the history_do method tests fails. I explored a bit on the failure trace, History_do method is called by PyShell.py before it calls, pyShell does self.text.mark_set("iomark", "insert") and passes the Text to IdleHistory. Now Idlehistory uses 'iomark' as an index. Mock Text's _decode only handles specific input indexes (as it mentions), that means this 'iomark' index failed to all the logic of _decode method and finally crosses line, char = index.split('.') line which eventually raises a ValueError: need more than 1 value to unpack. One option is to create an issue to futher develop mock Text and implement mark_set also the _decode and so on, or Is it sounds like making stuffs more complex?, so we may decide the implemented tests are adequate enough for now. -- Added file: http://bugs.python.org/file30912/test_idlehistory1.patch ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18425] IDLE Unit test for IdleHistory.py
R. Jayakrishnan added the comment: Thanks Terry for "we have the option of gui tests when mocking becomes too complicated" I put two separate classes IdleHistoryMockTest and IdleHistoryTKTest for mock and TK text usages and used TK Text to test IdleHistory.history_do function. This worked for me and hopefully IMHO the logic behind history_do is tested enough for now. -- Added file: http://bugs.python.org/file30963/test_idlehistory2.patch ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
New submission from R. Jayakrishnan: Following the Idle: mock Text class and test thereof created #18365 I am trying to improve the _decode function because most of the Idletests needs the mock text and requires some more features to handle indexes. Started improving the mockText _decode method while writing unit test for AutoExpand.py at #18292. For now I want the mock text to decode following indexes: line.char, insert, end, +-#c/chars, lineend, linestart, wordstart, wordend For this I am trying to write regular expressions to extract the parts of index. The submitted decodeTest.py is a sample script to show how my regular expression starts manipulating the decoding of indexes. I have attached a checklist of several indexes. So you can easily run them and get an understanding of my approach. -- files: decodeTest.py messages: 193358 nosy: JayKrish priority: normal severity: normal status: open title: IDLE:Improvements- Improving Mock_Text Added file: http://bugs.python.org/file30978/decodeTest.py ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
Changes by R. Jayakrishnan : Added file: http://bugs.python.org/file30979/decodeChecklist.txt ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
Changes by R. Jayakrishnan : Removed file: http://bugs.python.org/file30978/decodeTest.py ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
Changes by R. Jayakrishnan : Added file: http://bugs.python.org/file30980/decodeTest.py ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18292] IDLE Improvements: Unit test for AutoExpand.py
R. Jayakrishnan added the comment: I am trying to improve the _decode function of mock Text class because most of the Idletests needs the mock text and requires some more features to handle indexes. Created an issue IDLE:Improvements- Improving Mock_Text http://bugs.python.org/issue18504 -- ___ Python tracker <http://bugs.python.org/issue18292> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18425] IDLE Unit test for IdleHistory.py
Changes by R. Jayakrishnan : -- resolution: -> works for me ___ Python tracker <http://bugs.python.org/issue18425> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
Changes by R. Jayakrishnan : -- nosy: +Todd.Rovito ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18504] IDLE:Improvements- Improving Mock_Text
R. Jayakrishnan added the comment: Yes,correcting myself. I should aim indexes which actual idlelib uses. Thank you Terry for the grammar. Fighting with the index parsing last week, and finally came up with a level to break the index into base and modifier and decode it along with using regular expressions. Now the mock_tk attached at this patch passes all the existing test cases, and failing the new test I have written on text_test The problem now I am dealing with is, there are four exceeding conditions I have to handle which make errors. 1.returning line < 0 2.returning line > last line 3.returning char < 0 4.returning char > its line length For example, in parsing base the return line may exceed last line but the modifier will say '-2lines' doing that, now the return line is not exceeding last line. -- keywords: +patch Added file: http://bugs.python.org/file31043/mocktk_decodeByRE1.patch ___ Python tracker <http://bugs.python.org/issue18504> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18704] IDLE: PEP8 Style Check Integration
New submission from R. Jayakrishnan: This is to create an IDLE extension that would integrate PEP8 (Syntax Style Checker https://pypi.python.org/pypi/pep8 ) into the IDLE editor window,so the developer who is using the IDLE editor can quickly and frequently check the PEP8 standards of the code which is being developed in an IDLE editor window. Many modern IDE's have not only syntax highlighting but on the fly syntax checking. Python ensures the quality of code with its own standards implemented as PEP8. The tool pep8 checks Python code against some of the style conventions in PEP8. Also the PEP8 standardization should not be a ‘must emphasizing’ for a python developer, therefore configuring pep8 to enable/disable errors and warning in various levels should be implemented. The implementation work is started by Todd at https://bitbucket.org/rovitotv/pythonpatches/src/fae1fdab936043ec35db541808f5789325762fb3/PEP8CheckExtension.patch?at=default The submitted patch is an effort started from Todd's patch as an example. The IDLE with this patch will show PEP8 style check toggle menu in Options. Once PEP8 check enabled the current module is checked by pep8 tool and the defects will be shown in a extended left pane. Defect codes will be listed as a Buttons, button click leads to highlighting the line and column of the defect and scroll editor window if needed. It is expected that the developer will correct the defect with the help of the message and eventually press the Resolve button,which refresh the pane. This is an initial work and I am looking forward for suggestions on improvements and mistakes of this patch. -- components: IDLE files: PEP8Extension_1.patch keywords: patch messages: 194841 nosy: JayKrish priority: normal severity: normal status: open title: IDLE: PEP8 Style Check Integration type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31221/PEP8Extension_1.patch ___ Python tracker <http://bugs.python.org/issue18704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18704] IDLE: PEP8 Style Check Integration
Changes by R. Jayakrishnan : -- nosy: +Todd.Rovito ___ Python tracker <http://bugs.python.org/issue18704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18704] IDLE: PEP8 Style Check Integration
Changes by R. Jayakrishnan : -- nosy: +philwebster ___ Python tracker <http://bugs.python.org/issue18704> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18583] Idle: enhance FormatParagraph
Changes by R. Jayakrishnan : -- nosy: +JayKrish ___ Python tracker <http://bugs.python.org/issue18583> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15901] multiprocessing sharedctypes Array don't accept strings
New submission from Simon R: I've simply tested the example reported in the py3k documentation, and it don't works. See the site: http://docs.python.org/py3k/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing.sharedctypes The program exit with this error: > python sha.py Traceback (most recent call last): File "sha.py", line 21, in s = Array('c', 'hello world', lock=lock) File "/usr/lib/python3.2/multiprocessing/sharedctypes.py", line 112, in Array obj = RawArray(typecode_or_type, size_or_initializer) File "/usr/lib/python3.2/multiprocessing/sharedctypes.py", line 89, in RawArray result.__init__(*size_or_initializer) TypeError: one character string expected Observe that the following code works correctly with python2! I'm using python 3.2.3 and gcc 4.7.1 under ArchLinx Te code is: http://docs.python.org/py3k/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing.sharedctypes from multiprocessing import Process, Lock from multiprocessing.sharedctypes import Value, Array from ctypes import Structure, c_double class Point(Structure): _fields_ = [('x', c_double), ('y', c_double)] def modify(n, x, s, A): n.value **= 2 x.value **= 2 s.value = s.value.upper() for a in A: a.x **= 2 a.y **= 2 if __name__ == '__main__': lock = Lock() n = Value('i', 7) x = Value(c_double, 1.0/3.0, lock=False) s = Array('c', 'hello world', lock=lock) A = Array(Point, [(1.875,-6.25), (-5.75,2.0), (2.375,9.5)], lock=lock) p = Process(target=modify, args=(n, x, s, A)) p.start() p.join() print((n.value)) print((x.value)) print((s.value)) print([(a.x, a.y) for a in A]) -- components: ctypes messages: 170171 nosy: bred priority: normal severity: normal status: open title: multiprocessing sharedctypes Array don't accept strings type: crash versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue15901> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16111] Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder
New submission from Ganesh R.: Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder. The recommended way to distribute VC++ dlls is to either install the VC++ Redistributable as a pre-requisite or just add the dll to local folder. Directly installing the VC++ dlls to the WinSxS is not a recommended practice and can lead to problems. I am not sure if it even checks if the dll is present in the WinSxS folder. The dll shipped with Python is the RTM version. SP1 and later many security fixes were released by Microsoft. But python has not upgraded the dll. Also many machines have VC++ already installed and of higher version. So there is a manifest file that redirects all requests to a newer version. So adding an older file is futile. -- components: Installation messages: 171820 nosy: freaksterrao priority: normal severity: normal status: open title: Python 2.7.3 Windows MSI installer installs the VC++ 9 dlls directly to WinSxS folder type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue16111> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18704] IDLE: PEP8 Style Check Integration
R. Jayakrishnan added the comment: Thanks for showing great interest on this idea. As usual, it seems this will going to be another nice project with IDLE for me. Better to close this issue then, and create an appropriate initiation with the suggested points(preferring a commencement by core developers). Anyway to keep in touch with the Python analyzing and related tools, I have initiated a separate project with porting the works done on the patch here https://github.com/Jay-Krish/IDLEAnalyzer. I Hope this will help further while working on this project. -- ___ Python tracker <http://bugs.python.org/issue18704> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18704] IDLE: PEP8 Style Check Integration
R. Jayakrishnan added the comment: I would prefer this issue concludes with a navigation to the new proposed enhancement. -- ___ Python tracker <http://bugs.python.org/issue18704> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5961] Missing labelside option for Tix option menu (fix included)
Cary R. added the comment: That is the manual I am referencing and the last time I looked it was the most recent. I'm not to familiar with the Python port of Tix, but I am using the command, label, state, and variable options and they already work fine. I could try the other options if that would help. I needed the labelside functionality so I hacked Tix.py to get it to work. I mimicked the code from other objects that have a labelside option. My assumption was that some base class knew how to handle many of the standard options, but did not know about labelside. It is possible that there is a better way to handle this (add it to the same place the others are implemented), but that would have required understanding the class hierarchy and much more work. At the time I just needed to get it to work and what I proposed does work and is consistent with other objects. Since I was not using the other options I did not check them. Let me know if there is anything else I can do to help. -- ___ Python tracker <http://bugs.python.org/issue5961> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5961] Missing labelside option for Tix option menu (fix included)
New submission from Cary R. : The Tix Optionmenu is documented to support a labelside option that is used to specify where the label should be relative to the selection. I have verified that adding 'labelside' to the static_options when calling the base constructor (TixWidget.__init__) located in Tix.py line 1185 (for both 2.5.4 and 2.6.2) fixes the problem. TixWidget.__init__(self, ... ,['labelside', 'options'], ... ) I am currently using 2.5.4, but a fix only for the 2.6 branch is acceptable for all but my personal machine (which I can patch by hand). I am not very familiar with how all this works, so if there is something I can do from my code to add this option that would be nice to know. -- components: Tkinter messages: 87388 nosy: caryr severity: normal status: open title: Missing labelside option for Tix option menu (fix included) type: feature request versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue5961> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5961] Missing labelside option for Tix option menu (fix included)
Changes by Cary R. : -- versions: +Python 2.5 ___ Python tracker <http://bugs.python.org/issue5961> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute
Thayu R added the comment: Just to add: select.error was made an alias of OSError following PEP 3151 from 3.3 onwards. Up to 3.2, it was a pair containing the error code and the error string. http://docs.python.org/3.3/library/select.html?highlight=select.error#select.error -- nosy: +Thayu.R ___ Python tracker <http://bugs.python.org/issue18035> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters
New submission from Shreevatsa R: Summary: This is about int(u'१२३४') == 1234. At https://docs.python.org/2/library/functions.html and also https://docs.python.org/3/library/functions.html the documentation for class int(x=0) class int(x, base=10) says (respectively): > If x is not a number or if base is given, then x must be a string or Unicode > object representing an integer literal in radix base. > If x is not a number or if base is given, then x must be a string, bytes, or > bytearray instance representing an integer literal in radix base. If you follow the definition of "integer literal" into the reference (https://docs.python.org/2/reference/lexical_analysis.html#integers and https://docs.python.org/3/reference/lexical_analysis.html#integers respectively), the definitions ultimately involve nonzerodigit ::= "1"..."9" octdigit ::= "0"..."7" bindigit ::= "0" | "1" digit ::= "0"..."9" So it looks like whether the behaviour of int() conforms to its documentation hinges on what "representing" means. Apparently it is some definition under which u'१२३४' represents the integer literal 1234, but it would be great to either clarify the documentation of int() or change its behaviour. -- assignee: docs@python components: Documentation, Interpreter Core, Unicode messages: 251915 nosy: docs@python, ezio.melotti, haypo, shreevatsa priority: normal severity: normal status: open title: Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters ___ Python tracker <http://bugs.python.org/issue25275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters
Shreevatsa R added the comment: Minor difference, but the relevant function for int() is not quite isdigit(), e.g.: >>> import unicodedata >>> s = u'\u2460' >>> unicodedata.name(s) 'CIRCLED DIGIT ONE' >>> print s ① >>> s.isdigit() True >>> s.isdecimal() False >>> int(s) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'decimal' codec can't encode character u'\u2460' in position 0: invalid decimal Unicode string It seems to be isdecimal(), plus if there are other digits in the string then many leading and trailing space-like characters are also allowed (e.g. 5760 OGHAM SPACE MARK or 8195 EM SPACE or 12288 IDEOGRAPHIC SPACE: >>> 987 == int(u'\u3000\n 987\u1680\t') True -- ___ Python tracker <http://bugs.python.org/issue25275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25275] Documentation v/s behaviour mismatch wrt integer literals containing non-ASCII characters
Shreevatsa R added the comment: About the mismatch: of course it's probably not a good idea to change the parser (so that simply typing १२३४ in Python 3 code is like typing 1234), but how about changing the behaviour of int()? Not sure whether anyone should be relying on int(u'१२३४') being 1234, given that it is not documented as such. -- ___ Python tracker <http://bugs.python.org/issue25275> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25467] Put “deprecated” warnings first
New submission from Tony R.: Python has wonderful, detailed documentation. I love it! Unfortunately, I have often found myself reading the otherwise-excellent documentation on a class/function/whatever, only to find out at the END of my reading that it is deprecated. This is frustrating, and counter-intuitive. If something is deprecated, I want to know it before I read any further. I have attached a patch with the relevant changes. I hope it helps! -- assignee: docs@python components: Documentation files: 0001-Move-deprecated-blocks-to-the-beginning-of-their-doc.patch keywords: patch messages: 253391 nosy: Tony R., docs@python priority: normal severity: normal status: open title: Put “deprecated” warnings first type: enhancement Added file: http://bugs.python.org/file40851/0001-Move-deprecated-blocks-to-the-beginning-of-their-doc.patch ___ Python tracker <http://bugs.python.org/issue25467> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25467] Put “deprecated” warnings first
Tony R. added the comment: > Thanks for the report and the patch. Thank you for the review! > I think a better way to handle this would be to add a "tag" next to the > function name for both deprecations and "new in", and leave the actual > deprecation/new-in notes at the bottom, something like: > > funcname(args) [new in 3.2] [deprecated in 3.5] > Func description here. > > New in 3.2: the funcname() function was added. > Deprecated in 3.5: funcname() has been deprecated. Use anotherfunc() > instead. I’m not sure I understand what you mean by “tag”. (ASIDE: I’m only marginally familiar with Sphinx, so I don’t know if “tag” has a specific meaning here. I dabble across lots of markup-to-full-docs generation tools; Sphinx is just one that I happen to know the least.) Are you saying that the source documentation would remain as-is, but something during the Sphinx _transformation_ would generate the new/deprecated tags? As long as those tags are clearly visible at-or-near the start, then I’m all for it. If that is what you propose, then I can think of several possible ways to structure the generated HTML & CSS—and from there I would just need to dive into the Sphinx transformations and figure out where to sprinkle the “tags”. -- ___ Python tracker <http://bugs.python.org/issue25467> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25467] Put “deprecated” warnings first
Tony R. added the comment: > On Oct 26, 2015, at 1:49 PM, Ezio Melotti wrote: > > Not sure if there's a clever way to do it though (maybe a CSS class can be > added to the directives and the labels can be added with CSS :after). I was thinking something along these lines. Other possibilities come to mind, also. -- ___ Python tracker <http://bugs.python.org/issue25467> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25467] Put “deprecated” warnings first
Tony R. added the comment: > On Oct 26, 2015, at 4:28 PM, Ezio Melotti wrote: > > This is true, but on the other hand you might want to see the [new in 3.4] > while looking at 3.6 docs and working on a program that must support Python > 3.3+. Anyway we can discuss this again once we have a patch -- depending on > how it is implemented, it might be easy enough to include the tag only for > functions added in the last 2 releases, or perhaps the tag won't be > particularly distracting and can be used for all versions. Smart use of CSS and a sprinkle of JavaScript could solve this. - Add all versions in the markup - By default, use CSS to hide all except latest version - Using JavaScript and a simple `localStorage` variable, save a preference to “lower the version threshold” if desired I tend to prefer non-JS solutions when possible, but this would only take a few lines of code. (And of course, one `localStorage` variable along the lines of `minimumAddedInPythonVersion = ‘3.2’`, or whatever.) —Tony -- ___ Python tracker <http://bugs.python.org/issue25467> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26212] Python with ncurses6.0 will not load _curses module.
New submission from R. Jones: I am trying to compile Python-2.7.10. This is being done as a user, not root and I don't have access to /usr/local other than to avoid all the broken stuff in it. My local is /appl/local I am installing Python in /appl/local/python-2.7.10 I have ncursest as part of my /appl/local, but python keeps wanting to link with /usr/ccs/lib/libcurses.so. UGH. "ncursest" was built instead of "ncurses" because I used "--with-pthread" and "--enable-reentrant" I rebuilt ncurses without those two flags but with --with-termlib which built libtinfo.so. When compiling the _curses module, I get this error: *** WARNING: renaming "_curses" since importing it failed: ld.so.1: python: fatal: relocation error: file build/lib.solaris-2.10-sun4u.32bit-2.7/_curses.so: symbol _unctrl: referenced symbol not found In this case I can see unctrl is in tinfo...but no matter what I do, I cannot get it to add -ltinfo to the link line. $ nm -s libtinfo.so | grep unctrl 0001d4f8 T unctrl 00039170 r unctrl_blob.5682 00039070 r unctrl_c1.5681 0001d30c T unctrl_sp 00039572 r unctrl_table.5680 So my next attempt was to make a private copy of ncurses for Python without --with-termlib, but had to add --enable-termcap and install it in /appl/local/python-2.7.10/lib $ ls -al /appl/local/python-2.7.10/lib total 15584 drwxr-xr-x 4 gfp-ip gfp-ip 1024 Jan 26 16:45 . drwxr-xr-x 6 gfp-ip gfp-ip96 Jan 26 15:31 .. -rw-r--r-- 1 gfp-ip gfp-ip120560 Jan 26 15:32 libform.a -rwxr-xr-x 1 gfp-ip gfp-ip 1055 Jan 26 15:32 libform.la lrwxrwxrwx 1 gfp-ip gfp-ip16 Jan 26 15:32 libform.so -> libform.so.6.0.0 lrwxrwxrwx 1 gfp-ip gfp-ip16 Jan 26 15:32 libform.so.6 -> libform.so.6.0.0 -rwxr-xr-x 1 gfp-ip gfp-ip 95604 Jan 26 15:32 libform.so.6.0.0 -rw-r--r-- 1 gfp-ip gfp-ip 61908 Jan 26 15:32 libmenu.a -rwxr-xr-x 1 gfp-ip gfp-ip 1055 Jan 26 15:32 libmenu.la lrwxrwxrwx 1 gfp-ip gfp-ip16 Jan 26 15:32 libmenu.so -> libmenu.so.6.0.0 lrwxrwxrwx 1 gfp-ip gfp-ip16 Jan 26 15:32 libmenu.so.6 -> libmenu.so.6.0.0 -rwxr-xr-x 1 gfp-ip gfp-ip 48060 Jan 26 15:32 libmenu.so.6.0.0 -rw-r--r-- 1 gfp-ip gfp-ip174364 Jan 26 15:32 libncurses++.a -rwxr-xr-x 1 gfp-ip gfp-ip 1295 Jan 26 15:32 libncurses++.la lrwxrwxrwx 1 gfp-ip gfp-ip21 Jan 26 15:32 libncurses++.so -> libncurses++.so.6.0.0 lrwxrwxrwx 1 gfp-ip gfp-ip21 Jan 26 15:32 libncurses++.so.6 -> libncurses++.so.6.0.0 -rwxr-xr-x 1 gfp-ip gfp-ip114812 Jan 26 15:32 libncurses++.so.6.0.0 -rw-r--r-- 1 gfp-ip gfp-ip628332 Jan 26 15:31 libncurses.a -rwxr-xr-x 1 gfp-ip gfp-ip 1019 Jan 26 15:31 libncurses.la lrwxrwxrwx 1 gfp-ip gfp-ip19 Jan 26 15:31 libncurses.so -> libncurses.so.6.0.0 lrwxrwxrwx 1 gfp-ip gfp-ip19 Jan 26 15:31 libncurses.so.6 -> libncurses.so.6.0.0 -rwxr-xr-x 1 gfp-ip gfp-ip478356 Jan 26 15:31 libncurses.so.6.0.0 -rw-r--r-- 1 gfp-ip gfp-ip 26324 Jan 26 15:31 libpanel.a -rwxr-xr-x 1 gfp-ip gfp-ip 1062 Jan 26 15:31 libpanel.la lrwxrwxrwx 1 gfp-ip gfp-ip17 Jan 26 15:31 libpanel.so -> libpanel.so.6.0.0 lrwxrwxrwx 1 gfp-ip gfp-ip17 Jan 26 15:31 libpanel.so.6 -> libpanel.so.6.0.0 -rwxr-xr-x 1 gfp-ip gfp-ip 23652 Jan 26 15:31 libpanel.so.6.0.0 $ nm /appl/local/python-2.7.10/lib/libncurses.so | grep unctrl 0004acac T unctrl 00067540 r unctrl_blob.5717 00067440 r unctrl_c1.5716 0004aac0 T unctrl_sp 00067942 r unctrl_table.5715 So ONCE again, compiling Python module _curses with the new lib: Script started on Tue Jan 26 19:36:55 2016 $ make running build running build_ext building dbm using ndbm building '_curses' extension gcc -fPIC -fno-strict-aliasing -I/appl/local/python-2.7.10/include -I/appl/local/include -DNCURSES_OPAQUE=0 -DNCURSES_REENTRANT=0 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/appl/local/python-2.7.10/include -I/appl/local/include -I/usr/local/include -I/appl/logs/local_build/src/python.org/Python-2.7.10/Include -I/appl/logs/local_build/src/python.org/Python-2.7.10 -c /appl/logs/local_build/src/python.org/Python-2.7.10/Modules/_cursesmodule.c -o build/temp.solaris-2.10-sun4u.32bit-2.7/appl/logs/local_build/src/python.org/Python-2.7.10/Modules/_cursesmodule.o /appl/logs/local_build/src/python.org/Python-2.7.10/Modules/_cursesmodule.c: In function 'PyCursesWindow_ChgAt': /appl/logs/local_build/src/python.org/Python-2.7.10/Modules/_cursesmodule.c:713:9: warning: implicit declaration of function 'mvwchgat' [-Wimplicit-function-declaration] /appl/logs/local_build/src/python.org/Python-2.7.10/Modules/_cursesmodule.c:717:9: warning: implicit declaration of function 'wchgat' [-Wimplicit-function-declaration] gcc -shared -L/appl/local
[issue26212] Python with ncurses6.0 will not load _curses module on Solaris 10
R. Jones added the comment: Note: This issue is on Solaris 10 using GCC 4.7.2 and the Solaris linker "ld". -- title: Python with ncurses6.0 will not load _curses module. -> Python with ncurses6.0 will not load _curses module on Solaris 10 ___ Python tracker <http://bugs.python.org/issue26212> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate
New submission from Tony R.: In the documentation, I noticed several uses of ``.. versionchanged::`` that described things which had been added. I love Python, and its documentation, and I wanted to contribute. So, I figured a low-risk contribution would be to change ``.. versionchanged::`` to “.. versionadded” where appropriate. (I also tweaked the descriptions accordingly. E.g., “Added the *x* argument” became “The *x* argument”, because it’s unnecessary to say “added” in a description under “.. versionadded”.) I did also make a few unrelated tweaks along the way--all very minor, and related to phrasing or formatting. Please let me know if I can do anything else to get this merged! -- assignee: docs@python components: Documentation files: _docs-version-markup.patch keywords: patch messages: 260313 nosy: Tony R., docs@python priority: normal severity: normal status: open title: Use “.. versionadded” over “.. versionchanged” where appropriate type: enhancement Added file: http://bugs.python.org/file41929/_docs-version-markup.patch ___ Python tracker <http://bugs.python.org/issue26366> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate
Tony R. added the comment: > My weak opinion is that a new parameter is a new API item, not just a change > in behaviour, so should probably have “versionadded”. This was my reasoning as well. Also, when I noticed so many instances of ``.. versionchanged`` that all say “Added the *x* parameter” (or whatever), it strikes me that these are a *large class of changes*, which all have some kind of addition in common. If you think about it, deprecations and removals are also changes, but they are a large-enough class of changes to merit a distinct markup directive. So, just as this is true for “deprecated” or “deprecated-removed”, I believe it is just as true for “added”. Once all additions, deprecations, and removals have been marked up as such, I think find that there’s still PLENTY of annotations that remain under ``.. versionchanged``. Put another way: Since these are all different types of changes, it is most useful to the reader if the most specific *type* of change is reflected in the markup. -- ___ Python tracker <http://bugs.python.org/issue26366> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate
Tony R. added the comment: > Here are the original descriptions of the old LaTeX version. Holy crap! You all used to use LaTeX?! :D (I know--LaTeX is still going strong in academia. I just had no idea it was ever part of Python’s documentation, except as an output format.) > Adding a parameter is explicitly a "versionchanged" kind of change. > > Since the Sphinx items are supposed to be equivalent, this has always been > the intention, even if the current devguide deviates. Ah, okay. Well then, if this is the sort of place where the status quo is sacred, then there is nothing more to discuss. But if anyone reading this is open to the idea, please re-read my previous comment in this thread. The quoted LaTeX docs are clear, but I still believe my “all changes = (deprecated-removed changes) + (added changes) + (other changes)” interpretation makes more sense than the LaTeX definition. I also think it is more helpful to the *reader*--which, I respectfully suggest, should be the basis for any documentation’s guidelines--by marking up changes according to this grouping. It’s not my desire to be troublesome by making one more appeal. I simply want to point out that just because somebody wrote the LaTeX definitions a long time ago doesn’t mean that we cannot rewrite them. They were written by somebody just like us, after all. If it’s not obvious by now, I feel strongly about good semantic markup. The purpose of semantic markup is to describe what something *is*. I just think that changes form a hierarchy, with a generic “change” as something of the base class, and “deprecated”, “removed”, and “added” as specializations. If you’re reading this, and you feel similarly--speak up! What do you think? Respectfully, —Tony -- ___ Python tracker <http://bugs.python.org/issue26366> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26366] Use “.. versionadded” over “.. versionchanged” where appropriate
Tony R. added the comment: > Part of the problem is getting the granularity right. The initial intent was > that 'version*' were annotations for the enclosing object (function, class, > method, etc.). If we want to have something more granular (parameter > added / deprecated / whatever), we should have distinct markup for that. > > That could look something like: > > .. parameteradded:: alternate 3.6 >Further explanation goes here. > > It's helpful to think of these annotations as pronouns; the antecedent > needs to be clear before they can be interpreted correctly. Isn’t language fun?!?! *insane smile* 8) > It sounds > like that needs to be clarified in the documentation, and possibly > provision added for a more fine-grained form of annotation. Okay. I can participate in the discussion of that, if it would help...but adding a completely new annotation type is outside my current ability to contribute. > > Well then, if this is the sort of place where the status quo is sacred, > > then there is nothing more to discuss. > > That wasn't my intention when quoting the old documenting guide, it was just > to show what the intent was (and still is), and that I didn't just invent it. Your intent was clear to me! I did not mean to say that you -- or anyone -- just invented it. I only know that mature projects (like Python) tend to hold more strongly to the status quo, and that I was advocating a change that was probably going to be an uphill battle to convince others as worthwhile. > That's a nice strawman -- we all feel semantic markup is important, and we > are talking about nothing but semantic markup here. We're just discussing > the interpretation of one aspect of the semantics. It was not my wish to set up a strawman. (I have no formal training in logic, anyways; I’d probably screw it up if I deliberately tried!) The reason I was stressing semantic markup is because I anticipated resistance from the mindset of “Ugh, I don’t want to deal with this tedious crap!” I wanted to emphasize semantic markup as something valuable -- worth making an effort for, even if it might appear tedious or trivial at first glance. That said, I think it’s time for me to bow out of this conversation. I’ve never made a successful contribution to any part of Python, including the documentation. There was some talk of updating the devguide or adding new annotations, so I hope that something good comes out of that! But the issue patch is where my comfort level is right now, and it appears that it’s a no-go. Thank you for your time, your consideration, and the discussion! —Tony -- ___ Python tracker <http://bugs.python.org/issue26366> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26958] Suggestion to imporve queue.full reliability
New submission from Sudharsan R: I was browsing through the code for queue.full and queue.put methods. The queue.full method claims it is not a reliable one. But, the same internal implementation - _qsize is used for put as well as full. "put" is thread safe and reliable and "full" is not. Why can't the full method acquire self.not_full instead of self.mutex, which will make both of the methods accurate at that instance of time? def full(self): """Return True if the queue is full, False otherwise (not reliable!).""" self.mutex.acquire() n = 0 < self.maxsize == self._qsize() self.mutex.release() return n def put(self, item, block=True, timeout=None): """Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within that time. Otherwise ('block' is false), put an item on the queue if a free slot is immediately available, else raise the Full exception ('timeout' is ignored in that case). """ self.not_full.acquire() try: if self.maxsize > 0: if not block: if self._qsize() == self.maxsize: raise Full -- messages: 264851 nosy: Sudharsan R priority: normal severity: normal status: open title: Suggestion to imporve queue.full reliability type: behavior versions: Python 3.6 ___ Python tracker <http://bugs.python.org/issue26958> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26958] Suggestion to imporve queue.full reliability
Sudharsan R added the comment: Just add on to it.. q=queue.Queue() with q.not_full: q.put_nowait(1) this will hang. So if we acquire the not_full while computing size, all puts will wait. Same is the case for q.empty() and q.not_empty method and condition respectively. -- ___ Python tracker <http://bugs.python.org/issue26958> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +28369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30150 ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
New submission from Jason R. Coombs : In https://github.com/python/importlib_metadata/issues/357, a user reported an issue where a requirement generated by importlib.metadata from egg info metadata would result in a parse error attempting to parse the error. A fix was released in importlib_metadata 4.8.3. -- assignee: jaraco messages: 408727 nosy: jaraco priority: normal severity: normal status: open title: Requirement syntax broken when extras indicated on url_req versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Change by Jason R. Coombs : -- pull_requests: +28371 pull_request: https://github.com/python/cpython/pull/30151 ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +28370 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30151 ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Jason R. Coombs added the comment: The change as implemented for importlib_metadata involves refactorings that can't be backported, so the fix will only go into Python 3.11. I'll consider backporting a more selective fix for this issue if it's important, but I suspect there may not be, given that Ronny has reported that he's already migrated to a solution accessing by attribute. -- versions: -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Change by Jason R. Coombs : -- pull_requests: -28371 ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
Jason R. Coombs added the comment: New changeset 109d96602199a91e94eb14b8cb3720841f22ded7 by Jason R. Coombs in branch 'main': bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151) https://github.com/python/cpython/commit/109d96602199a91e94eb14b8cb3720841f22ded7 -- ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Jason R. Coombs added the comment: New changeset 04deaee4c8d313717f3ea8f6a4fd70286d510d6e by Jason R. Coombs in branch 'main': bpo-44893: Implement EntryPoint as simple class with attributes. (GH-30150) https://github.com/python/cpython/commit/04deaee4c8d313717f3ea8f6a4fd70286d510d6e -- ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
Change by Jason R. Coombs : -- pull_requests: +28376 pull_request: https://github.com/python/cpython/pull/30157 ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
Jason R. Coombs added the comment: New changeset 864ec170e14b663f999eb415a4f1a0067ec6833a by Jason R. Coombs in branch '3.9': [3.9] bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151). (GH-30157) https://github.com/python/cpython/commit/864ec170e14b663f999eb415a4f1a0067ec6833a -- ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46105] Requirement syntax broken when extras indicated on url_req
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue46105> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44893] importlib.metadata Entrypoint has a broken _asdict
Jason R. Coombs added the comment: Expect the fix in 3.11a3. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44893> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46109] Separate resources and abc docs from other importlib docs
New submission from Jason R. Coombs : The `importlib` documentation is fairly long and covers a number of topics. Furthermore, the `importlib.metadata` is separately documented and presents a good example of breaking out major aspects. Let's do the same with `.abc` and `.resources`. -- assignee: jaraco components: Documentation messages: 408749 nosy: jaraco priority: normal severity: normal status: open title: Separate resources and abc docs from other importlib docs versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46109> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46109] Separate resources and abc docs from other importlib docs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +28379 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30160 ___ Python tracker <https://bugs.python.org/issue46109> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46109] Separate resources and abc docs from other importlib docs
Jason R. Coombs added the comment: My main motivation for moving `.abc` was because it contains classes exclusively relevant to `.resources` (those also present in `importlib_resources.abc`. I want to explore moving those classes to the resources documentation so they're available together and maintained independently. Other classes in `.abc` are relevant to the import system more generally, so maybe should stay in the main docs. -- ___ Python tracker <https://bugs.python.org/issue46109> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46118] Migrate importlib.resources into a package
New submission from Jason R. Coombs : The importlib.resources module has several modules on which it relies (_adapters, _legacy, simple) and some classes in other modules shared by other parts of importlib (namely abc). Because these implementations overlap, it adds difficulty in maintaining the `importlib_resources` backport, which must maintain these modules but keep them separate from the unrelated functionality in other parts of importlib. In an earlier refactoring, `importlib.metadata` was refactored into its own package (https://github.com/python/cpython/pull/25565). This refactoring had benefits of making it clearer which functionality of importlib was related to metadata and which was not. I'd like to do the same for importlib.resources. The main complicate -- messages: 408815 nosy: jaraco priority: normal severity: normal status: open title: Migrate importlib.resources into a package versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46109] Separate resources and abc docs from other importlib docs
Jason R. Coombs added the comment: I wonder if maybe it's more important to address issue46118 first. -- ___ Python tracker <https://bugs.python.org/issue46109> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46118] Migrate importlib.resources into a package
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +28393 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30176 ___ Python tracker <https://bugs.python.org/issue46118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46118] Migrate importlib.resources into a package
Jason R. Coombs added the comment: Compatibility considerations: - importlib.readers and importlib.simple are public, so probably need aliases. - Same abc classes. Should we embark on an effort to migrate users to the new names in `importlib.resources`, or simply leave the `importlib.{mod}` names as preferred? My instinct is to do the former, mainly because then the names would be congruent between `importlib.resources` and `importlib_resources`. But I'm also reluctant to introduce a deprecation (even deferred) comparable to what happened with `collections.abc`. -- ___ Python tracker <https://bugs.python.org/issue46118> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46124] Deprecation warning in zoneinfo module
Jason R. Coombs added the comment: I would hope that normalize_path would not be needed. It might be for drop-in compatibility. If it's needed for zoneinfo, I'd like to consider why and what implications that has for the deprecation of the legacy API. -- ___ Python tracker <https://bugs.python.org/issue46124> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46124] Deprecation warning in zoneinfo module
Change by Jason R. Coombs : -- assignee: -> jaraco ___ Python tracker <https://bugs.python.org/issue46124> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com