Skip to content
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

regression: BaseEventLoop.create_server does not accept port=None #71602

Closed
mcobden mannequin opened this issue Jun 29, 2016 · 6 comments
Closed

regression: BaseEventLoop.create_server does not accept port=None #71602

mcobden mannequin opened this issue Jun 29, 2016 · 6 comments
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@mcobden
Copy link
Mannequin

mcobden mannequin commented Jun 29, 2016

BPO 27415
Nosy @gvanrossum, @vstinner, @berkerpeksag, @1st1

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2016-09-16.10:37:57.710>
created_at = <Date 2016-06-29.14:46:01.010>
labels = ['type-bug', 'expert-asyncio']
title = 'regression: BaseEventLoop.create_server does not accept port=None'
updated_at = <Date 2016-09-16.10:43:58.801>
user = 'https://bugs.python.org/mcobden'

bugs.python.org fields:

activity = <Date 2016-09-16.10:43:58.801>
actor = 'mcobden'
assignee = 'none'
closed = True
closed_date = <Date 2016-09-16.10:37:57.710>
closer = 'berker.peksag'
components = ['asyncio']
creation = <Date 2016-06-29.14:46:01.010>
creator = 'mcobden'
dependencies = []
files = []
hgrepos = []
issue_num = 27415
keywords = []
message_count = 6.0
messages = ['269507', '269619', '276627', '276690', '276691', '276692']
nosy_count = 5.0
nosy_names = ['gvanrossum', 'vstinner', 'berker.peksag', 'yselivanov', 'mcobden']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27415'
versions = ['Python 3.4', 'Python 3.5']

@mcobden
Copy link
Mannequin Author

mcobden mannequin commented Jun 29, 2016

With the most recent 3.4 bugfix, calling create_server with port=None stopped working.
This also affects 3.5, and I would imagine also 3.6, but haven't checked that.

Test case:

import asyncio; l = asyncio.get_event_loop(); l.run_until_complete(l.create_server(lambda: None, host='0.0.0.0', port=None))

Expected result: a socket object
Broken result: "TypeError: an integer is required (got type NoneType)"

@mcobden mcobden mannequin added the topic-asyncio label Jun 29, 2016
@mcobden
Copy link
Mannequin Author

mcobden mannequin commented Jun 30, 2016

I should add that port=0 is an acceptable workaround

@mcobden mcobden mannequin added the type-bug An unexpected behavior, bug, or error label Jun 30, 2016
@mcobden mcobden mannequin changed the title BaseEventLoop.create_server does not accept port=None regression: BaseEventLoop.create_server does not accept port=None Jul 12, 2016
@1st1
Copy link
Member

1st1 commented Sep 15, 2016

Looks like this is fixed now.

@1st1 1st1 closed this as completed Sep 15, 2016
@mcobden
Copy link
Mannequin Author

mcobden mannequin commented Sep 16, 2016

Still doesn't work in Python 3.4.5; I can confirm it's fixed in Python 3.5.2.

@mcobden mcobden mannequin reopened this Sep 16, 2016
@berkerpeksag
Copy link
Member

3.4 is in security-fix-only mode so it doesn't get bugfix updates anymore.

@mcobden
Copy link
Mannequin Author

mcobden mannequin commented Sep 16, 2016

Ah thanks, that's fair.
It seems a shame since this regression was introduced to 3.4 by a security/bugfix release.
Since there's a workaround it's not a big deal.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-asyncio type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants