[issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__

2021-12-08 Thread Rahul Gupta


Rahul Gupta  added the comment:

After looking at this again, I agree with you - the key duplication issue seems 
to have gone. Thank you for providing this feedback, it is very helpful.

--

___
Python tracker 
<https://bugs.python.org/issue46019>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__

2021-12-08 Thread Rahul Gupta


Change by Rahul Gupta :


--
keywords: +patch
pull_requests: +28222
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 
<https://bugs.python.org/issue46019>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46019] collections.Counter - Cast list of keys into set to remove iteration over duplicate elements for __le__, __ge__ and __eq__

2021-12-08 Thread Rahul Gupta


New submission from Rahul Gupta :

On lines 725, 737 and 749 there is the following code:

'''for c in (self, other) for e in c''' which generates an iterable with all 
the keys in self and other - casting c to a set will remove duplicates and 
allow faster iteration - some minor benchmarks I ran seem to agree.

--
components: Library (Lib)
messages: 408063
nosy: argoop1728
priority: normal
severity: normal
status: open
title: collections.Counter - Cast list of keys into set to remove iteration 
over duplicate elements for __le__,__ge__ and __eq__
type: performance
versions: Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue46019>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Tangellapalli Sai Hanuma Rahul


Tangellapalli Sai Hanuma Rahul  added the comment:

Yes, it's true, it's so naive method, Contextvars! may be inside the Future 
Object?

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Tangellapalli Sai Hanuma Rahul


Tangellapalli Sai Hanuma Rahul  added the comment:

In summary;
==

Current Problem:
--
 
ThreadPoolExecutor handles all threads-related activities so the user needs to 
just submit tasks and set max_workers and other Executor settings if necessary. 
If ThreadPoolExecutor allowed us to name/rename threads, that would be great.

Of Course, there's a workaround that requires the user to change the name of 
the current Thread inside the Task, but that requires the user to access the 
current thread which I believe is not the goal of Thread Pool Executor.

Request;
--

Changes Made:
~~~
In this Pull request, _work_queue puts tuple of Future Object and name (name 
can be None).  i.e, typing.Tuple[_base.Future, typing. Optional[str]] which was 
just a _base.Future before.

So, inside the _worker function,
When it gets the elements and If its name is None, it will either use the 
thread_name_prefix or custom Name of task that was used before. else it sets 
the name of the current Thread with the given name.

Problems it solves
~

Currently, ThreadExecutor uses thread_name_prefix + index number for the 
Internal Thread which is not enough for debugging when we try to submit 
different types of Tasks (types here mean general callable). 

So, using this Optional Feature which allows users to submit tasks with names 
it allows them to easily find issues using the name of Thread either in Logger 
or in the debugger.

--

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Tangellapalli Sai Hanuma Rahul


Tangellapalli Sai Hanuma Rahul  added the comment:

There is a new function submit_with_name in _base.Executor that can accept name 
parameters before args and kwargs, submit can continue to be used as before.

submit internally calls submit_with_name with name as None. Calling 
submit_with_name in Executor causes a NotImplementedError, it was only 
implemented in ThreadPoolExecutor, but it could be implemented in any Executor

--

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Custom Name for ThreadPoolExecutor

2021-11-07 Thread Tangellapalli Sai Hanuma Rahul


Tangellapalli Sai Hanuma Rahul  added the comment:

ThreadPool handles tasks concurrently through Threads so users need not worry 
about the creation/deletion of Threads, it uses reuses threads whenever 
possible and it can handle any tasks. 

However, it should be possible for users to at least name/rename according to 
the tasks that the user submits into the ThreadPool.

Advantages:
* Good for Debugging (so user can know which thread has caused the issue)
* threadName attribute in logging's LogRecord can now use custom Name provided 
to the Task.

Until now thread_name_prefix parameter allows us to name the threads but those 
are not particular to the Task.

Price

previously one could write .submit(function_name, *args, **kwargs)
but now one should write 
.submit(function_name, name_of_thread, *args, **kwargs)
name_of_thread can be None

--

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Custom Name for ThreadPoolExecutor

2021-11-03 Thread Tangellapalli Sai Hanuma Rahul


Change by Tangellapalli Sai Hanuma Rahul :


--
versions:  -Python 3.10, Python 3.11

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Custom Name for ThreadPoolExecutor

2021-11-02 Thread Tangellapalli Sai Hanuma Rahul


Change by Tangellapalli Sai Hanuma Rahul :


--
hgrepos:  -410

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Custom Name for ThreadPoolExecutor

2021-11-02 Thread Tangellapalli Sai Hanuma Rahul


Change by Tangellapalli Sai Hanuma Rahul :


--
hgrepos: +410
keywords: +patch
pull_requests: +27619
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29359

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45689] Custom Name for ThreadPoolExecutor

