SOBotics / Botpy

A python framework for creating chatbots on the StackExchange network.
Other
5 stars 1 forks source link

Bot.py: default _on_event_callback takes one argument #22

Closed tripleee closed 5 years ago

tripleee commented 5 years ago

I was getting warnings from PulseMonitor for the latest release when I wasn't using the callback myself. I hope adding an argument to the default lambda is a correct fix. (I suppose the code could also look for the callback to be not None at callback time and use a simpler default.)

tripleee commented 5 years ago

I went through royal pains to get this into testing in the current Docker build of Pulse Monitor for testing, so I can at least attest to that it doesn't break there. The warning I was getting in the logs was pretty harmless I suppose, but arguably the code should run without such annoyances out of the box.

double-fault commented 5 years ago

Yeah, that looks good to me; I must have somehow missed it. Thanks!

Would it be possible for you to make a PyPi release, or do you want me to do it?

tripleee commented 5 years ago

I'll be happy to attempt a PyPi release tomorrow. I'll be available roughly 0730 UTC until approx 12, is there a particular time in that timeframe you could be online for consultation and coordination?

double-fault commented 5 years ago

@tripleee Sure! I'll try to pop in to the Charcoal Test room at around 0830 UTC, but I can't promise that. Do ping me though if you face any problems.

TBH, I don't really remember the exact process of doing an upload the first time, since I just use an alias for it nowadays. The technique I use seems to be using a legacy API, so if you can figure out a better way, go for it!

Here's what I could understand from files on my computer, and this should work for you.

[distutils]
index-servers = 
    pypi

[pypi]
repository=https://pypi.python.org/pypi
username=tripleee
password=SomeRandomPassword

That's it! It should probably work, but be warned the technique uses a Legacy API (or so I am warned). I'm too lazy to change it since it works, but if it troubles you, don't use it.

tripleee commented 5 years ago

Publish done, for the record.