[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I should acknowledge that I'm using pytest here also... and pytest may be the engine that's performing the reporting of the failed assertion. In fact, switching to simple assertions, I see the same behavior, so I now suspect the issue may lie with pytest

[issue35955] unittest assertEqual reports incorrect location of mismatch

2019-02-10 Thread Jason R. Coombs
New submission from Jason R. Coombs : In [this job](https://travis-ci.org/jaraco/cmdix/jobs/491246158), a project is using assertEqual to compare two directory listings that don't match in the group. But the hint markers pointing to the mismatch are pointing at positions that match: E

[issue17561] Add socket.create_server_sock() convenience function

2019-02-07 Thread Jason R. Coombs
Jason R. Coombs added the comment: In issue24209, I ended up settling on this implementation (https://github.com/python/cpython/blob/f289084c83190cc72db4a70c58f007ec62e75247/Lib/http/server.py#L1227-L1234), which seems to work well. -- ___ Python

[issue24209] Allow IPv6 bind in http.server

2019-02-07 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue24209] Allow IPv6 bind in http.server

2019-02-07 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset f289084c83190cc72db4a70c58f007ec62e75247 by Jason R. Coombs in branch 'master': bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. (#11767) https://github.com/python/cpython/commit

[issue35905] macOS build docs need refresh (2019)

2019-02-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: I also have a script that does something very similar (https://github.com/jaraco/jaraco.develop/blob/master/jaraco/develop/macos-build-python.py), invoked with `python -m jaraco.develop.macos-build-python` (or `pip-run -m jaraco.develop -- -m

[issue24209] Allow IPv6 bind in http.server

2019-02-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +11726, 11727, 11728 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue24209] Allow IPv6 bind in http.server

2019-02-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +11726 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue24209> ___ ___ Python-

[issue24209] Allow IPv6 bind in http.server

2019-02-05 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +11726, 11727 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue24209> ___ ___ Py

[issue24209] Allow IPv6 bind in http.server

2019-02-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't believe the current patch as accepted has the right behaviors. First off, the default behavior, which indicates "all interfaces" only binds to IPv4 interfaces. Additionally, "-b localhost" only binds to IPv4 localhost. Idea

[issue35905] macOS build docs need refresh (2019)

2019-02-05 Thread Jason R. Coombs
New submission from Jason R. Coombs : In https://github.com/python/devguide/issues/453#issuecomment-460848565, I understand that Ned wishes to update the macOS build docs prior to linking to them from the dev guide. -- assignee: docs@python components: Documentation messages: 334895

[issue27485] urllib.splitport -- is it official or not?

2019-02-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Please refer to issue35891 for a description of an important use-case broken by the planned removal of splituser. -- nosy: +jason.coombs ___ Python tracker <https://bugs.python.org/issue27

[issue35891] urllib.parse.splituser has no suitable replacement

2019-02-03 Thread Jason R. Coombs
New submission from Jason R. Coombs : The removal of splituser (issue27485) has the undesirable effect of leaving the programmer without a suitable alternative. The deprecation warning states to use `urlparse` instead, but `urlparse` doesn't provide the access to the `credential` or `address

[issue35891] urllib.parse.splituser has no suitable replacement

2019-02-03 Thread Jason R. Coombs
Change by Jason R. Coombs : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue35891> ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Python Packages Survey

2019-01-19 Thread Jason Friedman
On Fri, Jan 18, 2019 at 5:22 PM Cameron Davidson-Pilon < cam.davidson.pi...@gmail.com> wrote: > Hello! I invite you to participate in the Python Packages Survey - it takes > less than a minute to complete, and will help open source developers > understand their users' better. Thanks for

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
Change by Jason Fried : -- keywords: +patch, patch, patch pull_requests: +11316, 11317, 11318 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
Change by Jason Fried : -- keywords: +patch pull_requests: +11316 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35767> ___ ___ Py

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
Change by Jason Fried : -- keywords: +patch, patch pull_requests: +11316, 11317 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
Jason Fried added the comment: working on a pull request -- ___ Python tracker <https://bugs.python.org/issue35767> ___ ___ Python-bugs-list mailing list Unsub

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
Jason Fried added the comment: Oh this is broken in 3.7 trunk -- ___ Python tracker <https://bugs.python.org/issue35767> ___ ___ Python-bugs-list mailin

[issue35767] unittest loader doesn't work with partial test functions

2019-01-17 Thread Jason Fried
New submission from Jason Fried : https://github.com/python/cpython/blob/3.7/Lib/unittest/loader.py#L232 fullName = '%s.%s' % (testCaseClass.__module__, testFunc.__qualname__) Instead we should probably replace testFunc.__qualname__ with attrname I ran into this while running a test suite

[issue33944] Deprecate and remove pth files

2019-01-15 Thread Jason R. Coombs
Jason R. Coombs added the comment: > `site.addsitedir` is called for every site-packages directory (whether > global, within a venv, or at the user level), so my proposal above covers > appending multiple segments. Good point. I think you're assuming that only site dirs are ap

[issue33944] Deprecate and remove pth files

2019-01-14 Thread Jason R. Coombs
Jason R. Coombs added the comment: I like Nick's proposal. It has I believe the features that satisfy the use-cases of which I'm currently aware... with one edge case you may not have considered - support for multiple `__sitecustomize__` locations. Consider, for example, the case where

[issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work

2018-12-18 Thread Jason
Jason added the comment: Yes, it does. I haven't tried that code, but it looks similar to a fix I implemented locally. Jason O'Gray On Sun, Dec 2, 2018 at 2:41 PM Karthikeyan Singaravelan < rep...@bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: >

[issue17561] Add socket.create_server_sock() convenience function

2018-12-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I do believe this issue is still important and relevant. See issue25667 for a duplicate ticket (and references to implementations) and issue24209 for another issue where this could have been applied. -- nosy: +jason.coombs versions: +Python 3.8

[issue25667] Supply dual-stack (IPv4/IPv6) socket bind routine

2018-12-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe this issue is a duplicate of 17561, which I stumbled onto today. -- resolution: -> duplicate superseder: -> Add socket.create_server_sock() convenience function ___ Python tracker

[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2018-12-16 Thread Jason R. Coombs
New submission from Jason R. Coombs : Originally [reported in testing-cabal/mock#405](https://github.com/testing-cabal/mock/issues/405), I believe I've discovered an inconsistency that manifests as a flaw: `patch` and `patch.object` allow the target to be specified as string referring

[issue25545] email parsing docs: clarify that only ASCII strings are supported

2018-12-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't think this ticket should be implemented as described. Consider the use-case in importlib_metadata, which loads metadata from a package, metadata known to be of a specified encoding. It already knows the encoding and has decoded the full message

[issue35291] duplicate of memoryview from io.BufferedWriter leaks

2018-11-21 Thread Jason Madden
New submission from Jason Madden : Using Python 2.7.15, if a BufferedWriter wraps an IO object that duplicates the memoryview passed to the IO object's `write` method, that memoryview leaks. This script demonstrates the problem by leaking a memoryview for each iteration of the loop

[issue33944] Deprecate and remove pth files

2018-11-19 Thread Jason R. Coombs
Jason R. Coombs added the comment: Regarding other uses of .pth files, the project [future-fstrings](https://github.com/asottile/future-fstrings) relies on .pth files to enable its at-startup behavior. I'm also +1 to remove .pth files, but I also believe it's not viable today due

[issue35131] Cannot access to customized paths within .pth file

2018-11-18 Thread Jason R. Coombs
Jason R. Coombs added the comment: The problem you've encountered is that previously the file was assumed to be one encoding and would fail if it was not that encoding... so it was possible to lazy-load the file and process each line. In the new model, where you need to evaluate

[issue35131] Cannot access to customized paths within .pth file

2018-11-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Also, I would argue that this is an enhancement request and not a bug - that the prior expectation was that the .pth file is encoded in whatever encoding the system expects by default, and that adding support for a standardized encoding for .pth files

[issue35131] Cannot access to customized paths within .pth file

2018-11-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm only aware of one tool that writes .pth files, and that's setuptools, and it always writes ASCII (assuming package names are ASCII), so any encoding handling should be fine there. > We could add a handler for UnicodeDecodeError that falls back on ut

Re: namedtuples anamoly

2018-10-18 Thread Jason Friedman
> > So now the real question is: What were you trying to accomplish with > the assignment? Tell us, and let's see if we can find a way to > accomplish yor goal without wrecking the internals of the Grade class. > > And depending on your answer to that question, the new Data Classes feature in

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-23 Thread Jason R. Coombs
Jason R. Coombs added the comment: Is it documented anywhere how to do a framework build of Python? When I try to do a framework build by running `./configure --enable-framework` then `make`, `./python.exe` emits the following: dyld: Library not loaded: /Library/Frameworks/Python.framework

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: I went naively through the codebase and removed every reference to PYVENV_LAUNCHER and submitted as PR 9498. Does the CI runner at https://python.visualstudio.com/cpython/_build/results?buildId=31019=logs use a framework build such that it's an adequate

[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-22 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +8905 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue22490> ___ ___ Python-bugs-lis

how to get string printed by PyErr_Print( )

2018-09-17 Thread Jason Qian via Python-list
Hey, Someone has discussed this issue before. Other than redirect stderr, does the new version python 3.7.0 has other way to retrieve the string whichPyErr_Print( ) ? if (PyErr_Occurred()) PyErr_Print(); //need to retrieve the error to string Thanks --

Re: Add header at top with email.message

2018-09-15 Thread Jason Friedman
> > the EmailMessage class of email.message provides the methods > add_header() and __setitem__() to add a header to a message. > add_header() effectively calls __setitem__(), which does > `self._headers.append(self.policy.header_store_parse(name, val))`. This > inserts the header at the bottom.

Re: Help on PyList 3.7.0

2018-09-14 Thread Jason Qian via Python-list
Thanks a lot. On Thu, Sep 13, 2018 at 5:24 PM, MRAB wrote: > On 2018-09-13 21:50, Jason Qian via Python-list wrote: > >> Hey, >> >> Need some help on PyList. >> >> >> #get path >> PyObject *path = PyObject_GetAttrString(sys, &q

Help on PyList 3.7.0

2018-09-13 Thread Jason Qian via Python-list
Hey, Need some help on PyList. #get path PyObject *path = PyObject_GetAttrString(sys, "path"); #new user path PyObject* newPath = PyUnicode_DecodeUTF8(userPath, strlen( userPath ), errors); #append newPath to path PyList_Append(path, newPath); How to check if the newPath is already in the

Re: ModuleNotFoundError: No module named 'encodings'

2018-09-07 Thread Jason Qian via Python-list
, Thomas Jollans wrote: > On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote: > >> Hi >> >> Need some help. >> >> I have a C++ application that invokes Python. >> >> ... >> Py_SetPythonHome("python_path"); >> > > This

ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Jason Qian via Python-list
stem codec ModuleNotFoundError: No module named 'encodings' Thanks for the help Jason -- https://mail.python.org/mailman/listinfo/python-list

[issue17480] pyvenv should be installed someplace more obvious on Windows

2018-09-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Nice! Linking to issue25427. -- ___ Python tracker <https://bugs.python.org/issue17480> ___ ___ Python-bugs-list mailin

Re: Bottle framework references

2018-08-24 Thread Jason Friedman
> > > > On 22 Aug 2018, at 8:38 am, Jason Friedman wrote: > > > >> > >> I am building up the microsite based on Bottle framework now. > >> Any references/books? I am unfamiliar with this framework yet. > >> > >> I have used it with

Re: Bottle framework references

2018-08-21 Thread Jason Friedman
> > I am building up the microsite based on Bottle framework now. > Any references/books? I am unfamiliar with this framework yet. > > I have used it with success. The online documentation was sufficient for my needs, at least. -- https://mail.python.org/mailman/listinfo/python-list

[issue34425] :s formatting broken for objects without __format__

2018-08-20 Thread Jason Spencer
Jason Spencer added the comment: Then I would argue that it is at least a documentation bug. The 3.6 format spec mini language still claims that {} is equivalent to {:s}, which now is only conditionally true. I would also argue that having different behavior for {} and {:s}, which

defaultdict and datetime

2018-08-18 Thread Jason Friedman
$ python3 Python 3.6.1 (default, Apr 8 2017, 09:56:20) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import collections, datetime >>> x = collections.defaultdict(int) >>> x['something'] 0 >>> x = collections.defaultdict(datetime.datetime)

[issue34425] :s formatting broken for objects without __format__

2018-08-17 Thread Jason Spencer
New submission from Jason Spencer : Objects with __str__ but WITHOUT __format__ are string-convertible and default-to-str formattable. But the explicit use of '{:s}' as a format string fails to format these objects as expected. Either it is no longer the case that '{}' and '{:s

[issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path

2018-08-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: In [setuptools 1453](https://github.com/pypa/setuptools/issues/1453), this issue hit the project hard. Tox 3.2 changed the default invocation of pip from the script-based invocation to the runpy based implementation (python -m pip), which causes pip

[issue11594] 2to3 does not preserve line endings

2018-07-27 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue11594] 2to3 does not preserve line endings

2018-07-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: Slawomir, you're probably looking for issue34108. -- ___ Python tracker <https://bugs.python.org/issue11594> ___ ___ Pytho

[issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work

2018-07-26 Thread Jason
Jason added the comment: Serhiy, I believe you are correct. I updated my local python and it passed. However, I think there might be a bug with the implementation that doesn't correctly respect the BROWSER preference. If I do: ``` ➜ BROWSER=lynx python3 Python 3.7.0 (default, Jul 23 2018

[issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work

2018-07-26 Thread Jason
Change by Jason : -- type: crash -> ___ Python tracker <https://bugs.python.org/issue34238> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue34238] When BROWSER is set on Mac webbrowser.register_standard_browsers doesn't work

2018-07-26 Thread Jason
New submission from Jason : Description: When BROWSER is set, webbrowser.get fails because register_standard_browsers throws an error. Work around: You can still use `webbroswer._browsers[key][1].open(url)` to open a browser. Operating system: macOS High Sierra v10.13.6 Reproduction 1

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset cf21d0031dd84544d4108765553c2b03dfe726c5 by Jason R. Coombs (Miss Islington (bot)) in branch '3.7': bpo-34108: Fix double carriage return in 2to3 on Windows (GH-8271) (#8275) https://github.com/python/cpython/commit

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset cafaf0447b950fd4f59edd8cbde040c61ae528f8 by Jason R. Coombs in branch 'master': bpo-34108: Fix double carriage return in 2to3 on Windows (#8271) https://github.com/python/cpython/commit/cafaf0447b950fd4f59edd8cbde040c61ae528f8

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
Jason R. Coombs added the comment: The regression never got to 3.6, so this issue likely only affects 3.7+. -- versions: -Python 3.6 ___ Python tracker <https://bugs.python.org/issue34

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +7806 stage: commit review -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue34108] 2to3 munges new lines on Windows

2018-07-13 Thread Jason R. Coombs
New submission from Jason R. Coombs : In issue11594, we attempted to solve the newlines issue but inadvertently introduced extraneous CR before CRLF newlines when running on Windows. See https://github.com/python/cpython/pull/6483#issuecomment-401957049 for more details. -- assignee

[issue33864] collections.abc.ByteString does not register memoryview

2018-06-14 Thread Jason Fried
New submission from Jason Fried : Looking at the typing Module docs in the section for ByteString This type represents the types bytes, bytearray, and memoryview. But collections.abc.ByteString does not have memoryview registered. Is it because memoryview doesn't support .index

[issue33836] [Good first-time issue] Recommend keyword-only param for memoization in FAQ

2018-06-13 Thread Jason
Jason added the comment: Hey Zach, Can I get this one? I haven't contributed anything yet. Cheers, Jason -- nosy: +codecamelot ___ Python tracker <https://bugs.python.org/issue33

[issue33776] Segfault when passing invalid argument to asyncio.ensure_future

2018-06-05 Thread Jason McKellar
New submission from Jason McKellar : If time.monotonic() is yielded from a generator that is passed to asyncio.ensure_future a segfault occurs when it's scheduled. The example below shows time.monotonic called in the generator, however the segfault will also occur if a function is called

[issue33238] AssertionError on await of Future returned by asyncio.wrap_future

2018-05-22 Thread Jason Haydaman
Change by Jason Haydaman <jhayda...@sightlineinnovation.com>: -- keywords: +patch pull_requests: +6690 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-21 Thread Jason Fried
Jason Fried <m...@jasonfried.info> added the comment: For loops not supporting this throwing NotImplmentedError from the method to enable reentrancy seems appropriate. "You should convert all your stack to async functions..." That may not be practical for large code bas

[issue33546] asyncio.Condition should become awaitable in 3.9

2018-05-16 Thread Jason Fried
New submission from Jason Fried <m...@jasonfried.info>: In 3.9 we can remove the deprecated pattern for accepting __enter__ and __exit__ for locks. This will free up __await__ for Condition to use for replacing .wait() which is wart from before awaitables. My new proposed behavior is

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
Change by Jason Fried <m...@jasonfried.info>: -- keywords: +patch pull_requests: +6584 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33544] Asyncio Event.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
Jason Fried <m...@jasonfried.info> added the comment: Removed Condition from this request, because it has an __await__ method for supporting the the deprecated pattern with async cond: I'll open a different bug, for Condition behavior for 3.9 when we can remove the deprecated p

[issue33544] Asyncio Event.wait() and Condition.wait() is a hold over from before awaitable, and should be awaitable

2018-05-16 Thread Jason Fried
New submission from Jason Fried <m...@jasonfried.info>: wait is a very overloaded word in asyncio. Events and Conditions are not consistent with the rest of asyncio. Why don't Future and Task have wait() methods? well because they are awaitable Some subjective reasoning: Every tim

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
Change by Jason Fried <m...@jasonfried.info>: -- keywords: +patch pull_requests: +6540 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
Change by Jason Fried <m...@jasonfried.info>: -- nosy: +lukasz.langa ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33523> ___ _

[issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio

2018-05-15 Thread Jason Fried
New submission from Jason Fried <m...@jasonfried.info>: At Facebook and Instagram we have large interconnected codebases without clear boundaries of ownership. As we move more and more services to utilize asyncio we are finding that once blocking (but fast) code paths, are now cropp

gevent 1.3.0 released

2018-05-14 Thread Jason Madden
months. For a general overview of what's new in gevent 1.3, see http://www.gevent.org/whatsnew_1_3.html ~ Jason -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

[issue24209] Allow IPv6 bind in http.server

2018-04-27 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: >From what I can tell, there's not currently any tests for the behavior of >`http.server` as a script, and that sounds like a non-trivial behavior to >test. I agree documentation updates for this change are essential, bu

[issue24209] Allow IPv6 bind in http.server

2018-04-27 Thread Jason R. Coombs
Change by Jason R. Coombs <jar...@jaraco.com>: -- nosy: +jason.coombs ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue24209> ___ _

[issue1284316] Win32: Security problem with default installation directory

2018-04-24 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: For those installing Python 2.7, I share here for others the [Powershell module](https://www.dropbox.com/s/62m9easad0iakat/python.ps1?dl=0) I include in my profile. With this module loaded, `get-python-ver 2.7.14` installs Python

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2018-04-16 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: I believe I encountered this issue today on Python 2.7.14 (https://ci.appveyor.com/project/jaraco/jaraco-windows/build/31/job/lenh5l4dcmj137b9). In this case, I have an iterable (in itertools.imap) that raises a TypeError when eva

Re: how to set timeout for os.popen

2018-04-15 Thread Jason Friedman
> > while 1: > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > >

[issue11594] 2to3 does not preserve line endings

2018-04-15 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: I do still see the issue on Python 3.7b3: $ python ~/Dropbox/bin/scripts/which-line-ending onefile.py Line ending is '\n' $ python ~/Dropbox/bin/scripts/which-line-ending otherfile.py Line ending is '\r\n' $ python -V Python 3

[issue32696] Fix pickling exceptions with multiple arguments

2018-04-12 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: Kirill, see https://bugs.python.org/issue1692335#msg310951 in the related issue for one possible way to work around the issue on Python 3. -- ___ Python tracker <rep...@bugs.python.or

Re: # of Months between two dates

2018-04-06 Thread Jason Friedman
> > >> > It's probably better to write the function yourself according to what > >> > makes sense in your use-case, and document its behaviour clearly. > >> > >> > > I suggest using the dateutil module ( > > https://pypi.python.org/pypi/python-dateutil) before writing your own. > > I'm not seeing

[issue33238] AssertionError on await of Future returned by asyncio.wrap_future

2018-04-06 Thread Jason Haydaman
Jason Haydaman <jhayda...@sightlineinnovation.com> added the comment: May also be worth pointing out that even in the case of only calling set_result once, _done_callbacks still has _chain_future in it: import asyncio import concurrent.futures f = concurrent.futures.Future() a

[issue33238] AssertionError on await of Future returned by asyncio.wrap_future

2018-04-06 Thread Jason Haydaman
New submission from Jason Haydaman <jhayda...@sightlineinnovation.com>: When the concurrent Future wrapped by asyncio.wrap_future has set_result or set_exception called multiple times, I get the following traceback: Traceback (most recent call last): File "/usr/local/lib/python

Re: # of Months between two dates

2018-04-05 Thread Jason Friedman
> > > > I've written a function to return the months between date1 and date2 > but > > > I'd like to know if anyone is aware of anything in the standard library > > > to do the same? For bonus points, does anyone know if postgres can do > > > the same (we use a lot of date/time funcitons in

[issue33146] contextlib.suppress should capture exception for inspection and filter on substrings

2018-03-26 Thread Jason R. Coombs
New submission from Jason R. Coombs <jar...@jaraco.com>: I propose the following expansion of the interface of contextlib.suppress. Currently, when entering the context, suppress returns None. Instead, it could return an object that provides some detail about the exception. Inspi

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-06 Thread Jason R. Coombs
Change by Jason R. Coombs <jar...@jaraco.com>: -- stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bugs.

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-06 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: New changeset 5a0c3987abd6a71b4fadeb525477eb5f560e8514 by Jason R. Coombs (Miss Islington (bot)) in branch '3.7': bpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace package (GH-5980) (GH-5997)

[issue33005] 3.7.0b2 Interpreter crash in dev mode (or with PYTHONMALLOC=debug) with 'python -X dev -c 'import os; os.fork()'

2018-03-06 Thread Jason Madden
Jason Madden <ja...@nextthought.com> added the comment: Thank you! I can confirm that git commit 31e2b76f7bbcb8278748565252767a8b7790ff27 on the 3.7 branch fixes the issue for me. -- ___ Python tracker <rep...@bugs.python.or

Re: Do not promote `None` as the first argument to `filter` in documentation.

2018-03-06 Thread Jason Friedman
On Tue, Mar 6, 2018 at 1:52 AM, Kirill Balunov wrote: > > I propose to delete all references in the `filter` documentation that the > first argument can be `None`, with possible depreciation of `None` as the > the first argument - FutureWarning in Python 3.8+ and

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-05 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: New changeset b9650a04a81355c8a7dcd0464c28febfb4bfc0a9 by Jason R. Coombs in branch 'master': bpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace package (GH-5980) https://github.com/python/cpython/

[issue33005] 3.7.0b2 Interpreter crash in dev mode (or with PYTHONMALLOC=debug) with 'python -X dev -c 'import os; os.fork()'

2018-03-05 Thread Jason Madden
Jason Madden <ja...@nextthought.com> added the comment: I built a local version of master (6821e73) and was able to get some line numbers (they're off by one for some reason, it appears): Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel

[issue33005] 3.7.0b2 Interpreter crash in dev mode (or with PYTHONMALLOC=debug) with 'python -X dev -c 'import os; os.fork()'

2018-03-05 Thread Jason Madden
New submission from Jason Madden <ja...@nextthought.com>: At the request of Victor Stinner on twitter, I ran the gevent test suite with Python 3.7.0b2 with the new '-X dev' argument and discovered an interpreter crash. With a bit of work, it boiled down to a very simple command: $

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-04 Thread Jason R. Coombs
Change by Jason R. Coombs <jar...@jaraco.com>: -- keywords: +patch pull_requests: +5746 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-04 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: And [this patch](https://gist.github.com/7184fa32670f2c6377ddeb710676) corrects the failure such that the test passes. It does so by restoring the expectation that inspect.getfile will once again raise a TypeError for these nam

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-04 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: Okay. I've wired up some unittests in test_doctest, and with [this patch](https://gist.github.com/jaraco/ea992719ac931fa761a6e9ef7a354542), it now captures the failed expectation of this

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-04 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: I tried creating a test, but I'm struggling. I added [this patch](https://gist.github.com/e795a9a34594d202711aedf22c484af9), and tried to run it, but it's not being run. ``` $ ./python.exe Tools/scripts/run_tests.py 'test_doctest'

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-04 Thread Jason R. Coombs
Jason R. Coombs <jar...@jaraco.com> added the comment: The main questions I have before proceeding with creating tests relate to what interfaces Python wishes to support. Here's the decision tree I have in my head. - Retain the change of adding a __file__ attribute to namespace pa

[issue32991] AttributeError in doctest.DocTestFinder.find

2018-03-03 Thread Jason R. Coombs
New submission from Jason R. Coombs <jar...@jaraco.com>: In Python 3.6, one could find doctests on a namespace package: ``` $ mkdir foo $ python3.6 Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "

<    5   6   7   8   9   10   11   12   13   14   >