2021-11-02 Thread Tangellapalli Sai Hanuma Rahul


New submission from Tangellapalli Sai Hanuma Rahul :

Feature Request:

Where we can use custom Names for separate threads submitted in 
ThreadPoolExecutor. 

It achieves by sending the name string to _work_queue of ThreadPoolExecutor and 
then in _worker function modifies the name of the current thread (through name 
property).

--
components: Library (Lib)
files: test.py
hgrepos: 409
messages: 405496
nosy: RahulARanger
priority: normal
severity: normal
status: open
title: Custom Name for ThreadPoolExecutor
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9
Added file: https://bugs.python.org/file50419/test.py

___
Python tracker 
<https://bugs.python.org/issue45689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread Rahul Lakshmanan


Rahul Lakshmanan  added the comment:

Thanks for the answer!

When I upgraded Python to 3.8.12, the issue went away.

Can be closed.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue45424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-10 Thread Rahul Lakshmanan


New submission from Rahul Lakshmanan :

I face this error when trying to use a package called streamlit.

Streamlit calls Tornado which calls SSL.

 File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 589, 
in create_default_context
context.load_default_certs(purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 490, 
in load_default_certs
self._load_windows_store_certs(storename, purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 482, 
in _load_windows_store_certs
self.load_verify_locations(cadata=certs)
ssl.SSLError: unknown error (_ssl.c:4034)

This is using Python 3.7.10 (Anaconda) on Windows 10.

Would be really grateful if you could help resolve this issue. 

Note: I am unable to find this specific issue anywhere on Python.org or on 
OpenSSL github issues page.

--
assignee: christian.heimes
components: SSL
messages: 403595
nosy: christian.heimes, rahullak, vstinner
priority: normal
severity: normal
status: open
title: ssl.SSLError: unknown error (_ssl.c:4034)
type: crash
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue45424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-05-04 Thread Rahul Kumaresan


Rahul Kumaresan  added the comment:

Hello Ken Jin, Thanks for this clarification!

--

___
Python tracker 
<https://bugs.python.org/issue43978>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24247] Docs: "unittest discover" modifies sys.path

2021-04-30 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue24247>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-04-29 Thread Rahul Kumaresan


Rahul Kumaresan  added the comment:

Although the documentation for 'typing.NoReturn' is made in: 
https://github.com/python/cpython/pull/7107/files

The actual inclusion of the 'typing.NoReturn' was made through the following 
this PR: https://github.com/python/typing/pull/397

Also the change is registered in the changelog under Python 3.6.2 rc1 release 
as:
'''
bpo-28556: Various updates to typing module: add typing.NoReturn type, use 
WrapperDescriptorType, minor bug-fixes. Original PRs by Jim Fasarakis-Hilliard 
and Ivan Levkivskyi.
'''

So shouldn't the correct version here should be 3.6.2?

--

___
Python tracker 
<https://bugs.python.org/issue43978>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-04-29 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue43978>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-01 Thread Rahul Jha


Change by Rahul Jha :


--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue30044>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-01-01 Thread Rahul Jha


Change by Rahul Jha :


--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue34451>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2020-12-31 Thread Rahul Jha


Change by Rahul Jha :


--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue12915>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35783] incorrect example of fetching messages in imaplib documentation

2020-12-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue35783>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29860] smtplib.py doesn't capitalize EHLO.

2020-12-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue29860>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27820] Possible bug in smtplib when initial_response_ok=False

2020-12-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue27820>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41822] Document the meaning of values for sys.float_info.rounds

2020-09-26 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue41822>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39326] Python-3.8.1 "test_importlib" failed

2020-09-26 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue39326>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19335] codeop misclassifies incomplete code with 'nonlocal'

2020-06-30 Thread Rahul Jha


Rahul Jha  added the comment:

>  Note that these are two solution that take very different approaches. What 
> Nick is suggesting with "checking for two or more hanging INDENTS" would 
> drastically change how codeop._maybe_compile does its thing, while his other 
> proposed solution, ""hardcoding a check for nonlocal SyntaxErrors in 
> codeop._maybe_compile", would just fix this issue.

Got it!

> If there's consensus around one proposed approach, you could certainly take 
> this up. I'd be glad to help out with workflow stuff or provide a first 
> review. Let me know if you've got more questions.

Thank you so much Lysandros!

--

___
Python tracker 
<https://bugs.python.org/issue19335>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19335] codeop misclassifies incomplete code with 'nonlocal'

2020-06-29 Thread Rahul Jha


Rahul Jha  added the comment:

> That may actually be another alternative: instead of doing the "try
> appending newlines and see if it works or generates different errors",
> we may be able to switch to the tokenizer if the initial compilation
> fails and check for hanging INDENT tokens (i.e. INDENTS without a
> corresponding DEDENT). That would get us much closer to what the real
> eval loop is doing.

>From what I understand, "checking for two or more hanging INDENTS" and, 
>"hardcoding a check for nonlocal SyntaxErrors in codeop._maybe_compile" are 
>two different solutions, right?  If yes, do we have an answer to which one of 
>them is more cleaner, and henceforth, the preferable solution?

I, personally, like the idea of checking INDENTS primarily because of it's 
reduced specificity, but I am in no position to comment on this (I already 
kinda did ':D), and you folks know better! For all we know, we should be 
optimizing for specificity.

Also, reading Nick's comments and the comc's code, gives me the feeling that a 
fix for this wouldn't require drastic changes.  I'm slowly starting my journey 
with CPython, and I'd like to contribute a patch if that is the case. Thanks!

--

___
Python tracker 
<https://bugs.python.org/issue19335>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34360] urllib.parse doesn't fully comply to RFC 3986

2020-06-29 Thread Rahul Jha


Change by Rahul Jha :


--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue34360>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41154] test_pkgutil:test_name_resolution fails on master

2020-06-29 Thread Rahul Jha

New submission from Rahul Jha :

After configuring and building using the command:

./configure --with-pydebug ** make -j

I ran the test suite (without changing anything) and saw that test_pkg has 
failed.  Here is the output of `./python.exe -m test -v test_pkgutil`:

== CPython 3.10.0a0 (heads/master:cd3c2bdd5d, Jun 28 2020, 13:29:09) [Clang 
9.0.0 (clang-900.0.39.2)]
== macOS-10.12.6-x86_64-i386-64bit little-endian
== cwd: /Users/rahuljha/Documents/cpython/build/test_python_10678æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.01 Run tests sequentially
0:00:00 load avg: 2.01 [1/1] test_pkgutil
test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok
test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok
test_name_resolution (test.test_pkgutil.PkgutilTests) ... ERROR
test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok
test_walk_packages_raises_on_string_or_bytes_input 
(test.test_pkgutil.PkgutilTests) ... ok
test_walkpackages_filesys (test.test_pkgutil.PkgutilTests) ... ok
test_walkpackages_zipfile (test.test_pkgutil.PkgutilTests)
Tests the same as test_walkpackages_filesys, only with a zip file. ... ok
test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ok
test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ok
test_iter_importers (test.test_pkgutil.ExtendPathTests) ... ok
test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ok
test_simple (test.test_pkgutil.ExtendPathTests) ... ok
test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok
test_find_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) 
... ok
test_find_loader_missing_module (test.test_pkgutil.ImportlibMigrationTests) ... 
ok
test_get_importer_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) 
... ok
test_get_loader_None_in_sys_modules (test.test_pkgutil.ImportlibMigrationTests) 
... ok
test_get_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) 
... ok
test_get_loader_handles_missing_loader_attribute 
(test.test_pkgutil.ImportlibMigrationTests) ... ok
test_get_loader_handles_missing_spec_attribute 
(test.test_pkgutil.ImportlibMigrationTests) ... ok
test_get_loader_handles_spec_attribute_none 
(test.test_pkgutil.ImportlibMigrationTests) ... ok
test_importer_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok
test_iter_importers_avoids_emulation 
(test.test_pkgutil.ImportlibMigrationTests) ... ok
test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok

==
ERROR: test_name_resolution (test.test_pkgutil.PkgutilTests)
--
Traceback (most recent call last):
  File "/Users/rahuljha/Documents/cpython/Lib/test/test_pkgutil.py", line 262, 
in test_name_resolution
mod = importlib.import_module(uw)
  File "/Users/rahuljha/Documents/cpython/Lib/importlib/__init__.py", line 126, 
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1030, in _gcd_import
  File "", line 1007, in _find_and_load
  File "", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'é'

--

Ran 24 tests in 0.186s

