Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#32525 closed defect (duplicate)

problem with authenticate

Reported by: wiri Owned by: atagar
Priority: Medium Milestone:
Component: Archived/Stem Version: Tor: 0.4.1.6
Severity: Normal Keywords: python 3.8
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I think Python 3.8 broke stem authentication :

Python 3.8.0 (default, Oct 23 2019, 18:51:26)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import stem
from stem.control import Controller
controller = Controller.from_port(port=9051)
controller.authenticate()

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/stem/control.py", line 1100, in authenticate

stem.connection.authenticate(self, *args, kwargs)

File "/usr/lib/python3.8/site-packages/stem/connection.py", line 592, in authenticate

controller._post_authentication()

File "/usr/lib/python3.8/site-packages/stem/control.py", line 3902, in _post_authentication

owning_pid = self.get_conf('OwningControllerProcess', None)

File "/usr/lib/python3.8/site-packages/stem/control.py", line 2170, in get_conf

entries = self.get_conf_map(param, default, multiple)

File "/usr/lib/python3.8/site-packages/stem/control.py", line 2273, in get_conf_map

for key in reply:

RuntimeError: dictionary keys changed during iteration

controller.authenticate()

(the second authenticate() work !)

Child Tickets

Change History (8)

comment:1 Changed 8 months ago by atagar

Status: newneeds_information

Hi wiri, what version of stem are you using? Our get_conf_map() method doesn't have the problematic line ("for key in reply:") so this was probably already fixed.

comment:2 Changed 8 months ago by cypherpunks

I am having the same issue as wiri with stem 1.7.1. I was able to fix the issue by manually applying this commit. Any chance we could get an updated version in PyPI?

comment:3 Changed 8 months ago by atagar

Resolution: duplicate
Status: needs_informationclosed

Ahhh, thanks cypherpunks.

I plan to release Stem 1.8 in December, which will be the last in the 1.x series and the final with Python 2.x support. In the meantime if you encounter this I'd suggest using Stem from git.

Sorry for the bug!

comment:4 Changed 8 months ago by cypherpunks

This bug also effecting upstream projects. I found this ticket via this issue. Recommending using the git version is unrealistic for upstream projects or package managers.

There are very few commits since the last released version. Are there uncommited changes that are planed for 1.8? I can understand wanting to wait to wrap up python 2 support, but waiting for EOL support for the current release does not make sense.

comment:5 Changed 8 months ago by atagar

There are very few commits since the last released version.

Few? There are 354 unreleased commits, comparable to the 1.7 release...

% git rev-list --count  1.7.0..master
354

% git rev-list --count  1.6.0..1.7.0
432

I just merged HSv3 descriptor creation support this morning. Releasing when this branch has barely had a chance to breath would be rather irresponsable. :)

comment:6 Changed 8 months ago by cypherpunks

I am fairly embarrassed about a silly mistake. While fumbling through the cgit web interface, I thought I was looking at the log for the whole project not just the control.py file. 🤦 Armed with laughable incorrect information, I came to equally laughable conclusions.

With correct information, I would agree that rushing a new version is irresponsible. Please accept my apology, as I do not want to minimalize the efforts of you and the other developers.

comment:7 Changed 8 months ago by atagar

No worries in the least! I figured it was something like that. :P

Again, sorry for the hassle of this bug. Hopefully 1.8 isn't too far off!

comment:8 Changed 8 months ago by wiri

I have the 1.7.1.
And for me too, the git version solved th problem.

Thank you.

Last edited 8 months ago by wiri (previous) (diff)
Note: See TracTickets for help on using tickets.