jenkins-bot has submitted this change and it was merged.
Change subject: Fix dependency installation during setup.py install
......................................................................
Fix dependency installation during setup.py install
The pwb_install function introduced in Idd1794481b4b57c001fed8df0bf8178bb5eccc30
did not take into account the introspection that happens in install.install.run:
depending on the caller, it changes behavior - in this case to the *incorrect*
behavior. We now explicitly call the right backend function.
See also: https://github.com/jaraco/setuptools/blob/master/setuptools/command/install…
Bug: 56386
Change-Id: Ib27fd645c51f0fd7a903f7118c04f64f96501f89
---
M setup.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/setup.py b/setup.py
index b022d2f..620ee2f 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@
`generate_user_files.py` after installing the package.
"""
def run(self):
- install.install.run(self)
+ install.install.do_egg_install(self)
import subprocess
python = sys.executable
python = python.replace("pythonw.exe", "python.exe") # for Windows
--
To view, visit https://gerrit.wikimedia.org/r/92765
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib27fd645c51f0fd7a903f7118c04f64f96501f89
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: pwb.py: mock pywikibot if it is not available
......................................................................
pwb.py: mock pywikibot if it is not available
run_python_file() can only be called after pywikibot has been loaded.
However, it is impossible to load pywikibot if a user-config.py is
not yet available. We therefore now mock pywikibot, by creating
and object (lambda function) with argvu attribute.
Bug: 56324
Change-Id: If0a1e08e29da3a3780b0b9300fcad140ae7087c5
---
M pwb.py
1 file changed, 19 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index 08e586e..1c49181 100644
--- a/pwb.py
+++ b/pwb.py
@@ -23,6 +23,19 @@
import sys
+def tryimport_pwb():
+ # See if we can import pywikibot. If so, we need to patch pwb.argvu, too.
+ # If pywikibot is not available, we create a mock object to remove the
+ # need for if statements further on.
+ global pwb
+ try:
+ import pywikibot
+ pwb = pywikibot
+ except RuntimeError:
+ pwb = lambda: None
+ pwb.argvu = []
+
+
def run_python_file(filename, argv, argvu):
"""Run a python file as if it were the main program on the command line.
@@ -30,6 +43,8 @@
`args` is the argument array to present as sys.argv, as unicode strings.
"""
+ tryimport_pwb()
+
# Create a module to serve as __main__
old_main_mod = sys.modules['__main__']
main_mod = imp.new_module('__main__')
@@ -88,13 +103,15 @@
if not os.path.exists(user_config_path):
print "NOTE:", user_config_path, "was not found!"
print "Please follow the prompts to create it:"
- run_python_file('generate_user_files.py', ['generate_user_files.py'])
+ path = 'generate_user_files.py'
+ run_python_file(path, [path], [path.decode('ascii')])
-import pywikibot as pwb
if len(sys.argv) > 1:
+ tryimport_pwb()
fn = sys.argv[1]
argv = sys.argv[1:]
argvu = pwb.argvu[1:]
+ print argvu
if not os.path.exists(fn):
testpath = os.path.join(os.path.split(__file__)[0], 'scripts', fn)
--
To view, visit https://gerrit.wikimedia.org/r/92569
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If0a1e08e29da3a3780b0b9300fcad140ae7087c5
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: Correcting timestamp request in loading deleted revisions
......................................................................
Correcting timestamp request in loading deleted revisions
I checked it and it worked correctly, you can test it by adding "print self._deletedRevs" before line 1325
Bug: 54546
Change-Id: I054097840cc6d69da107425868f92357cf12ce50
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index cb06350..78ce1d0 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1324,8 +1324,8 @@
if hasattr(self, "_deletedRevs"):
if timestamp in self._deletedRevs and (
(not retrieveText)
- or "content" in self._deletedRevs["timestamp"]):
- return self._deletedRevs["timestamp"]
+ or "content" in self._deletedRevs[timestamp]):
+ return self._deletedRevs[timestamp]
for item in self.site.deletedrevs(self, start=timestamp,
get_text=retrieveText, total=1):
# should only be one item with one revision
--
To view, visit https://gerrit.wikimedia.org/r/92255
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I054097840cc6d69da107425868f92357cf12ce50
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: .svnprops file for importing to tortoiseSVN
......................................................................
.svnprops file for importing to tortoiseSVN
Change-Id: I18fdefb0ca3acce25d8c37fd676839a543e54bf5
---
A .svnprops
1 file changed, 0 insertions(+), 0 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/.svnprops b/.svnprops
new file mode 100644
index 0000000..e5fa0ed
--- /dev/null
+++ b/.svnprops
Binary files differ
--
To view, visit https://gerrit.wikimedia.org/r/92187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I18fdefb0ca3acce25d8c37fd676839a543e54bf5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot