Skip to content

bpo-38478: Correctly handle keyword argument with same name as positional-only parameter #16800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 15, 2019

@pablogsal
Copy link
Member Author

pablogsal commented Oct 15, 2019

CC: @tirkarthi Would you like to review this pr? :)

Copy link
Member

@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I too had the same solution in mind since it's simple . Thanks Pablo :)

@pablogsal
Copy link
Member Author

Thanks @tirkarthi :)

@pablogsal pablogsal merged commit f3ef06a into python:master Oct 15, 2019
@pablogsal pablogsal deleted the bpo-38478 branch October 15, 2019 11:40
@miss-islington
Copy link
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-16801 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2019
…onal-only parameter (pythonGH-16800)

(cherry picked from commit f3ef06a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
miss-islington added a commit that referenced this pull request Oct 15, 2019
…onal-only parameter (GH-16800)

(cherry picked from commit f3ef06a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@pablogsal
Copy link
Member Author

The buildbot failure is unrelated: test_start_tls_server_1

@python python deleted a comment from bedevere-bot Oct 15, 2019
@python python deleted a comment from bedevere-bot Oct 15, 2019
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Gentoo Non-Debug with X 3.8 has failed when building commit f705f8e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/214/builds/436) and take a look at the build logs.
  4. Check if the failure is related to this commit (f705f8e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/214/builds/436

Failed tests:

  • test_asyncio

Failed subtests:

  • test_start_tls_server_1 - test.test_asyncio.test_sslproto.SelectorStartTLSTests

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

414 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 3 sec
  • test_multiprocessing_spawn: 2 min 39 sec
  • test_tokenize: 2 min 3 sec
  • test_asyncio: 1 min 32 sec
  • test_multiprocessing_forkserver: 1 min 29 sec
  • test_tools: 1 min 23 sec
  • test_lib2to3: 1 min 13 sec
  • test_multiprocessing_fork: 1 min 13 sec
  • test_io: 42.1 sec
  • test_subprocess: 39.0 sec

1 test failed:
test_asyncio

8 tests skipped:
test_devpoll test_kqueue test_msilib test_startfile
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_asyncio

Total duration: 19 min 28 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_sslproto.py", line 585, in test_start_tls_server_1
    self.loop.run_until_complete(run_main())
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 606, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 190, in run
    self._prog(TestSocketWrapper(self._sock))
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_sslproto.py", line 575, in <lambda>
    with self.tcp_client(lambda sock: client(sock, addr),
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_sslproto.py", line 520, in client
    answer = sock.recv_all(len(ANSWER))
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 130, in recv_all
    data = self.recv(n - len(buf))
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 1226, in recv
    return self.read(buflen)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/ssl.py", line 1101, in read
    return self._sslobj.read(len)
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2560)


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 1729, in call_exception_handler
    self._exception_handler(self, context)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler
    self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 40133)>
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=8>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0xb5f673b8>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Unhandled error in exception handler
context: {'message': 'Fatal error on SSL transport', 'exception': RuntimeError('Event loop is closed'), 'transport': <_SelectorSocketTransport closing fd=8>, 'protocol': <asyncio.sslproto.SSLProtocol object at 0xb607d0e8>}
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py", line 898, in write
    n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 192, in run
    self._test._abort_socket_test(ex)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 114, in _abort_socket_test
    self.fail(ex)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2560)
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py:934: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 45534), raddr=('127.0.0.1', 41207)>
  self._invoke_excepthook(self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ERROR


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 192, in run
    self._test._abort_socket_test(ex)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 114, in _abort_socket_test
    self.fail(ex)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2560)
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/threading.py:934: ResourceWarning: unclosed <ssl.SSLSocket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 43192), raddr=('127.0.0.1', 40133)>
  self._invoke_excepthook(self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
ERROR


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 1729, in call_exception_handler
    self._exception_handler(self, context)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler
    self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 41207)>
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
k


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 1729, in call_exception_handler
    self._exception_handler(self, context)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler
    self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 41207)>
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py:684: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=8>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed transport <asyncio.sslproto._SSLProtocolTransport object at 0xb418ff58>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Unhandled error in exception handler
context: {'message': 'Fatal error on SSL transport', 'exception': RuntimeError('Event loop is closed'), 'transport': <_SelectorSocketTransport closing fd=8>, 'protocol': <asyncio.sslproto.SSLProtocol object at 0xb3eec238>}
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py", line 898, in write
    n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 1729, in call_exception_handler
    self._exception_handler(self, context)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/functional.py", line 22, in loop_exception_handler
    self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/test/test_asyncio/test_streams.py:40: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 40133)>
  gc.collect()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
k


Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/sslproto.py", line 685, in _process_write_backlog
    self._transport.write(chunk)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py", line 904, in write
    self._fatal_error(exc, 'Fatal write error on socket transport')
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py", line 699, in _fatal_error
    self._force_close(exc)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/selector_events.py", line 711, in _force_close
    self._loop.call_soon(self._call_connection_lost, exc)
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 711, in call_soon
    self._check_closed()
  File "/buildbot/buildarea/cpython/3.8.ware-gentoo-x86.nondebug/build/Lib/asyncio/base_events.py", line 504, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants