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

This line used to work: sd.connect (routerlanip, 80) #33671

Closed
b-52 mannequin opened this issue Jan 8, 2001 · 2 comments
Closed

This line used to work: sd.connect (routerlanip, 80) #33671

b-52 mannequin opened this issue Jan 8, 2001 · 2 comments
Labels
extension-modules C modules in the Modules dir

Comments

@b-52
Copy link
Mannequin

b-52 mannequin commented Jan 8, 2001

BPO 227992
Nosy @gvanrossum

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 2001-01-08.13:33:49.000>
created_at = <Date 2001-01-08.03:52:52.000>
labels = ['extension-modules', 'invalid']
title = 'This line used to work: sd.connect (routerlanip, 80)'
updated_at = <Date 2001-01-08.13:33:49.000>
user = 'https://bugs.python.org/b-52'

bugs.python.org fields:

activity = <Date 2001-01-08.13:33:49.000>
actor = 'gvanrossum'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Extension Modules']
creation = <Date 2001-01-08.03:52:52.000>
creator = 'b-52'
dependencies = []
files = []
hgrepos = []
issue_num = 227992
keywords = []
message_count = 2.0
messages = ['2846', '2847']
nosy_count = 2.0
nosy_names = ['gvanrossum', 'b-52']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue227992'
versions = []

@b-52
Copy link
Mannequin Author

b-52 mannequin commented Jan 8, 2001

This line used to work under 1.6:
sd.connect (routerlanip, 80)
Now it returns the following error:

Traceback (most recent call last):
  File "linksysdynhostsync.py", line 89, in ?
    sd.connect (routerlanip, 80)
  File "<string>", line 1, in connect
TypeError: connect requires exactly 1 argument; 2 given

The "sd" object is opened as follows:
sd = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
The variable "routerlanip" is set to an IP address e.g. 10.0.0.1
HELP

@b-52 b-52 mannequin closed this as completed Jan 8, 2001
@b-52 b-52 mannequin added invalid extension-modules C modules in the Modules dir labels Jan 8, 2001
@b-52 b-52 mannequin closed this as completed Jan 8, 2001
@b-52 b-52 mannequin added invalid extension-modules C modules in the Modules dir labels Jan 8, 2001
@gvanrossum
Copy link
Member

connect() was always documented as having a single 'address' argument, but the implementation was lax and allowed s.connect(host, port) instead of s.connect((host, port)). This was fixed in 2.0, just as list.append(a,b,c) is no longer allowed and must now be written as list.append((a,b,c)).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

1 participant