[issue38302] __rpow__ not reached when __ipow__ returns NotImplemented

2019-09-28 Thread Alex Shkop
Change by Alex Shkop : -- keywords: +patch pull_requests: +16041 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16459 ___ Python tracker <https://bugs.python.org/issu

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-08-14 Thread Alex Shkop
Alex Shkop added the comment: This is updated patch that doesn't alter warn_explicit behavior. So the following: simplefilter(ignore) simplefilter(error, append=True) simplefilter(ignore, append=True) will ignore all warnings with this patch and no duplicates are inserted to warnings.filters

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-08-13 Thread Alex Shkop
Alex Shkop added the comment: @rbcollins that is exactly what was trying to say in previous comment. We can make a change to current patch that won't affect behavior. In old API in this sequence of filters last filter was never used: simplefilter(ignore) simplefilter(error, append=True

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-07-31 Thread Alex Shkop
Alex Shkop added the comment: Looking at this patch again, I'm wondering if it is correct to remove duplicate filter if append=True. Perhaps in this case it is more correct to leave the filter in place and do not append new one? -- ___ Python

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-05-12 Thread Alex Shkop
Alex Shkop added the comment: Please, review the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882 ___ ___ Python-bugs-list mailing

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-05-12 Thread Alex Shkop
Alex Shkop added the comment: Please, review the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18383 ___ ___ Python-bugs-list mailing

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-29 Thread Alex Shkop
Alex Shkop added the comment: Yes. That is how issue23882_find_all.patch works. I just removed hte condition if (not namespace and not os.path.isfile(os.path.join(full_path, '__init__.py'))): return None, False This makes namespace parameter redundant. Can I

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Alex Shkop
Changes by Alex Shkop a.v.sh...@gmail.com: Added file: http://bugs.python.org/file39223/issue23882_find_one_level.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23882

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-28 Thread Alex Shkop
Alex Shkop added the comment: I'm still not sure which solution is the best. So I attach two simple patches. First one enables full recursive scan of start_dir for namespace packages. Second one loads tests only from top level namespace packages. -- keywords: +patch Added file: http

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-28 Thread Alex Shkop
Alex Shkop added the comment: *ping* -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18383 ___ ___ Python-bugs-list mailing list Unsubscribe

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2015-04-20 Thread Alex Shkop
Alex Shkop added the comment: Thanks. I understand the code pretty well and I saw issue17457 that fixes discovery for explicitly specified namespace package. What I need is to know how discovery has to work. Do we need to discover namespace packages inside discovery path? And should we do

[issue23882] unittest discovery and namespaced packages

2015-04-20 Thread Alex Shkop
Alex Shkop added the comment: This script creates following directory structure issue_23882\ tests\ test_fail.py If you run from issue_23882 directory python -m unittest it doesn't find any tests. If there is __init__.py inside tests folder, same command finds test_fail.py and runs

[issue23882] unittest discovery and namespaced packages

2015-04-17 Thread Alex Shkop
Alex Shkop added the comment: Not fully. Patch for issue17457 fixed discovery when you explicitly specified namespace package as a target for discovery. I.e. when you run python -m unittest namespace_pkg But it didn't recurse into any namespace packages inside namespace_pkg. So when you run

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-14 Thread Alex Shkop
Alex Shkop added the comment: Removed unnecessary assertWarns() contexts and fixed spelling errors. -- Added file: http://bugs.python.org/file38982/issue18383_assert_warns_and_dups_v2.patch ___ Python tracker rep...@bugs.python.org http

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-09 Thread Alex Shkop
Alex Shkop added the comment: So, there are actually two issues, both of them causing the original warning. First issue was pointed out by Florent Xicluna. warnings.filterwarnings() method can create duplicates in warnings.filters. Second issue is that assertWarns() works incorrectly

[issue23882] unittest discovery and namespaced packages

2015-04-08 Thread Alex Shkop
Alex Shkop added the comment: Spent some time looking into this one. Looks like the problem is in TestLoader.discover() method. There are couple of issues I found in it, all caused by same assumption. Documentation [1] states that all test modules found by discover() method should

[issue23577] Add tests for wsgiref.validate

2015-04-08 Thread Alex Shkop
Alex Shkop added the comment: *ping* -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23577 ___ ___ Python-bugs-list mailing list Unsubscribe

[issue23811] Python py_compile error message inconsistent and missing newline

2015-04-07 Thread Alex Shkop
Alex Shkop added the comment: This patch adds new line symbol. For some reason py_compile module prints only SyntaxErrors with traceback. All other exceptions are printed with Sorry: and in one line. -- keywords: +patch nosy: +ashkop Added file: http://bugs.python.org/file38858

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-04-06 Thread Alex Shkop
Alex Shkop added the comment: When caller adds duplicate filter maybe we should promote his filter to the beginning of filters list? This feels more correct to me. So if user adds duplicate filter everything will work as if we added it. -- Added file: http://bugs.python.org/file38841

