[issue15373] copy.copy() does not properly copy os.environment
Change by Anton Barkovsky : -- nosy: -anton.barkovsky ___ Python tracker <https://bugs.python.org/issue15373> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27261] io.BytesIO.truncate does not work as advertised
Change by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <https://bugs.python.org/issue27261> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27261] io.BytesIO.truncate does not work as advertised
Anton Barkovsky added the comment: I'm willing to try to fix this behavior. I just want to check that this would not be considered breaking backwards compatibility. I can imagine in theory some code relying on it, but I would say that it would be relying on a bug. If some code is passed BytesIO in place of a file, then the current behavior is clearly undesirable. If some code specifically uses BytesIO and relies on this... I guess this can happen, but should be very rare and contrary to widely documented behavior. So it seems ok to just fix this, but I'm not very familiar with how such changes are usually handled in cPython, so I'd like to get approval from someone experienced. -- ___ Python tracker <https://bugs.python.org/issue27261> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23794] http package should support HTTP/2
Change by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <https://bugs.python.org/issue23794> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34961] Global scoping when shadowing local names in class definitions
Change by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <https://bugs.python.org/issue34961> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34965] Python on Docker container using flask is going down after sometime
Anton Barkovsky added the comment: Do you have any evidence to believe that this is caused by a bug in CPython itself or its stdlib? If not, it's probably an issue with your code, libraries, or environment, and so out of scope in this tracker. -- nosy: +anton.barkovsky ___ Python tracker <https://bugs.python.org/issue34965> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15373] copy.copy() does not properly copy os.environment
Anton Barkovsky added the comment: Here's a patch. -- keywords: +patch nosy: +anton.barkovsky Added file: http://bugs.python.org/file26403/environcopy.patch ___ Python tracker <http://bugs.python.org/issue15373> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15373] copy.copy() does not properly copy os.environment
Anton Barkovsky added the comment: A new patch with tests. -- Added file: http://bugs.python.org/file26404/environcopy_v2.patch ___ Python tracker <http://bugs.python.org/issue15373> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys
Changes by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue10017> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys
Anton Barkovsky added the comment: Here's a patch with fix and tests. Note that class objects are not comparable and have the same type so they fall back on sorting by id. Should we sort them by name as a special case instead? -- keywords: +patch Added file: http://bugs.python.org/file26433/pprint_fix.patch ___ Python tracker <http://bugs.python.org/issue10017> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13907] test_pprint relies on set/dictionary repr() ordering
Anton Barkovsky added the comment: This test breaks now even in CPython. Remove it and be done with it? -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue13907> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15433] argparse usage line is wrong
Changes by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue15433> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11466] getpass.getpass doesn't close tty file
Anton Barkovsky added the comment: The issue is still there. I hope someone fixes it before the release. -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue11466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11466] getpass.getpass doesn't close tty file
Anton Barkovsky added the comment: I think I've found the root cause. On my system (also tested in 3.2) /dev/tty is opened successfully, but wrapping it in io.BufferedRandom fails. By the time the exception is raised, FileIO object is already created, and then it immediately gets deleted. I'm attaching a patch that closes the file explicitly in this case. Be extra careful when reviewing though - this is the first time I'm touching Python's C code. -- Added file: http://bugs.python.org/file26498/closewarning.patch ___ Python tracker <http://bugs.python.org/issue11466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11466] getpass.getpass doesn't close tty file
Changes by Anton Barkovsky : Removed file: http://bugs.python.org/file26498/closewarning.patch ___ Python tracker <http://bugs.python.org/issue11466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11466] getpass.getpass doesn't close tty file
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26499/closewarning.patch ___ Python tracker <http://bugs.python.org/issue11466> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
New submission from Anton Barkovsky : webbrowser._invoke opens /dev/null, never closes it and a warning is printed. I'm attaching a patch. The diff looks messy, but I'm just wrapping the code in a try-finally block, the rest is just indented. -- components: Library (Lib) files: fileclose.patch keywords: patch messages: 166392 nosy: anton.barkovsky priority: normal severity: normal status: open title: A file is not properly closed by webbrowser._invoke type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file26511/fileclose.patch ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
Anton Barkovsky added the comment: The warning is printed by the file object when it closes itself in __del__: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r+' encoding='UTF-8'> There isn't much to test, or is there? -- ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
Anton Barkovsky added the comment: To clarify, I discovered this when I was simply running webbrowser.open in REPL. -- ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
Anton Barkovsky added the comment: Adding a patch that uses subprocess.DEVNULL instead. Writing tests for webbrowser should be a separate issue, right? -- Added file: http://bugs.python.org/file26513/fileclose_devnull.patch ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14966] Fully document subprocess.CalledProcessError
Changes by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue14966> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15499] Sleep is hardcoded in webbrowser.UnixBrowser
New submission from Anton Barkovsky: webbrowser.UnixBrowser._invoke will sleep for at least 1 second after launching browser process and then probably 4 more seconds. These numbers are hardcoded and can't be modified which is especially problematic for testing. I think this code should be replaced with Popen.wait with timeout. A patch is attached. -- components: Library (Lib) files: webbrowser_sleep.patch keywords: patch messages: 166877 nosy: anton.barkovsky priority: normal severity: normal status: open title: Sleep is hardcoded in webbrowser.UnixBrowser type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file26596/webbrowser_sleep.patch ___ Python tracker <http://bugs.python.org/issue15499> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
New submission from Anton Barkovsky: Exception classes from subprocess module are mentioned in the doc but do not have their own entries. I'm attaching patches for 3.3, 3.2 and 2.7 This issue supersedes #14966. -- assignee: docs@python components: Documentation files: subprocess_doc_3.3.patch keywords: patch messages: 166895 nosy: anton.barkovsky, docs@python priority: normal severity: normal status: open title: Document exception classes in subprocess module type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file26598/subprocess_doc_3.3.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26599/subprocess_doc_3.2.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26600/subprocess_doc_2.7.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
Anton Barkovsky added the comment: An updated patch with the same issue fixed in Konqueror class. -- Added file: http://bugs.python.org/file26602/fileclose_devnull_v2.patch ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.
New submission from Anton Barkovsky: Because of the way webbrowser.UnixBrowser.open generates command-line arguments the resulting list sometimes looks like this: ['chromium', '', 'http://www.example.org/'] This seems to work fine with chromium for me but as you can see: >>> subprocess.call(['ls', '', '-l']) ls: cannot access : No such file or directory 2 It's not a good idea to rely on that. I'm attaching a patch that filters out those empty arguments. -- components: Library (Lib) files: webbrowser_args.patch keywords: patch messages: 166930 nosy: anton.barkovsky priority: normal severity: normal status: open title: webbrowser.open sometimes passes zero-length argument to the browser. type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file26607/webbrowser_args.patch ___ Python tracker <http://bugs.python.org/issue15509> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.
Changes by Anton Barkovsky : Removed file: http://bugs.python.org/file26607/webbrowser_args.patch ___ Python tracker <http://bugs.python.org/issue15509> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26608/webbrowser_args.patch ___ Python tracker <http://bugs.python.org/issue15509> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15557] Tests for webbrowser module
New submission from Anton Barkovsky: Attaching a patch with some tests for webbrowser module. The tests fail unless #15509 is fixed. They also print lots of warnings unless #15447 is fixed. -- components: Tests files: test_webbrowser.patch keywords: patch messages: 167423 nosy: anton.barkovsky, r.david.murray priority: normal severity: normal status: open title: Tests for webbrowser module versions: Python 3.3 Added file: http://bugs.python.org/file26688/test_webbrowser.patch ___ Python tracker <http://bugs.python.org/issue15557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15447] A file is not properly closed by webbrowser._invoke
Anton Barkovsky added the comment: Added tests in #15557. -- ___ Python tracker <http://bugs.python.org/issue15447> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15509] webbrowser.open sometimes passes zero-length argument to the browser.
Anton Barkovsky added the comment: Added tests in #15557. -- ___ Python tracker <http://bugs.python.org/issue15509> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26738/subprocess_doc_2.7_v2.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26739/subprocess_doc_3.2_v2.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26740/subprocess_doc_3.3_v2.patch ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15501] Document exception classes in subprocess module
Anton Barkovsky added the comment: Updated. -- ___ Python tracker <http://bugs.python.org/issue15501> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15619] set.pop() documentation is confusing
New submission from Anton Barkovsky: I've seen people being confused by the documentation for set.pop() method. It makes it look like the element is selected randomly while it's just unspecified. I'm attaching a patch that clarifies the doc, tested on 3.3, 3.2 and 2.7 -- assignee: docs@python components: Documentation files: set_pop_doc.patch keywords: patch messages: 167895 nosy: anton.barkovsky, docs@python priority: normal severity: normal status: open title: set.pop() documentation is confusing versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file26759/set_pop_doc.patch ___ Python tracker <http://bugs.python.org/issue15619> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15557] Tests for webbrowser module
Anton Barkovsky added the comment: Thanks for the review, I've updated the patch. -- Added file: http://bugs.python.org/file26774/test_webbrowser_v2.patch ___ Python tracker <http://bugs.python.org/issue15557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15557] Tests for webbrowser module
Anton Barkovsky added the comment: Updated, added separate helper methods and 'test' and 'http://www.example.com/' are no longer hardcoded. > The helper methods could default to the most common string arguments so that > you will only need to define and pass the string arguments when the browser > uses strings that are different from the defaults. I don't see a good reason to provide defaults. If some browsers have same arguments it's just a coincidence, the arguments are not likely to ever change, and I don't like when a test case is scattered all over the module in the form of defaults. -- Added file: http://bugs.python.org/file26776/test_webbrowser_v3.patch ___ Python tracker <http://bugs.python.org/issue15557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15557] Tests for webbrowser module
Anton Barkovsky added the comment: I think you forgot to write `test_open_with_autoraise_false` for Chrome tests. -- ___ Python tracker <http://bugs.python.org/issue15557> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21966] InteractiveConsole does not support -q option
Anton Barkovsky added the comment: Here's a patch. -- keywords: +patch nosy: +anton.barkovsky Added file: http://bugs.python.org/file35932/code.patch ___ Python tracker <http://bugs.python.org/issue21966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21966] InteractiveConsole does not support -q option
Anton Barkovsky added the comment: > 1. How should python3 -q -mcode behave? I've only now found out about sys.flags. I think we should check for -q both before -m and after, because why not? > 2. If we add this patch, should we also attempt to emulate other command line > options (-V, -h, etc.)? As I see it, the module is only concerned with REPL functionality, making these options a bit out of scope. -- ___ Python tracker <http://bugs.python.org/issue21966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21966] InteractiveConsole does not support -q option
Anton Barkovsky added the comment: Here's a patch that checks both sys.flags and sys.argv and uses argparse. -- Added file: http://bugs.python.org/file35933/code_flags_argparse.patch ___ Python tracker <http://bugs.python.org/issue21966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21966] InteractiveConsole does not support -q option
Anton Barkovsky added the comment: That's not a very likely scenario and I think the distinction between arguments that are passed to the script and interpreter flags is fairly obvious. -- ___ Python tracker <http://bugs.python.org/issue21966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21966] InteractiveConsole does not support -q option
Anton Barkovsky added the comment: Yeah, my love for keyword arguments is a bit too big sometimes. -- Added file: http://bugs.python.org/file35934/code_flags_argparse_v2.patch ___ Python tracker <http://bugs.python.org/issue21966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22452] addTypeEqualityFunc is not used in assertListEqual
Changes by Anton Barkovsky : -- nosy: +anton.barkovsky ___ Python tracker <http://bugs.python.org/issue22452> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com