Skip to content

Commit

Permalink
update2 (#2)
Browse files Browse the repository at this point in the history
* update movie.py to use omdbapi as imdbapi is non-functional

* minor cosmetic change

* Resolve sopel-irc#926

Also cleaned up dict value retrieval a little, the .get() calls were a bit unnecessary.

* Remove feedparser dep from requirements

* Remove feedparser from RPM spec

* Make CAD currency code case-insensitive

* Resolve sopel-irc#929

Ensures that FilenameAttribute's parse and serialize always have the parameters they need.

* [isup] fix bad indexes preventing bot from recognizing http protocols

`'http://'` is 7 characters long, so `site[:6]` can't ever match it. ditto for `'https://'` and `site[:7]`

* Switch back to get() calls

There's some places where there were already try catch blocks for KeyError, so I left those ones.

* core: Fix issues with reloading folder modules

Closes sopel-irc#899, obviates and closes sopel-irc#932.

* Switch from *args to named args.

* Properly fetch the xml before passing it to xmltodict

I'm a moron.

* Release 6.1.0

* Use flake8 for future checking, and add missing ones

* Fix coding declaration in a few places it was still wrong

Again, fuck windows. sopel-irc#821

* README: Update sopel package location in Arch

* Fix crash during configure

Reported by aam in IRC, http://pastebin.com/0rAQb7Kp

* Fix TypeError: 'NoneType' object is not iterable

Happened when an invalid language hint abbreviation was given.

* Require a valid phrase to translate

* [meetbot] fix crash when starting meeting

Resolves sopel-irc#942

* Release 6.1.1

* Require chanmsg for all adminchannel commands

* Fix sopel-irc#945

We should only get `socket.gaierror` if the user passes an invalid IP or hostname, but it could be in the event that we don't have DNS configured on the machine or a multitude of other things, so we can be somewhat vague in the error message.

* Fix sopel-irc#860

Should resolve the inconsistencies between the implementation of unquote in python 2 and python 3.

* [Formatting]Gray is the same as Grey. Which spelling is correct is a grey area.

* Updated link for help command

was a bad link, updated to correct one

* [countdown] fix remaining time calculation

* [docs] Rename

* Add tracking of users and their accounts

This uses some of the code that @maxpowa wrote for sopel-irc#941, but gives a
somewhat more intuitive API. It also paves the way for potentially
adding direct support for away-notify and metadata-notify.

* rename references to willie in systemd service file

* update project url in comments

* update project url in comment

* update project name in CONTRIBUTING.md (includes log files location, issue tracking url)

* Update github URL to organization, Sopel-IRC, rather than Embolalia

* [dice] Handle negative numbers and uppercase letters.

First, add case-insensitivity to the "d" and "v" letters in the input
regex by capturing [dD] and [vV] in regexes.

Next, make sure we can handle negative numbers properly by capturing
a possible "-" in front of any numbers. If dice_num or dice_type ends
up negative, abort _roll_dice early (dice_type already had a negative
check that wasn't being hit because "-" wasn't captured).

* [dice] Handle negative numbers and uppercase letters.

First, add case-insensitivity to the "d" and "v" letters in the input
regex by capturing [dD] and [vV] in regexes.

Next, make sure we can handle negative numbers properly by capturing
a possible "-" in front of any numbers. If dice_num or dice_type ends
up negative, abort _roll_dice early (dice_type already had a negative
check that wasn't being hit because "-" wasn't captured).

* [dice] Also handle negative drop_lowest values.

* Make BTC currency code case-insensitive

* Address comments on PR sopel-irc#961

This includes being more consistent about using pop rather than del to
prevent key errors, and adding some locking around the privilege related
things

* Add user tracking for RFC WHO replies

* Add away tracking

* Add support for account-tag

* Enable the account-tag capability

* Replace channels list with channels dictionary

Hopefully, nobody else is taking advantage of channels being a list,
rather than a dict. If they are, well, oops.

* Add enumeration of IRC events

Closes sopel-irc#960

* Add cap-notify support

See sopel-irc#971

* coretasks: Replace numeric events with their enums

Also add the missing RPL_WHOSPCRPL to tools.events

* [contrib] rename & edit willie out of contrib

Fixes sopel-irc#963

* Huge cleanup of copyright headers and docstrings

They're still super inconsistent and probably a lot are out of date, but
at least there won't be random copyright info showing up in the docs
anymore. Oh, and my domain and name are correct now, too…

* [currency] Make arguments case-insensitive (close sopel-irc#979)

* Fix URL excludes loading (sopel-irc#959)

setup uses it as a list, and in previous versions of sopel it was a list, but in the UrlSection it's defined as a ValidatedAttribute. This was causing each character in the excludes list to be parsed as a regex exclude. Switching to ListAttribute fixes the issue.

* [find_updates] Fix missing RPL_ prefix

* [bot] Fix misleading message

Coretasks is only one module, so if you loaded it and only one other, you'd get the "Couldn't load any modules" warning, even though there was a module loaded.

* [trigger] IRCv3 server-time support

* [tests] Create more trigger test cases

* [tests] Create module tests

* [tests] DB test cleanup

* [tests] Add formatting tests

* [tests] Fix coding declaration

* [tests] Update .travis.yml

* [translate] Fix bad test

* Support using account name for auth

* [tests] Remove pep8 dev-requirement

Also fixed the critical error where py.test thought sopel.py (the entry script) was the sopel package.

* [pep8] Minor clean up to conform with pep8

* [web] Ensure ca_certs is defined

When running tests it's not defined at all, because the only place defining it was the config loader code. Now it's defined, but will still fail out since it's not a valid CA certificate file.

* [pep8] Final pep8 run

Everything should now conform to pep8 and pass flake8.

* [tests] Improve trigger coverage

* [reddit] Prevent specific commands in PM

Resolves sopel-irc#789

* Documentation for target types

* docs/core: Shift around functions to make autodoccing easier

* docs: Start on a major cleanup of documentation

* Make _ssl_recv always return bytes

_ssl_recv returned empty strings instead of the empty bytes object if
the socket was closed or upon ENOENT.

This lead to exceptions when running sopel with python3 because
asynchat.handle_read expects byte objects.

This commit fixes sopel-irc#937.

* docs: Majorly overhaul organization and format

* Release 6.2.0

* Release 6.2.1

* dice: Allow comma delimiter

Closes sopel-irc#998

* adminchannel: Remove totally useless commands

Also add error messages to the somewhat useful ones

* Make it a bit harder to run into the LC_ALL thing

This behavior is stupid. Respecting LC_ALL, or anything else for that
matter, over the encoding fucking noted in the fucking file is a bad
decision, and someone should feel bad. I don't know why it makes things
break in the specific and bizarre way it does, but it does, and there's
no possible good reason for it.

Closes sopel-irc#984. Fuck.

* Escape nick before replacing it in regex

Resolves sopel-irc#1004

* [weather] Fix YQL woeid lookup

Handles an edge case that neither of the PRs handled

Fixes sopel-irc#1006
Closes sopel-irc#1007, sopel-irc#1012

* CONTRIBUTING: Let's drop the [brackets] thing and do what everyone else does

No point in being different from any other FOSS project out there.

* contrib/rpm: willie->sopel

* CONTRIBUTING: Update coding/future import guidelines

`# coding=utf-8` is now the standard in Sopel & supports windows. The future import now conforms with the flake8 future imports (also conforms with @embolalia's formatting passes a bit back)

* web: make web.py into a requests comaptibility layer

Since web is deprecated and everyone should switch to requests,
the first step is to make web.py a requests comaptibility layer.

When web.py was new, requests was not ripe enough to use in Sopel.

But now it's time to switch to requests like the rest of the python
echo-system. web.py is no more.

* find_updates: switch from web.py to requests

* web: Fix typo

This is why we have flake8 ;)

* url: port to requests

Now that web.py is deprecated, we can port url.py to requests.

Originally from pull request sopel-irc#988, committed here with minor bugfixes
and modified commit message.

* translate: port to requests

* movie: port to requests

* xkcd: port to requests

* Track the channel topic

* Improve locale stupidity checking

Thanks to @elad661's comment on b73fc6a

* url: handle capitalized URLs

Trigger rules are case-insensitive regexes, so the auto title responder
will be triggered even for capitalized URLs such as "Http://google.com"
(which can happen, for example, when a mobile device attempts to
auto-capitalize the beginning of a sentence).  Match URLs case
insensitively for title lookup purposes and add error handling in case
no URLs could be extracted from the match.

* core: Tweak rate limiting to be more effective

This doesn't solve the issue, but it should make it slightly less
critical. sopel-irc#952

* reddit: fetch posts by submission_id

Previously, the reddit module fetched posts by the full URL of the post.
This led to RedirectExceptions in some cases, for example when someone
links a naked reddit.com URL instead of www.reddit.com.  Instead, match
only the post ID and pass it to get_submission.

* Release 6.3.0

* Don't warn about non-UTF8 locales when running on Python 2

Python 2 doesn't change string behavior according to the locale env,
that's a py3 specific weirdness.

Also, reword the error message to better explain the issue to the user.

* Fix apparent typo in host_blocks initialization

* Added missing import to xkcd.py

* core: Fix print in handle_error when reaching the exception limit

Fixes issue sopel-irc#1025

* trigger: Fix target for QUIT events

This was fun to debug! Basically, Soepl encountered an exception
when removing unknown users when they QUIT. While this shouldn't
happen, it should still be handled gracefully.

Since it was an exception, Sopel's response was to try and send
the exception line to the channel (sender) the message came from, but
QUIT events don't come from channels (or users by PRIVMSG)!

Since QUIT was not special-cased, the naive assumption that
the first argument is the "sender" was used, and when Sopel
tried to send the exception line to the "sender", and the sender
had a space in it, this would lead to spam if a user exists with a nick
that is identical to the first word in the QUIT message. Ouch.

The fix special-cases QUIT in pretrigger to never have a "sender".
I also added a test to make sure we parse QUIT correctly.

This solves issue sopel-irc#1026.

* core: Never try to send an exception line when sender is None

Just in case.

* Make sure we're working with UTF8 string

Depending on the URL, response.iter_content() in Python 2/3 will return either:
- `type 'unicode'`/`class 'str'` (for "plain" HTML)
- `type 'str'`/`class 'bytes'` (for binary streams, like file URLs)

To distinguish between the two situations we're checking if we got string or
bytes, and proceed accordingly.

This also fixes sopel-irc#1021

* [doc] unify grammatical number of `@commands` example

It seems there is no `@command` decorator. 

At any rate, examples for `@commands` should use the same (and correct) grammatical number.

* Release 6.3.1

* FIX: Private BZ's - AttributeError: 'NoneType'

* [calc] Remove .wa, as API now requires a key

Will be moved to an external module that supports the new API

* search: Remove ad URL results

DDG changed their HTML output slightly and that threw us off, this *should* fix the r.search.yahoo.com URLs that .g was returning.

* Fix issue sopel-irc#1048

* fix .set command for non filename attributes

* Fix loading/reloading modules that share the name of the bot owner

* Typo correction

deamon -> daemon

Squashed into a single commit.

* Fix config loading in some edge cases

Fixes sopel-irc#999

Usually where try/except wouldn't catch NoOptionError, happens when running tests in specific environments.

* add groupdict function to triggers (sopel-irc#1061)

* Add IRCv3 extended-join tests

* Add regular join test

* Replace e.message with str(e), e.message has been deprecated since python 2.6

* Fix nickname examples

help_prefix shouldn't replace the first character if it's a nickname example.

* Fix syntax error

* weather: fix location yql query

Resolves sopel-irc#1050 and sopel-irc#1029

* Implement proper extended-join support

* search: tweak ad result blocking

A slight regex change to avoid yahoo ad results from duck duck go if it ends up using the HTML search

* irc: toggle error replies (sopel-irc#1071)

Adds config option to toggle Sopel replying directly to the error source.

* irc: always send exceptions to logger

We don't really need to check if `trigger.sender` is `None` when we're sending to the logger -- as long as `trigger` is defined, we'll be fine.

This just ensures that the `logging_channel` will always get the exception messages. Also pre-formats the message using format because it's more clear what's going on this way.

* Create suppress-warnings.py

Can be dropped into ~/.ipython/profile_default/startup/ to suppress the DeprecationWarnings you get when starting Sopel with iPython enabled

* run_script: if argv is specified, use it

* [announce] Confirm when all announces have been sent (sopel-irc#1044)

* Add global and channel rate limits (sopel-irc#1065)

* Add global and channel rate limits

* Default user rate and compatibility with jenni modules

* Fix critical keyerror bug in rate limiting

* Simplify syntax for @Rate() decorator and update docs

* Don't reset function timer during cooldown

* fix channel time diff variable

* fix indentation in bot.py

* weather: catch empty forecast results (sopel-irc#1077)

e.g. when the user enters a continent for the location.

* irc: treat error in connect as a disconnect (sopel-irc#845)

* irc: test suite enhancement

Comes with some tweaks to support tests
Daemonizes the ping and timeout threads (they should have been in the first place)

* coretasks: prevent KeyError when untracked user leaves

Fixes sopel-irc#1005

* web: fix header bleed (sopel-irc#1092)

Resolves sopel-irc#1091

* seen: be a smart-ass if people ask the bot about itself (sopel-irc#1086)

* module: ignore privilege requirement in privmsg (sopel-irc#1093)

Resolves sopel-irc#1087

* run_script: fix PID file checking logic when the file is empty

This fixes issue sopel-irc#1075

I don't know why the elif explicitly negated the previous codnition, it's
obviously not needed because else if already implies the previous
condition is False.

Also, whoever added the parenthesis there messed up the logic even further,
before they were there, it worked okay, even if the condition was a bit
more verbose than logically needed. Well, that's what you get when you
blindly try to make code conform to PEP8 without actually reading it.

* unicode_info: fallback if input is None (sopel-irc#958)

Resolves sopel-irc#957

* db: raise ValueError in unalias_nick to match documentation (sopel-irc#1102)

Documentation says that a ValueError should be raised if there is not at least one other nick in the group.

Resolves sopel-irc#1101

* Update .gitignore (sopel-irc#1110)

Renamed willie references to sopel
Added .DS_Store ignore

* coretasks: tweak topic tracking (sopel-irc#1111)

Support different implementation of topic update, RPL_TOPIC appears to only be sent to the user who actually updated the topic.

Resolves sopel-irc#1107

* meetbot/url: fix SSLError

The core.verify_ssl was not passed to url.find_title(), resulting in SSL errors on sites with invalid certs when `verify_ssl = False`

Slight refactor of @psachin's original code for backwards compatibility. Resolves sopel-irc#1113

* coretasks: add support for authentication on Quakenet (sopel-irc#1122)

Added the necessary lines for authenticating Sopel with Q. The implementation is almost exactly like AuthServ's. Added Q to core_section along with the other authentication methods, since it is now supported.

* coretasks: remove .lower() on auth_method

auth_method may be None if it's unset, forgot about that case when merging.

Resolves sopel-irc#1124

* setup: tweak requirements

Remove unsupported requires statement in setup.py
Pin requests dependency to 2.10.0 as 2.11.0 introduced a breaking change against the url.py module

* sopel/trigger.py: fix intent_regex

* url: make find_title more robust

Previously, each 512-byte chunk is prone to decoding mishap when a UTF-8 sequence is incomplete. Now we decode all of content at once, ignoring errors.

The old problem appears reliably for pages with many high codepoints:

~~~
<user> http://www3.nhk.or.jp/news/easy/k10010665021000/k10010665021000.html
<bot-old> [ NEWS WEB EASY|������������人���� ] - www3.nhk.or.jp
~~~

* [reddit] Change NSFW tag to SPOILERS for some subs

Hard-coded rather than configured, since in theory the same list should
apply to everyone, and we should merge in new ones. That and effort.

* setup: Be more flexible about requests version

* Release 6.4.0

* Notify if Bugzilla is private (sopel-irc#1115)

Although the primary error no longer exist, but the bot shows nothing if
the bugzilla has invalid alias, invaid id or if it has no valid
permission to access the bug. The logs should show warnings such as,

  WARNING:sopel.modules.bugzilla:Bugzilla error: NotFound <- (Invalid ID)
  WARNING:sopel.modules.bugzilla:Bugzilla error: NotPermitted <- (No permission)

This patch should notify about those errors.

Closes-Bug: sopel-irc#1112

Signed-off-by: Sachin Patil <[email protected]>

* Lint imports (sopel-irc#1085)

After realizing I'd left a dead import in calc.py after removing the .wa command,
I decided to go through and clean up any other imports that didn't appear to be in
use any more.

* Fixed missing `verify_ssl` param

- `verify_ssl` param was missing in few function calls

Closes-Bug: sopel-irc#1118

Signed-off-by: Sachin Patil <[email protected]>

* Add a decorator for url handling

Closes sopel-irc#761. Also add xkcd url handling as a demo.

* Add docstring for url decorator

* Create a gist with the command list

Closes sopel-irc#1105
Closes sopel-irc#1080

* Cache help gist location

* Use custom user agent for title requests

* Add Travis badge

* Increase timeout for DB locked error

This doesn't fix sopel-irc#736, but should at least make it less common

* Fix CI

* Release 6.5.0

* [weather] Use help_prefix in hint text when no location given

* Add a pronouns module

If witch-house/pronoun.is#40 gets merged, it's
probably worth porting to use that, since there are a *lot* of pronoun
sets.

Yes, this should probably support other languages. Sopel's i18n is
horrible and I know it.

* Fix asking for another user's pronouns

* Be a bit less snarky when asked for the bot's pronouns

But only a little

* [etymology] unescape all known HTML entities

Replace bespoke implementation of unescape() with stdlib tools; fix sopel-irc#1153.

* Fixes for pronouns.py

Fixes setpronouns error on lack of trigger.group(2), fixes autocomplete of nicks with a space so that it's stripped out automatically, fixes that it will say the wrong username if you request someone else's pronouns.

* Fixes ConnectionError

url.find_title() throws ConnectionError when hostname/IPaddress is not
readable thereby fails to read title

Sample error
```
15:11:05 psachin:     https://10.65.177.15
15:11:09 BB-8:        requests.exceptions.ConnectionError: HTTPSConnectionPool(host='10.65.177.15', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7feb41b6a2e8>: Failed to establish a new connection: [Errno 113] No route to host',)) (file "/home/tss/virtualenvs/sopel/lib64/python3.5/site-packages/requests/adapters.py", line 487, in send)
```

* Update web.py

fix blank User-Agent, if a custom user-agent is set for web.get()

* Use a common user-agent to get the proper results from DDG

* Update search.py

Hmm maybe single quotes would be better.

* fix some missed stuff

* Missed one more header copy.  Hopefully last one.

* Fix typo

* Remove duplicate item in triggerable tupe check

* Exclude File links from regex matching

Fix sopel-irc#1182

* Added default value to numbered_result

Added missing default value of "True" for "verify_ssl" parameter on "number_result".

* IP example

Fixed broken IP module example

* Fix API urls for Bank of Canada and BitcoinAverage

* Upper/lowercase shouldn't matter for tell module

* Release 6.5.1

* weather: update from deprecated sopel.web to requests

* safety module - catch exception on urllib/parse

* Fix reddit module

* Actually fix reddit

* [ip] Fix example/test (Google Inc. => Google LLC)

Google changed to an LLC, and updated its AS information, which broke
the test assertion.

Changes cherry-picked from sopel-irc#1250 and reworded.

* Update ignored files for tests

Ignore movie.py module because it requires an API key (and will probably
be moved out of core anyway).

Fix ignores for entry script and ipython module (which were still using
the old "willie" name and therefore weren't ignored). This also allows
removing the command-line ignore from the Travis build script.
  • Loading branch information
kwaaak authored Mar 22, 2018
1 parent f81e777 commit 7c433ca
Show file tree
Hide file tree
Showing 97 changed files with 2,869 additions and 1,668 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ MANIFEST
doc/build/*
logs/*
tests
willie.wiki/*
willie.egg-info/*
sopel.wiki/*
sopel.egg-info/*
*.db
*.pyc
*.pyo
Expand All @@ -25,3 +25,9 @@ willie.egg-info/*
.settings
.project
.pydevproject

.cache
.coverage

# macOS
*.DS_Store
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
language: python
python:
- "2.7"
- "3.3"
- "3.4"
git:
submodules: false
sudo: false # Enables running on faster infrastructure.
cache:
directories:
- $HOME/.cache/pip
addons:
apt:
packages:
- enchant
install:
- pip install -r requirements.txt -r dev-requirements.txt
- pip install coveralls
- pip install pep8
- pip install flake8
script:
- ./checkstyle.sh
- coverage run --source willie -m py.test .
- ./checkstyle.sh || true
- coverage run --source sopel -m py.test -v .
- coverage report --show-missing
after_success:
coveralls
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Submitting Issues
-----------------

When submitting issues to our
[issue tracker](https://github.com/embolalia/willie/issues), it's important
[issue tracker](https://github.com/sopel-irc/sopel/issues), it's important
that you do the following:

1. Describe your issue clearly and concisely.
2. Give Willie the .version command, and include the output in your issue.
3. Note the OS you're running Willie on, and how you installed Willie (via your
2. Give Sopel the .version command, and include the output in your issue.
3. Note the OS you're running Sopel on, and how you installed Sopel (via your
package manager, pip, setup.py install, or running straight from source)
4. Include relevant output from the log files in ~/.willie/logs.
4. Include relevant output from the log files in ~/.sopel/logs.

Committing Code
---------------
Expand All @@ -33,12 +33,12 @@ include your changes.
* Test your code before you commit. We don't have a formal testing plan in
place, but you should make sure your code works as promised before you commit.
* Make your commit messages clear and explicative. Our convention is to place
the name of the thing you're changing in [brackets] at the beginning of the
message: the module name for modules, [docs] for documentation files,
[coretasks] for coretasks.py, [db] for the database feature, and so on.
* Python files should always have `#coding: utf8` as the first line (or the
the name of the thing you're changing in at the beginning of the
message, followed by a colon: the module name for modules, docs for documentation files,
coretasks for coretasks.py, db for the database feature, and so on.
* Python files should always have `# coding=utf-8` as the first line (or the
second, if the first is `#!/usr/bin/env python`), and
`from __future__ import unicode_literals` as the first line after the module
`from __future__ import unicode_literals, absolute_import, print_function, division` as the first line after the module
docstring.

Issue Tags
Expand Down
6 changes: 3 additions & 3 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This file is dedicated to the people who want to list their names (or handles) for their contribution to this work. This project is a fork of "phenny" from http://inamidst.com/phenny/

This project's name is "Willie"
This project's name is "Sopel"

The original creator: Sean B. Palmer deserves the most credit for originally creating phenny. He has done an extraordinary job at producing this project, without him this fork would not exist.

Expand All @@ -19,7 +19,7 @@ Kenneth K. Sham (Kays)
Joel Friedly (jfriedly)
Samuel Clements (Ziaix)
Dimitri Molenaars (Tyrope)
Edward Powell (Embolalia)
Elsie Powell (Embolalia)
Elad Alfassa (elad661)
Lior Ramati (FireRogue)
Syfaro Warraw (Syfaro)
Syfaro Warraw (Syfaro)
121 changes: 121 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,124 @@
Changes between 6.5.0 and 6.5.1
===============================
Module changes:
* A module to track users' pronouns is added
* A few bug and regression fixes

Changes between 6.4.0 and 6.5.0
===============================
Module changes:
* xkcd module can now recognize xkcd.com urls
* SSL is verified for HTTP requests when not turned off in the config
* The command list is placed in a gist, to prevent flooding
* Title finding uses a custom user agent, to prevent issues with some sites

Core changes:
* Intent handling is improved

API changes:
* A @url decorator is added to simplify URL handling

Changes between 6.3.1 and 6.4.0
===============================
Module changes:
* For some subreddits where NSFW is used to mark spoilers, an appropriate tag is shown.
* .ddg avoids giving ad results.
* .wa is fully removed; a replacement can be found on PyPI as sopel-modules.wolfram

Core changes:
* Support for authenticating with Quakenet's Q is added.
* Errors from empty PID files are fixed.
* Issues with errors not being logged to the logging channel are fixed.
* Topic tracking is improved.
* extended-join is supported properly
* Error messages being reported to the triggering channel/user can be disabled.

API changes:
* Channel priliveges are no longer checked in private messages.
* Rate limiting can now be done by channel and globally, not just per user.

Changes between 6.3.0 and 6.3.1
===============================
Module changes:
* The xkcd module is working again
* Fix an issue causing unicode errors to show for some URLs when using Python 2 (but you should really switch to 3!)

Core Changes:
* Fix a bug in QUIT message parsing which caused certain users to be flooded with PMs if their nick matched the first word of a user's QUIT message (such as "disconnected" or "ping")
* Fix a rare python 3 incompatibility bug when quitting due to too many core errors.
* We no longer show a warning when detecting a non-unicode system locale if you're still using Python 2

Changes between 6.2.0 and 6.3.0
===============================
Module changes:
* Many modules ported to use requests package for stability and security.
* Weather location lookup is fixed.
* Confusing and unnecessary commands like .op were removed.
* Splitting of options in .choice is now more intuitive.
* Some edge cases in reddit post information were fixed.

Core changes:
* A check is added to warn about an obscure environment issue that can cause strange errors.
* Regex characters in the bot's nick no longer cause issues when a rule has the nickname added.
* Rate limiting is tweaked slightly, which should reduce the severity of the .commands flood bug until a proper solution is found.

API changes:
* The current topic of a channel is now available as the Channel object's topic attribute.
* sopel.web has been reworked as a wrapper around requests; it remains deprecated.

Changes between 6.1.1 and 6.2.0
===============================
Module changes:
* An error in excluding URLs from title display is fixed
* Case sensitivity issues in currency and dice commands are fixed
* Guards to require channel or private message are added to a number of commands, to avoid confusing errors
* A calculation bug in the countdown command is fixed.
* Misc minor bugfixes and improvements

Core changes:
* An occasional error with SSL connections on Python 3 is fixed
* On servers which support IRCv3 account extensions, the services account name can be used to authenticate the owner
* Numerous additional IRCv3 features are supported

API changes:
* bot.privileges is now deprecated in favor of bot.channels
* bot.channels contains more information about the channels the bot is in
* bot.users is now available with information about the users Sopel is aware of
* sopel.web is now deprecated in favor of the third-party `requests` library
* trigger.time is added with the current time, or server-time if the server supports it
* sopel.tools.events is now available as an enum of IRC numeric replies

Changes between 6.1.0 and 6.1.1
===============================
If you are updating from a pre-6.0 version (i.e. Willie), there are backwards-
incompatible changes which you should be aware of. See
http://willie.dftba.net/willie_6.html for more information.

Core changes:
* A regression which caused the config wizard to be unusable is fixed.

Changes between 6.0.0 and 6.1.0
===============================
If you are updating from a pre-6.0 version (i.e. Willie), there are backwards-
incompatible changes which you should be aware of. See
http://willie.dftba.net/willie_6.html for more information.

Module changes:
* A regression which prevented the URL safety detection from working is fixed.
* Issues with some special characters in DuckDuckGo searches are fixed
* lxml is no longer required by any modules, greatly simplifying the install process
* Misc minor bugfixes and improvements

Core changes:
* A regression which disabled blocking functionality is fixed
* Examples are no longer mangled by the .help command, and show the correct prefix
* The listing from .commands is now separated by module
* Issues with reloading folder modules are fixed

API changes:
* ListAttribute configs can be set to a list or set, with the same effect
* The configure method of validated config attributes now takes the parent config and section name

Changes between 5.5.1 and 6.0.0
===============================
This release contains backwards-incompatible changes. See
Expand Down
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|version| |downloads| |license| |issues| |forks| |stars| |ages| |works| |badges|
|version| |downloads| |license| |build| |issues| |forks| |stars| |ages| |works| |badges|

Introduction
------------
Expand All @@ -12,7 +12,7 @@ Installation
Latest stable release
=====================
If you're on Arch, the easiest way to install is through your package
manager. The package is named ``sopel`` in AUR. On other
manager. The package is named ``sopel`` in [community] repository. On other
distros, and pretty much any operating system you can run Python on, you can
install `pip <https://pypi.python.org/pypi/pip/>`_, and do ``pip install
sopel``. Failing all that, you can download the latest tarball from
Expand Down Expand Up @@ -69,6 +69,8 @@ Join us in `#sopel <irc://irc.freenode.net/#sopel>`_ on Freenode.
:target: https://pypi.python.org/pypi/sopel
.. |license| image:: https://img.shields.io/pypi/l/sopel.svg
:target: https://github.com/sopel-irc/sopel/blob/master/COPYING
.. |build| image:: https://travis-ci.org/sopel-irc/sopel.svg?branch=master
:target: https://travis-ci.org/sopel-irc/sopel
.. |issues| image:: https://img.shields.io/github/issues/sopel-irc/sopel.svg
:target: https://github.com/sopel-irc/sopel/issues
.. |forks| image:: https://img.shields.io/github/forks/sopel-irc/sopel.svg
Expand All @@ -77,4 +79,4 @@ Join us in `#sopel <irc://irc.freenode.net/#sopel>`_ on Freenode.
:target: https://github.com/sopel-irc/sopel/stargazers
.. |ages| image:: https://img.shields.io/badge/ages-12%2B-green.svg
.. |works| image:: https://img.shields.io/badge/works-usually-yellow.svg
.. |badges| image:: https://img.shields.io/badge/badges-9-green.svg
.. |badges| image:: https://img.shields.io/badge/badges-10-green.svg
38 changes: 10 additions & 28 deletions checkstyle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ find_source_files() {
files=$(find_source_files)
# These are acceptable (for now). 128 and 127 should be removed eventually.
ignore='--ignore=E501,E128,E127'
# These are forbidding certain __future__ imports. The plugin has errors both
# for having and not having them; we want to always have them, so we ignore
# the having them errors and keep the not having them errors.
ignore=$ignore',FI50,FI51,FI52,FI53,FI54,FI55'
# F12 is with_statement, which is already in 2.7. F15 requires and F55 forbids
# generator_stop, which should probably be made mandatory at some point.
ignore=$ignore',F12,F15,F55'
# These are rules that are relatively new or have had their definitions tweaked
# recently, so we'll forgive them until versions of PEP8 in various developers'
#distros are updated
# distros are updated
ignore=$ignore',E265,E713,E111,E113,E402,E731'
# For now, go through all the checking stages and only die at the end
exit_code=0

if ! pep8 $ignore --filename=*.py $(find_source_files); then
echo "ERROR: PEP8 does not pass."
if ! flake8 $ignore --filename=*.py $(find_source_files); then
echo "ERROR: flake8 does not pass."
exit_code=1
fi

Expand Down Expand Up @@ -49,29 +56,4 @@ if $fail_py3_unicode; then
exit_code=1
fi

check_future () {
fail_unicode_literals=false
for file in $files; do
if ! grep -L "from __future__ import $1" $file; then
fail_unicode_literals=true
fi
done
if $fail_unicode_literals; then
if $2; then
echo "ERROR: Above files do not have $1 import."
exit_code=1
else
echo "WARNING: Above files do not have $1 import."
fi
fi
}
for mandatory in unicode_literals
do
check_future $mandatory true
done
for optional in division print_function absolute_import
do
check_future $optional false
done

exit $exit_code
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file lists files which should be ignored by pytest
collect_ignore = ["setup.py", "willie.py", "willie/modules/ipython.py"]
collect_ignore = ["setup.py", "sopel.py", "sopel/modules/ipython.py", "sopel/modules/movie.py"]
12 changes: 6 additions & 6 deletions contrib/README
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
This folder contains willie.service and willie.cfg designed to be distributed by 3rd party distrubtions such as Fedora Project or Arch Linux.
This folder contains sopel.service and sopel.cfg designed to be distributed by 3rd party distrubtions such as Fedora Project or Arch Linux.

willie.cfg is a default configuration file for willie, that assumes the OS is new enough to have /run and /usr/lib/tmpfiles.d
sopel.cfg is a default configuration file for sopel, that assumes the OS is new enough to have /run and /usr/lib/tmpfiles.d

willie.service is a systemd service file that assumes you are using a rather recent Willie and has no multiple instance support (TODO). It also assumes that the system has a special user named willie designated for running the bot and this user has access to /run/willie (should be setup by willie.conf in /usr/lib/tmpfiles.d), /var/log/willie and /var/lib/willie
sopel.service is a systemd service file that assumes you are using a rather recent Willie and has no multiple instance support (TODO). It also assumes that the system has a special user named sopel designated for running the bot and this user has access to /run/sopel (should be setup by sopel.conf in /usr/lib/tmpfiles.d), /var/log/sopel and /var/lib/sopel

Default installation paths:
willie.cfg /etc
willie.conf /usr/lib/tmpfiles.d
willie.service /usr/lib/systemd/system
sopel.cfg /etc
sopel.conf /usr/lib/tmpfiles.d
sopel.service /usr/lib/systemd/system
14 changes: 7 additions & 7 deletions contrib/rpm/makerpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
if len(sys.argv)>1:
build = sys.argv[1]
print 'Generating archive...'
f = open('willie-%s.tar' % version, 'w')
repo.archive(f, prefix='willie-%s/' % version)
f = open('sopel-%s.tar' % version, 'w')
repo.archive(f, prefix='sopel-%s/' % version)
f.close()

print 'Building spec file..'
spec_in = open('willie.spec.in', 'r')
spec_out = open('willie.spec', 'w')
spec_in = open('sopel.spec.in', 'r')
spec_out = open('sopel.spec', 'w')
for line in spec_in:
newline = line.replace('#GITTAG#', head_hash)
newline = newline.replace('#BUILD#', build)
Expand All @@ -32,12 +32,12 @@
spec_in.close()
spec_out.close()
print 'Starting rpmbuild...'
cmdline = 'rpmbuild --define="%_specdir @wd@" --define="%_rpmdir @wd@" --define="%_srcrpmdir @wd@" --define="%_sourcedir @wd@" -ba willie.spec'.replace('@wd@', os.getcwd())
cmdline = 'rpmbuild --define="%_specdir @wd@" --define="%_rpmdir @wd@" --define="%_srcrpmdir @wd@" --define="%_sourcedir @wd@" -ba sopel.spec'.replace('@wd@', os.getcwd())
p = call(cmdline, shell=True)
for item in os.listdir('noarch'):
os.rename(os.path.join('noarch', item), item)
print 'Cleaning...'
os.removedirs('noarch')
os.remove('willie.spec')
os.remove('willie-%s.tar' % version)
os.remove('sopel.spec')
os.remove('sopel-%s.tar' % version)
print 'Done'
Loading

0 comments on commit 7c433ca

Please sign in to comment.