FAILED (errors=1)
test test_pkgutil failed
test_pkgutil failed

== Tests result: FAILURE ==

1 test failed:
test_pkgutil

Total duration: 482 ms
Tests result: FAILURE
Py vulture ~/Documents/cpython master !1 ?1 ❯ ./python.exe -m test -v 
test_pkgutil
== CPython 3.10.0a0 (heads/master:cd3c2bdd5d, Jun 28 2020, 13:29:09) [Clang 
9.0.0 (clang-900.0.39.2)]
== macOS-10.12.6-x86_64-i386-64bit little-endian
== cwd: /Users/rahuljha/Documents/cpython/build/test_python_21819æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.69 Run tests sequentially
0:00:00 load avg: 2.69 [1/1] test_pkgutil
test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok
test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok
test_name_resolution (test.test_pkgutil.PkgutilTests) ... ERROR
test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok
test_walk_packages_raises_on_string_or_bytes_input 
(test.test_pkgutil.PkgutilTests) ... ok
test_walkpackages_filesys (test.test_pkgutil.PkgutilTests) ... ok
test_walkpackages_zipfile (test.test_pkgutil.PkgutilTests)
Tests the same as test_walkpackages_filesys, only with a zip file. ... ok
test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ok
test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ok
test_iter_importers (test.test_pkgutil.ExtendPathTests) ... ok
test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ok
test_simple (test.test_pkgutil.ExtendPathTests) ... ok
test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok
test_find_loader_avoids_emulation (test.test_pkgutil.ImportlibMigra

[issue19335] codeop misclassifies incomplete code with 'nonlocal'

2020-06-28 Thread Rahul Jha


Change by Rahul Jha :


--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue19335>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Rahul Jha


Rahul Jha  added the comment:

Some of the test cases from Nick's patch are not passing on master:

ast.literal_eval('')  # raises SyntaxError; expected: ValueError
ast.literal_eval('6j--3')  # expected: 3+6j
ast.literal_eval('(2j+4j)+(1+2)')  # expected: 3+6j
ast.literal_eval('(2j+4j)-(1+2)')  # expected: -3+6j

I'm assuming that new changes in ast.py do not allow for these. Can anyone 
confirm that this is indeed the case, and not a bug with literal_eval?

--

___
Python tracker 
<https://bugs.python.org/issue17490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17490] Improve ast.literal_eval test suite coverage

2020-06-28 Thread Rahul Jha


Rahul Jha  added the comment:

Nick, hello! I'd like to take it onwards from here.

--
nosy: +RJ722

___
Python tracker 
<https://bugs.python.org/issue17490>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40579] Second argument to iterator.next not described

2020-05-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40579>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40725] Documentation: Benchmark table in "What's new in Python 3.9" has weird values

2020-05-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40725>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40640] Tutorial for Continue missing ... line

2020-05-22 Thread Rahul Kumaresan


Rahul Kumaresan  added the comment:

I think the ommission of secondary prompt(...) at the end of the loop in the 
code snippet doesn't affect what the example wanted to demonstrate. Even so, if 
this has to be fixed, this correction is to be done in versions 3.5 through 3.10

--
versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-22 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy:  -rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40670>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25872] multithreading traceback KeyError when modifying file

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue25872>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40620] Range tutorial shorthand could be made clearer

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40620>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40646] Builtins in doc show signature in documentation

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40646>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40646] Builtins in doc show signature in documentation

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy:  -rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40646>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40670] supplying an empty string to timeit causes an IndentationError

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40670>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40042] Enum Flag: psuedo-members have None for name attribute

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40042>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40666] TarFile.add does not support pathlib.Path as a value to first argument.

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40666>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40657] Resource leaks with threading.Thread

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40657>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40640] Tutorial for Continue missing ... line

2020-05-18 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue40640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40264] List item inside tuple seemingly allows for item assignment even after throwing error

2020-04-12 Thread Rahul B


New submission from Rahul B :

Even though item assignment throws error, the list inside tuple 'a' gets 
modified in place. Refer below, where the list value [8] gets added to the list 
value [5,6,7,7] at a[3]

>>> a
(2, 3, 4, [5, 6, 7, 7], 1)
>>> id(a[3])
140531212178376
>>> a[3]+=[8]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'tuple' object does not support item assignment
>>> a
(2, 3, 4, [5, 6, 7, 7, 8], 1)
>>> id(a[3])
140531212178376

