[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
Roy Williams <rwilli...@lyft.com> added the comment: Ignore my comment re: pathlib, it looks like PathLike is defined in `os` and not `pathlib`. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
New submission from Roy Williams <rwilli...@lyft.com>: Repro: ```python from pathlib import Path import subprocess subprocess.run([Path('/bin/ls')]) # Works Fine subprocess.run(Path('/bin/ls')) # Fails ``` The problem seems to originate from here: https://github.com/python/cpytho

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- pull_requests: +2081 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30605> ___ _

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
Roy Williams added the comment: Repro: ``` import re re.compile(br'^(.*?)$(?m)') ``` Results in ``` Traceback (most recent call last): File "test_compile.py", line 2, in re.compile(br'^(.*?)$(?m)') File "/usr/lib/python3.6/re.py", line 233, in compile ret

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
New submission from Roy Williams: import re re.compile(br'^(.*?)$(?m)') -- components: Regular Expressions messages: 295473 nosy: Roy Williams, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.compile fails when compiling bytes under `-bb` mode versions

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
Roy Williams added the comment: @arp11 sorry for the too-minimal repro :D - the issue is with FileInput attempting to cast `files` to a tuple. Instead, if passed a PathLike object FileInput should set `files` to a tuple just as it does with a str

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- pull_requests: +1822 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30432> ___ _

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
New submission from Roy Williams: ``` from fileinput import FileInput from pathlib import Path p = Path('.') FileInput(p) ``` Results in: Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.

[issue22294] 2to3 consuming_calls: len, min, max, zip, map, reduce, filter, dict, xrange

2016-12-08 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- nosy: +Roy Williams ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22294> ___ _

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-11-28 Thread Roy Williams
Roy Williams added the comment: > What about PYTHON_OPT and allowing to pass any options via an environment > > > variable? There is a number of precedences (gzip, less, etc). > >export PYTHON_OPT="-t -b -3" I'd be open to this, but it seems like a much

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-10-04 Thread Roy Williams
Roy Williams added the comment: Thanks for the feedback Berker! This is my first CPython patch :D. Added in a note in pyporting. I actually did a much more detailed write up here https://gist.github.com/rowillia/c0feed97c1863b2d8e5a3ed73712df65, but it seems a bit verbose for this document

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-10-03 Thread Roy Williams
Roy Williams added the comment: Thanks for the feedback Berker. I addressed your feedback, but unfortunately I get a 500 from Rietveld when I try to attach a new patchset. I've uploaded the new patchset here. -- ___ Python tracker <

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-10-03 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: Added file: http://bugs.python.org/file44947/pythonenable3kwarningsflag.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-09-30 Thread Roy Williams
Roy Williams added the comment: Thanks for your support! Here's a patch to enable the `PYTHON3WARNINGS` environment variable. -- keywords: +patch Added file: http://bugs.python.org/file44894/pythonenable3kwarningsflag.patch ___ Python tracker <

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-09-27 Thread Roy Williams
Roy Williams added the comment: @Brett @Berker In a similar vein, it'd be great to expose the `-b` flag in Python 3 in a similar manner to test for invalid byte comparisons. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue28288] Expose environment variable for Py_Py3kWarningFlag

2016-09-27 Thread Roy Williams
New submission from Roy Williams: I'm finding the `-3` flag to be super useful, but it's quite a huge pain to thread it through all of the places that spawn python subprocesses, sometimes requiring forking of third party code. This would be much simpler if, like PYTHONWARNINGS

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28279> ___ __

[issue28279] setuptools failing to read from setup.cfg only in Python 3.6

2016-09-26 Thread Roy Williams
New submission from Roy Williams: Howdy, I'm attempting to make a change to the mock package in Python (related to http://bugs.python.org/issue28260), and it appears their CI is broken in Python 3.6 only. The problem appears to originate from setuptools, but this only fails in Python 3.6

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Roy Williams
Roy Williams added the comment: OK, let's close this issue and I'll ping the TIP thread/this issue again. On Sun, Sep 25, 2016, 11:16 AM Ned Batchelder <rep...@bugs.python.org> wrote: > > Ned Batchelder added the comment: > > Roy, the code on GitHub isn't a literal copy of

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Roy Williams
Roy Williams added the comment: Hey Antti My understanding is the version available on PyPi is now a strict backport of what's in Python 3, so they suggested filling the bug in bugs.python.org so it can be backported. http://lists.idyll.org/pipermail/testing-in-python/2016-September/006864

[issue28263] Python 2.7's `-3` flag warns about __eq__ being implemented without __hash__ even if __hash__ is never accessed.

2016-09-23 Thread Roy Williams
New submission from Roy Williams: I'm finding the -3 flag to be super useful at identifying problems with code when porting to Python 3. One of the most common failures, however, is "DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x". While implement

[issue26219] implement per-opcode cache in ceval

2016-09-23 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- nosy: +Roy Williams ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26219> ___ _

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-23 Thread Roy Williams
Changes by Roy Williams <rwilli...@lyft.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28260> ___ __

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-23 Thread Roy Williams
New submission from Roy Williams: I am investigating a migration to Python 3, and to facilitate this we are using the -3 flag as decribed here: https://docs.python.org/3/howto/pyporting.html#prevent-compatibility-regressions . When using this flag I encountered some issues inside of mock