[issue22832] Tweak parameter names for fcntl module

2015-03-20 Thread Alex Shkop
Alex Shkop added the comment: Fixed default values for fcntl(), ioctl() and lockf() -- Added file: http://bugs.python.org/file38598/issue22832_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22832

[issue23645] Incorrect doc for __getslice__

2015-03-13 Thread Alex Shkop
Alex Shkop added the comment: This is true. In ceval.c default value for end index is PY_SSIZE_T_MAX. Whereas in sysmodule.c defined: SET_SYS_FROM_STRING(maxsize, PyInt_FromSsize_t(PY_SSIZE_T_MAX)); SET_SYS_FROM_STRING(maxint, PyInt_FromLong(PyInt_GetMax

[issue23577] Add tests for wsgiref.validate

2015-03-03 Thread Alex Shkop
New submission from Alex Shkop: These tests increase coverage of wsgiref.validate module. They test InputWrapper and ErrorWrapper used to validate env['wsgi.input'] and env['wsgi.errors']. -- components: Tests files: wsgiref_test_wrappers.patch keywords: patch messages: 237152 nosy

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-03-02 Thread Alex Shkop
Alex Shkop added the comment: The issue occurs only if C implementation of _warnings is available. It is caused by re-use of global filters variable from _warnings when warnings is being re-imported. So warnings modifies _warnings.filters on first import. Then, when you import warnings again

[issue22832] Tweak parameter names for fcntl module

2015-03-01 Thread Alex Shkop
Alex Shkop added the comment: This patch fixes pointed out bugs in documentation and docstring for ioctl() function. -- Added file: http://bugs.python.org/file38295/issue22832_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue23526] Silence resource warnings in test_httplib

2015-02-27 Thread Alex Shkop
Alex Shkop added the comment: Thanks, great to hear. I'm glad to help) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23526 ___ ___ Python-bugs

[issue22832] Tweak parameter names for fcntl module

2015-02-27 Thread Alex Shkop
Alex Shkop added the comment: Looks like default value for mutate_flag in ioctl() should be False. Docstring says: If the argument is a mutable buffer and the mutable_flag argument is not passed or is false, the behavior is as if a string had been passed. Should I change the default value

[issue22832] Tweak parameter names for fcntl module

2015-02-27 Thread Alex Shkop
Alex Shkop added the comment: Docs say that mutate_flag is true by default since Python 2.5. Looks like I should fix the docstring. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22832

[issue22832] Tweak parameter names for fcntl module

2015-02-27 Thread Alex Shkop
Alex Shkop added the comment: Created a patch. It renames arguments in clinic declarations and in documents. For lockf I've chosen Linux naming, because it really calls fcntl which has an argument called cmd, not function. -- keywords: +patch nosy: +ashkop Added file: http

[issue23527] test_smtpnet uses incorrect port for STARTTLS

2015-02-26 Thread Alex Shkop
New submission from Alex Shkop: test_smtpnet uses port 25 for STARTTLS, whereas gmail exposes STARTTLS SMTP over port 587. -- components: Tests files: test_smtpnet_starttls_port.patch keywords: patch messages: 236658 nosy: ashkop priority: normal severity: normal status: open title

[issue22094] oss_audio_device.write(data) produces short writes

2015-02-25 Thread Alex Shkop
Alex Shkop added the comment: It seems to me that OSS device doesn't accept more than SNDCTL_DSP_GETOSPACE. Looks like this depends on OSS version because OSS docs state that since 4.x one shouldn't use SNDCTL_DSP_GETOSPACE at all [http://manuals.opensound.com/developer

[issue23526] Silence resource warnings in test_httplib

2015-02-25 Thread Alex Shkop
New submission from Alex Shkop: Three resource warnings are present in test_httplib. Patch closes HTTPSConnection in test_networked_noverification, test_networked_trusted_by_default_cert, test_networked_good_cert. -- components: Tests files: test_httplib_warnings.patch keywords: patch

[issue23477] Increase coverage for wsgiref module

2015-02-20 Thread Alex Shkop
Alex Shkop added the comment: Replaced %s;%s;%s with ';'.join() call. -- Added file: http://bugs.python.org/file38184/wsgiref_test_environ_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23477

[issue23477] Increase coverage for wsgiref module

2015-02-18 Thread Alex Shkop
New submission from Alex Shkop: Added test for wssgiref.simple_server to check that environ argument contains correct headers, query string and path. This code wasn't covered in tests previously. -- components: Tests files: wsgiref_test_environ.patch keywords: patch messages: 236176