[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2015-02-05 Thread Anthony Sottile
Anthony Sottile added the comment: Any updates on this? I'm running into this as well (still a problem in 3.4) ```$ python3.4 Python 3.4.2 (default, Oct 11 2014, 17:59:27) [GCC 4.4.3] on linux Type "help", "copyright", "credits" or "license" for m

[issue25552] python turtle page does not run

2015-11-04 Thread Anthony C
New submission from Anthony C: Making this simple code to mess with turtle well it seems like after awhile I have encountered the window = turtle.Screen() doesnt seem to even open it up only the shell window and does nothing afterwards. Its quite annoying especially trying to practice with it

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
New submission from Anthony Sottile: First some expected output: ``` # from cmd.exe C:\Users\Anthony>echo hi{1} hi{1} # from MINGW $ echo hi{1} hi{1} ``` ``` # On ubuntu $ echo 'hi{1}' hi{1} $ python3.5 -c "import subprocess; print(subprocess.check_output(('echo&#

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: It *is* in my path (otherwise it wouldn't produce any output at all). I'm not trying to use the shell builtin, I'm trying to use the executable. -- resolution: not a bug -> status: closed -> open _

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: To clarify further, the echo.exe on my path reacts correctly: ``` Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit (allow_curly_braces_in_args) $ /usr/bin/echo hi{1} hi{1} Anthony@AnthonysDesktop MINGW64 ~/Desktop/git/pre-commit

[issue25815] Improper subprocess output of arguments with braces in them on windows

2015-12-06 Thread Anthony Sottile
Anthony Sottile added the comment: ``` C:\Users\Anthony> C:\Users\Anthony\AppData\Local\Programs\Git\usr\bin\echo.exe hi{1} hi1 ``` Must be the provider of echo.exe. I'll take it up with them Sorry for the trouble! -- resolution: -> not a bug status: ope

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
Changes by Anthony Green : -- assignee: docs@python components: Documentation nosy: anthonygreen, docs@python, pitrou priority: normal severity: normal status: open title: Documentation for threading.enumerate / threading.Thread.is_alive is contradictory. versions: Python 2.7, Python

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
New submission from Anthony Green: The documentation at https://docs.python.org/3/library/threading.html#threading.Thread.is_alive relates: > The module function enumerate() returns a list of all alive threads. The documentation at https://docs.python.org/3/library/threading.h

[issue25821] Documentation for threading.enumerate / threading.Thread.is_alive is contradictory.

2015-12-07 Thread Anthony Green
Anthony Green added the comment: The following example comes from IRC user ztane: > import threading, time > > main_thread = threading.current_thread() > > def foo(): > time.sleep(10) > print(main_thread.is_alive()) > print(list(threading.enumerate())) &

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
New submission from Anthony Sottile: I've confirmed this bug is present on both windows and linux, the outputs below are from linux however. Compare: ``` $ python3.4 --version Python 3.4.3 $ python3.4 -c 'import os; print(os.unlink == os.remove)' True ``` ``` $ python3.5 -

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
Anthony Sottile added the comment: Breaks this function: ``` def rmtree(path): """On windows, rmtree fails for readonly dirs.""" def handle_remove_readonly(func, path, exc): # pragma: no cover (windows) excvalue = exc[1] if fun

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
Anthony Sottile added the comment: When calling shutil.rmtree on windows on a readonly directory, the error handler is called with os.unlink as the first argument `func` which fails the check `func in (os.rmdir, os.remove)` which succeeded on previous python versions

[issue26346] PySequenceMethods documentation missing sq_slice and sq_ass_slice

2016-02-11 Thread Anthony Tuininga
New submission from Anthony Tuininga: These methods are completely missing from the documentation found here: https://docs.python.org/3/c-api/typeobj.html -- assignee: docs@python components: Documentation messages: 260154 nosy: atuining, docs@python priority: normal severity: normal

[issue26346] PySequenceMethods documentation missing sq_slice and sq_ass_slice

2016-02-11 Thread Anthony Tuininga
Anthony Tuininga added the comment: Ah yes. The fields are still there, though, just marked as not used. Interestingly enough they aren't documented in the Python 2 documentation eitherand they are in the Python 2.7 headers I have (not marked as unused either). Your suggestion

[issue25136] Python doesn't find Xcode 7 stub libraries

2016-02-23 Thread Anthony Foglia
Changes by Anthony Foglia : -- nosy: +afoglia ___ Python tracker <http://bugs.python.org/issue25136> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8557] subprocess PATH semantics and portability

2016-03-24 Thread Anthony Sottile
Anthony Sottile added the comment: Here's the workaround I'm opting for: if sys.platform =='win32': distutils.spawn.find_executable(cmd[0]) + cmd[1:] -- nosy: +Anthony Sottile ___ Python tracker <http://bu

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-04-06 Thread Anthony Sottile
New submission from Anthony Sottile: Originally from https://github.com/testing-cabal/mock/issues/350 ## Example ```python from unittest import mock class C(object): def f(self): pass c = C() with mock.patch.object(c, 'f', autospec=True): with mock.patch.ob

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-04-06 Thread Anthony Sottile
Anthony Sottile added the comment: The root cause seems to be that autospecced functions return a function object (not a Mock instance) which a '.mock' attribute which is a MagicMock ( assigned here: https://github.com/python/cpython/blob/ae775ab1eb72f42de2d070158bade4bf261ac04f/Li

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-04-06 Thread Anthony Sottile
Anthony Sottile added the comment: Here's an improved patch which: - passes the tests - puts the test in the correct place I'm not entirely happy with the approach -- open to suggestions :) -- Added file: http://bugs.python.org/file42

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
New submission from Anthony Sottile: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as UTF-8 and then decoded as latin1 (on the wi

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: A few typos in my previous comment, pressed enter too quickly, here's an updated comment: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'/\xc2\x80' -- The issue

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Oops, broke b'/%80'. Here's a better fix that now takes: (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)-> b'\xc2\x80' -(decode latin1)-> u'\xc2\x80' to: (on the wire

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Updates after review. -- Added file: http://bugs.python.org/file42404/patch ___ Python tracker <http://bugs.python.org/issue26

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Forgot to remove the pyver code (leaning a bit too much on pre-commit) -- Added file: http://bugs.python.org/file42405/patch ___ Python tracker <http://bugs.python.org/issue26

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-20 Thread Anthony Sottile
Anthony Sottile added the comment: PEP states that environ variables are str variables decoded using latin1: https://www.python.org/dev/peps/pep-/#id19 Therefore, to get the original bytes, one must encode using latin1 On Apr 20, 2016 3:46 AM, "Александр Эри" wrote: > &g

[issue16662] load_tests not invoked in package/__init__.py

2016-04-25 Thread Anthony Sottile
Anthony Sottile added the comment: I have a hunch that this fix here may be causing this: https://github.com/spotify/dh-virtualenv/issues/148 Minimally: echo 'from setuptools import setup; setup(name="demo")' > setup.py echo 'import pytest' > tests/__init_

[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2016-05-01 Thread Anthony Sottile
Anthony Sottile added the comment: Seems I've named the patchfile incorrectly -- Hopefully this is correct this time? -- keywords: +patch nosy: +Anthony Sottile Added file: http://bugs.python.org/file42675/2.patch ___ Python tracker

[issue23636] Add scgi to urllib.parse.uses_netloc

2015-03-10 Thread Anthony Ryan
New submission from Anthony Ryan: The scgi protocol is not included in urllib.parse.uses_netloc list, while other less common protocols are (such as gopher). I would like to see scgi get added to this list. -- components: Library (Lib) files: py3bug messages: 237831 nosy: Anthony Ryan

[issue23636] Add scgi to urllib.parse.uses_netloc

2015-03-10 Thread Anthony Ryan
Changes by Anthony Ryan : Added file: http://bugs.python.org/file38435/py2bug ___ Python tracker <http://bugs.python.org/issue23636> ___ ___ Python-bugs-list mailin

[issue24085] large memory overhead when pyc is recompiled

2015-04-30 Thread Anthony Sottile
Anthony Sottile added the comment: Adding `import gc; gc.collect()` doesn't change the outcome afaict -- nosy: +asottile ___ Python tracker <http://bugs.python.org/is

[issue24085] large memory overhead when pyc is recompiled

2015-05-01 Thread Anthony Sottile
Anthony Sottile added the comment: I'm still seeing a very large difference: asottile@work:/tmp$ python repro.py ready 72604 VmHWM: 72604 kB VmRSS: 60900 kB asottile@work:/tmp$ rm *.pyc; python repro.py ready 1077232 VmHWM: 1077232 kB VmRSS:218040 kB This fi

[issue24085] large memory overhead when pyc is recompiled

2015-05-01 Thread Anthony Sottile
Anthony Sottile added the comment: 3.4 seems happier: asottile@work:/tmp$ rm *.pyc; python3.4 repro.py ready 77472 VmHWM: 77472 kB VmRSS: 65228 kB asottile@work:/tmp$ python3.4 repro.py ready 77472 VmHWM: 77472 kB VmRSS: 65232 kB The nasty result above is from 2.7: $ python

[issue24085] large memory overhead when pyc is recompiled

2015-05-01 Thread Anthony Sottile
Anthony Sottile added the comment: Ah, then 3.4 still has the problem: $ rm -rf __pycache__/ *.pyc; python3.4 repro.py ready 1112892 VmHWM: 1112892 kB VmRSS:127196 kB asottile@work:/tmp$ python3.4 repro.py ready 77468 VmHWM: 77468 kB VmRSS: 65228 kB

[issue24085] large memory overhead when pyc is recompiled

2015-05-01 Thread Anthony Sottile
Anthony Sottile added the comment: Attached is repro2.py (slightly different so my editor doesn't hate itself when editing the file) I'll attach the other file in another comment since it seems I can only do one at a time -- Added file: http://bugs.python.org/file39257

[issue24085] large memory overhead when pyc is recompiled

2015-05-01 Thread Anthony Sottile
Changes by Anthony Sottile : Added file: http://bugs.python.org/file39259/anon_city_hoods.tar.gz ___ Python tracker <http://bugs.python.org/issue24085> ___ ___ Python-bug

[issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3`

2013-04-20 Thread C Anthony Risinger
New submission from C Anthony Risinger: http://hg.python.org/cpython/file/d499189e7758/Tools/scripts/gprof2html.py#l1 ...should be self explanatory. i didn't run into this myself, but i saw that the Archlinux package was fixing it via `sed`, without the customary link to upstream... so

[issue25931] os.fork() command distributed in windows Python27 (in SocketServer module)

2016-04-12 Thread Anthony S Valencia
Changes by Anthony S Valencia : -- nosy: +antvalencia ___ Python tracker <http://bugs.python.org/issue25931> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12485] textwrap.wrap: new argument for more pleasing output

2015-04-13 Thread Gijsbert Anthony van der Linden
Gijsbert Anthony van der Linden added the comment: Updated the patch and added tests. Fixed a problem with the previous patch: result of map function was assumed to be list, however map in Python3 returns an interator. So I replaced it with a list comprehension. -- nosy

<    3   4   5   6   7   8