--
messages: 366264
nosy: Rahul B
priority: normal
severity: normal
status: open
title: List item inside tuple seemingly allows for item assignment even after 
throwing error
type: behavior
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue40264>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39705] Tutorial, 5.6 Looping Techniques, sorted() example

2020-03-14 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
keywords: +patch
pull_requests: +18346
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18999

___
Python tracker 
<https://bugs.python.org/issue39705>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20039] Missing documentation for argparse.ArgumentTypeError

2020-03-11 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue20039>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39935] argparse: help parameter not documented in add_subparsers().add_parser

2020-03-11 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue39935>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39937] Suggest the usage of Element.iter() instead of iter() in whatsnew

2020-03-11 Thread Rahul Kumaresan


New submission from Rahul Kumaresan :

In the whatsnew section, under the point which mentions the deprecation of 
getchildren() and getiterator() through bpo-36543, it is suggested to use 
iter() instead.

Ideally there should be a suggestion to use Element.iter() instead.

--
assignee: docs@python
components: Documentation
messages: 363949
nosy: docs@python, rahul-kumi, xtreak
priority: normal
pull_requests: 18290
severity: normal
status: open
title: Suggest the usage of Element.iter() instead of iter() in whatsnew
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue39937>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-03-11 Thread Rahul Kumaresan


Change by Rahul Kumaresan :


--
nosy: +rahul-kumi
nosy_count: 3.0 -> 4.0
pull_requests: +18289
pull_request: https://github.com/python/cpython/pull/18937

___
Python tracker 
<https://bugs.python.org/issue36543>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39705] Tutorial, 5.6 Looping Techniques, sorted() example

2020-02-25 Thread Rahul Kumaresan


Rahul Kumaresan  added the comment:

I would like to work on this documentation improvement task.
Please help me understand if this is not being worked on already.

--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue39705>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39712] Doc for `-X dev` option should mention PYTHONDEVMODE

2020-02-23 Thread Rahul Kumaresan


Rahul Kumaresan  added the comment:

I would like to work on this issue.
Can you please suggest me specifics that I should be considering before I 
update the doc with the suggested inclusions.

--
nosy: +rahul-kumi

___
Python tracker 
<https://bugs.python.org/issue39712>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37274] Scripts folder is empty in python 3.7.3 for windows.

2019-06-14 Thread Rahul Virpara


Rahul Virpara  added the comment:

This happened to me when I used customized option and unticked "pip".

I assume you are not doing the same.

--
nosy: +Rahul Virpara

___
Python tracker 
<https://bugs.python.org/issue37274>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33467] Python 3.7: profile-opt build errors because a test seems to hang

2018-05-11 Thread Rahul Ravindran

New submission from Rahul Ravindran <rahu...@gmail.com>:

make run_profile_task

runs the tests and does not seem to have any mechanism to exclude tests that I 
could find based on looking at the Makefile.

Previously, on Python 3.6, this test test_poplib was 
failing(https://bugs.python.org/issue32753) and the profile_task would ignore 
failing tests. 

Now, with the Python 3.7 build, the test seems to hang and hence profile opt 
builds cannot be built.
Attached is the trace of the build based on Python-3.7.0b4

--
components: Build
files: stack_trace1.txt
messages: 316408
nosy: Rahul Ravindran
priority: normal
severity: normal
status: open
title: Python 3.7: profile-opt build errors because a test seems to hang
versions: Python 3.7
Added file: https://bugs.python.org/file47582/stack_trace1.txt

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33467>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33217] x in enum.Flag member is True when x is not a Flag

2018-04-30 Thread Rahul Jha

Change by Rahul Jha <rahul7...@gmail.com>:


--
pull_requests: +6347
stage: needs patch -> patch review

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33217>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33217] x in enum.Flag member is True when x is not a Flag

2018-04-28 Thread Rahul Jha

Rahul Jha <rahul7...@gmail.com> added the comment:

Hi Ethan,

The only thing which is left is to change the Deprecation Warning to raise a 
`TypeError` and alter the tests accordingly.

Seeing that most of the work for the issue has already been done, can I take it 
forward from here on wards, please?

--
nosy: +RJ722

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33217>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread Rahul

Rahul <rahulrajaram2...@gmail.com> added the comment:

Thanks for your response. I'll follow up with GCC.

On Nov 28, 2017 14:48, "STINNER Victor" <rep...@bugs.python.org> wrote:

>
> STINNER Victor <victor.stin...@gmail.com> added the comment:
>
> "internal compiler error" is a bug in GCC, not in Python. Please follow
> instructions in the error message:
>
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.
>
> See https://gcc.gnu.org/bugs/ and https://gcc.gnu.org/
>
> It would help if you can simplify the code to reproduce the bug without
> Python.
>
> I close the issue since it's a bug in GCC, not in Python.
>
> --
> nosy: +vstinner
> resolution:  -> third party
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker <rep...@bugs.python.org>
> <https://bugs.python.org/issue32161>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32161] Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal compiler error" in "PyFloat_GetMax" function

2017-11-28 Thread Rahul

New submission from Rahul <rahulrajaram2...@gmail.com>:

Attempt to `make` Python 2.7.14 on Ubuntu 16.04/GCC 5.4 throws the following 
error:


Objects/floatobject.c: In function ‘PyFloat_GetMax’:
Objects/floatobject.c:59:5: internal compiler error: Illegal instruction
 return DBL_MAX;
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Makefile:1359: recipe for target 'Objects/floatobject.o' failed
make: *** [Objects/floatobject.o] Error 1

--
components: Installation
files: python_2_7_14__configure_output
messages: 307176
nosy: rahulrajaram
priority: normal
severity: normal
status: open
title: Python 2.7.14 installation on Ubuntu 16.04/GCC 5.4 throws "internal 
compiler error" in "PyFloat_GetMax" function
versions: Python 2.7
Added file: https://bugs.python.org/file47301/python_2_7_14__configure_output

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27237] Kafka Python Consumer Messages gets truncated

2016-06-05 Thread Rahul

New submission from Rahul:

Snippet code is below:
from kafka import KafkaConsumer
from kafka.client import KafkaClient
from kafka.consumer import SimpleConsumer

consumer = KafkaConsumer('eventdetails_ingestion' , 
group_id='1',bootstrap_servers=‘:9092', max_partition_fetch_bytes=1055)
for msg in consumer:
try:
jValue = json.loads(str(msg.value))
   except ValueError:
fileErr.write(str(msg.value)+"\n")

Steps:
We send/produce large sets of messages to Kafka of around 20 to 30 KB size each 
messages in JSON format and producing around 200 messages / sec for 1 hour 
duration. We have 3 Kafka Brokers running and I am trying to consume the 
messages from these 3 Kafka Brokers from the same topic using the above code. 
The problem is that sometimes some of the messages gets truncated, I am not 
sure why it happen ?

--
components: Library (Lib)
messages: 267487
nosy: rgo...@threatmetrix.com
priority: normal
severity: normal
status: open
title: Kafka Python Consumer Messages gets truncated
type: performance
versions: Python 2.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27237>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23275] Can assign [] = (), but not () = []

2015-05-27 Thread Rahul Gupta

Rahul Gupta added the comment:

isn't it logical?

[] is a mutable data structure
while () is a immutable data structure

(b, a) = [1, 2] is fine because a and b are mutable

--
nosy: +Rahul Gupta

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23275
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6752] -1**2=-1

2009-08-21 Thread rahul

New submission from rahul rahulalone1...@gmail.com:

what is the reason for this 

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 91809
nosy: rahul1618
severity: normal
status: open
title: -1**2=-1
type: compile error
versions: Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6752
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6752] -1**2=-1

2009-08-21 Thread rahul

rahul rahulalone1...@gmail.com added the comment:

-1**2
-1 

???

what is reason for this

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6752
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3681] Cannot read saved csv file in a single run

2008-08-25 Thread Rahul Ghosh

New submission from Rahul Ghosh [EMAIL PROTECTED]:

I am trying to save a csv file from a scope and then open it to post 
process the data.
The file is getting created currectly, but when it tries to open the 
csv file it complains about file not found. I am trying to do this in 
a single run. If I rerun the code again, the file open function works 
correctly.

It cannot see the newly created csv file till the python code stops 
and I rerun it. How can I refresh the directory on the fly so that the 
newly saved file is seen right away. I am on windows xp machine.

Appreciate your help.

Thanks.

--
components: IDLE
messages: 71958
nosy: paul
severity: normal
status: open
title: Cannot read saved csv file in a single run
type: feature request
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3681
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3681] Cannot read saved csv file in a single run

2008-08-25 Thread Rahul Ghosh

Rahul Ghosh [EMAIL PROTECTED] added the comment:

I wrote a python GPIB command to the scope to export the waveform as a 
csv file. Then in another function I try to read this file that I just 
saved and it cannot find the file till I rerun.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3681
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com