sqlobject-cvs Mailing List for SQLObject (Page 21)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(9) |
Apr
(74) |
May
(29) |
Jun
(16) |
Jul
(28) |
Aug
(10) |
Sep
(57) |
Oct
(9) |
Nov
(29) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(7) |
Feb
(14) |
Mar
(6) |
Apr
(3) |
May
(12) |
Jun
(34) |
Jul
(9) |
Aug
(29) |
Sep
(22) |
Oct
(2) |
Nov
(15) |
Dec
(52) |
| 2005 |
Jan
(47) |
Feb
(78) |
Mar
(14) |
Apr
(35) |
May
(33) |
Jun
(16) |
Jul
(26) |
Aug
(63) |
Sep
(40) |
Oct
(96) |
Nov
(96) |
Dec
(123) |
| 2006 |
Jan
(159) |
Feb
(144) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(48) |
Jul
(16) |
Aug
(64) |
Sep
(87) |
Oct
(92) |
Nov
(56) |
Dec
(76) |
| 2007 |
Jan
(94) |
Feb
(103) |
Mar
(126) |
Apr
(123) |
May
(85) |
Jun
(11) |
Jul
(130) |
Aug
(47) |
Sep
(65) |
Oct
(70) |
Nov
(12) |
Dec
(11) |
| 2008 |
Jan
(30) |
Feb
(55) |
Mar
(88) |
Apr
(20) |
May
(50) |
Jun
|
Jul
(38) |
Aug
(1) |
Sep
(9) |
Oct
(5) |
Nov
(6) |
Dec
(39) |
| 2009 |
Jan
(8) |
Feb
(16) |
Mar
(3) |
Apr
(33) |
May
(44) |
Jun
(1) |
Jul
(10) |
Aug
(33) |
Sep
(74) |
Oct
(22) |
Nov
|
Dec
(15) |
| 2010 |
Jan
(28) |
Feb
(22) |
Mar
(46) |
Apr
(29) |
May
(1) |
Jun
(1) |
Jul
(27) |
Aug
(8) |
Sep
(5) |
Oct
(33) |
Nov
(24) |
Dec
(41) |
| 2011 |
Jan
(4) |
Feb
(12) |
Mar
(35) |
Apr
(29) |
May
(19) |
Jun
(16) |
Jul
(32) |
Aug
(25) |
Sep
(5) |
Oct
(11) |
Nov
(21) |
Dec
(12) |
| 2012 |
Jan
(3) |
Feb
(4) |
Mar
(20) |
Apr
(4) |
May
(25) |
Jun
(13) |
Jul
|
Aug
|
Sep
(2) |
Oct
(25) |
Nov
(9) |
Dec
(1) |
| 2013 |
Jan
(6) |
Feb
(8) |
Mar
|
Apr
(10) |
May
(31) |
Jun
(7) |
Jul
(18) |
Aug
(33) |
Sep
(4) |
Oct
(16) |
Nov
|
Dec
(27) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(11) |
May
(39) |
Jun
(8) |
Jul
(11) |
Aug
(4) |
Sep
|
Oct
(27) |
Nov
|
Dec
(71) |
| 2015 |
Jan
(17) |
Feb
(47) |
Mar
(33) |
Apr
|
May
|
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2016 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
|
May
(12) |
Jun
(7) |
Jul
(9) |
Aug
(31) |
Sep
(8) |
Oct
(3) |
Nov
(15) |
Dec
(1) |
| 2017 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(8) |
May
(10) |
Jun
(4) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(4) |
Dec
(5) |
| 2018 |
Jan
(2) |
Feb
(8) |
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
(1) |
Feb
(16) |
Mar
(1) |
Apr
(3) |
May
(5) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
|
| 2024 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(9) |
| 2025 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
|
From: Oleg B. <no...@so...> - 2014-07-30 17:26:01
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, 1.5 has been updated
via 8f1fb3a97262be65d071a9260ba269dd9fe035fb (commit)
from 77aa961b1eecc8d48939de28154935a003debd62 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
setup.cfg | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 4b4e5d3..c891669 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,7 +7,7 @@ command_packages = buildutils.pudge_command,
[egg_info]
tag_build = dev
-tag_svn_revision = true
+tag_date = true
[pudge]
theme = pythonpaste.org
hooks/post-receive
--
SQLObject development repository
|
|
From: Oleg B. <no...@so...> - 2014-07-29 15:12:46
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SQLObject development repository".
The branch, master has been updated
via d371bdfc0f39a0b86cab3047db6b23c24d3e1d68 (commit)
via 63e5cd3267699c59ae84c865cc7f3679a7d4d633 (commit)
via 4d2ba785b0e531fc9f9dffe1bd81311b96d959ce (commit)
from c89d513098a99a5f680e403e839bb4ab7f4511fa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d371bdfc0f39a0b86cab3047db6b23c24d3e1d68
Author: Oleg Broytman <ph...@ph...>
Date: Tue Jul 29 19:09:35 2014 +0400
Update docs for git
Development was switched from Subversion to git.
commit 63e5cd3267699c59ae84c865cc7f3679a7d4d633
Author: Oleg Broytman <ph...@ph...>
Date: Tue Jul 29 19:07:58 2014 +0400
Change git URLs for FormEncode
FormEncode development switched to git long ago.
commit 4d2ba785b0e531fc9f9dffe1bd81311b96d959ce
Author: Oleg Broytman <ph...@ph...>
Date: Tue Jul 29 19:06:52 2014 +0400
Change URLs for setuptools/easy_install
-----------------------------------------------------------------------
Summary of changes:
docs/DeveloperGuide.txt | 12 ++++++------
docs/News.txt | 13 +++++++++----
docs/community.txt | 14 ++++++++------
docs/download.txt | 23 ++++++++++-------------
docs/links.txt | 7 ++++---
5 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/docs/DeveloperGuide.txt b/docs/DeveloperGuide.txt
index 7c76bdb..65e541e 100644
--- a/docs/DeveloperGuide.txt
+++ b/docs/DeveloperGuide.txt
@@ -15,21 +15,21 @@ as things come up.
Development Installation
========================
-First install `FormEncode <http://formencode.org>`_::
+First install `FormEncode <http://www.formencode.org/en/latest/download.html>`_::
- $ svn co http://svn.colorstudy.com/FormEncode/trunk FormEncode
- $ cd FormEncode
+ $ git clone git://github.com/formencode/formencode.git
+ $ cd formencode
$ sudo python setup.py develop
Then do the same for SQLObject::
- $ svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject
- $ cd SQLObject
+ $ git clone git clone git://git.code.sf.net/p/sqlobject/sqlobject
+ $ cd sqlobject
$ sudo python setup.py develop
Voila! The packages are globally installed, but the files from the
checkout were not copied into ``site-packages``. See `setuptools
-<http://peak.telecommunity.com/DevCenter/setuptools>`_ for more.
+<http://pythonhosted.org/setuptools/>`_ for more.
Style Guide
===========
diff --git a/docs/News.txt b/docs/News.txt
index ac45879..7d7c37e 100644
--- a/docs/News.txt
+++ b/docs/News.txt
@@ -7,11 +7,11 @@ News
.. _start:
-SQLObject (trunk)
-=================
+SQLObject 2.0.0 (master)
+========================
-SQLObject 2.0.0
-===============
+Features & Interface
+--------------------
* DateTimeCol and TimeCol can read and write values with microseconds.
@@ -19,6 +19,11 @@ SQLObject 2.0.0
with microseconds cannot be read back from SQLite databases (and
perhaps other backends) with versions of SQLObject older than 1.7.
+Development
+-----------
+
+* Development was switched from Subversion to git.
+
SQLObject 1.7.0
===============
diff --git a/docs/community.txt b/docs/community.txt
index 52ea7ce..8d9758b 100644
--- a/docs/community.txt
+++ b/docs/community.txt
@@ -3,20 +3,22 @@ SQLObject Community
SQLObject questions and discussion happens on the `sqlobject-discuss
mailing list
-<http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_.
+<https://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_.
`Gmane <http://www.gmane.org/>`_ also has the list in
gmane.comp.python.sqlobject accessible by
`HTTP <http://news.gmane.org/gmane.comp.python.sqlobject>`_,
`HTTP (blog format) <http://blog.gmane.org/gmane.comp.python.sqlobject>`_
and `News <news://news.gmane.org/gmane.comp.python.sqlobject>`_.
-Bugs should be submitted to the `bug tracker
-<http://sourceforge.net/tracker/?group_id=74338&atid=540672>`_, and
+Bugs should be submitted to the `bug tracker at SourceForge
+<http://sourceforge.net/p/sqlobject/bugs/>`_ or `GitHub
+<https://github.com/sqlobject/sqlobject/issues>`_, and
`patches to the patch tracker
-<http://sourceforge.net/tracker/?group_id=74338&atid=540674>`_.
+<http://sourceforge.net/p/sqlobject/patches/>`_ (or send pull requests
+at GitHub).
-Development takes place in the `subversion repository
-<download.html#repository>`_. There are `development docs`_. If you are
+Development takes place in the `git repositories
+<download.html#repositories>`_. There are `development docs`_. If you are
interested in contributing you should read the `Developer Guide
<DeveloperGuide.html>`_.
diff --git a/docs/download.txt b/docs/download.txt
index 2b5b7bd..bb1fc22 100644
--- a/docs/download.txt
+++ b/docs/download.txt
@@ -4,7 +4,7 @@ Download SQLObject
The latest releases are always available on the `Python Package Index
<http://pypi.python.org/pypi/SQLObject>`_, and is installable
with `easy_install
-<http://peak.telecommunity.com/DevCenter/EasyInstall>`_.
+<http://pythonhosted.org/setuptools/easy_install.html>`_.
You can install the latest release with::
@@ -21,8 +21,7 @@ You can install the latest bug fixing branch with::
If you want to require a specific revision (because, for instance, you
need a bugfix that hasn't appeared in a release), you can put this in
your `setuptools
-<http://peak.telecommunity.com/DevCenter/setuptools>`_ using
-``setup.py`` file::
+<http://pythonhosted.org/setuptools/>`_ using ``setup.py`` file::
setup(...
install_requires=["SQLObject==bugfix,>=0.7.1dev-r1485"],
@@ -34,18 +33,16 @@ when you install ``SQLObject==bugfix`` you will be installing a
specific version, and "bugfix" is just a kind of label for a way of
acquiring the version (it points to a branch in the repository).
-Repository
-----------
+Repositories
+------------
-The SQLObject `Subversion <http://subversion.tigris.org/>`_ repository is located at http://svn.colorstudy.com/SQLObject/trunk
+The SQLObject `git <http://git-scm.com/>`_ repositories are located at
+http://sourceforge.net/p/sqlobject/_list/git and
+https://github.com/sqlobject
-If you are using a command-line Subversion client, you can check
-it out like::
-
- svn co http://svn.colorstudy.com/SQLObject/trunk SQLObject
-
-If you are on Windows you may want to use `TortoiseSVN
-<http://tortoisesvn.tigris.org/>`_.
+Before switching to git development was performed at the `Subversion
+<https://subversion.apache.org/>`_ repository that is still located at
+http://svn.colorstudy.com/SQLObject
.. image:: http://sflogo.sourceforge.net/sflogo.php?group_id=74338&type=10
:target: http://sourceforge.net/projects/sqlobject
diff --git a/docs/links.txt b/docs/links.txt
index 6e141f6..33018d5 100644
--- a/docs/links.txt
+++ b/docs/links.txt
@@ -1,9 +1,10 @@
SQLObject Links
===============
-If you have a link you'd like added to this page, please `submit a bug
-report with the link and title
-<http://sourceforge.net/tracker/?atid=540672&group_id=74338&func=browse>`_.
+If you have a link you'd like added to this page, please submit a bug
+report with the link and title at `bug tracker
+<http://sourceforge.net/p/sqlobject/bugs/>`_ or send pull requests at
+`GitHub <https://github.com/sqlobject/sqlobject>`_).
Articles and Documentation
--------------------------
hooks/post-receive
--
SQLObject development repository
|
|
From: <sub...@co...> - 2014-07-29 14:14:33
|
Author: phd Date: Tue Jul 29 08:14:25 2014 New Revision: 4763 Log: Development was switched to git. The repository is closed. Added: SQLObject/REPOSITORY-CLOSED.txt Added: SQLObject/REPOSITORY-CLOSED.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ SQLObject/REPOSITORY-CLOSED.txt Tue Jul 29 08:14:25 2014 (r4763) @@ -0,0 +1,8 @@ +Development of SQLObject was switched from Subversion to git. Consider +this repository closed. You can find new repositories at SourceForge: + + http://sourceforge.net/p/sqlobject/_list/git + +and GitHub: + + https://github.com/sqlobject |
|
From: <sub...@co...> - 2014-07-29 14:13:32
|
Author: phd Date: Tue Jul 29 08:13:23 2014 New Revision: 4762 Log: Change eol-style to native Modified: SQLObject/branches/0.6.1-oracle/README.txt (props changed) |
|
From: <sub...@co...> - 2014-07-22 12:14:07
|
Author: phd Date: Tue Jul 22 06:14:00 2014 New Revision: 4760 Log: Merge revision 4759 from branch 1.7: update News Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Tue Jul 22 06:13:13 2014 (r4759) +++ SQLObject/trunk/docs/News.txt Tue Jul 22 06:14:00 2014 (r4760) @@ -52,6 +52,9 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. +* Support for Python 2.5 is declared obsolete and will be removed + in the next release. + Minor features -------------- |
|
From: <sub...@co...> - 2014-07-22 12:13:22
|
Author: phd Date: Tue Jul 22 06:13:13 2014 New Revision: 4759 Log: Merge revision 4715 from branch 1.6: update News Modified: SQLObject/branches/1.7/docs/News.txt Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Tue Jul 1 11:33:55 2014 (r4758) +++ SQLObject/branches/1.7/docs/News.txt Tue Jul 22 06:13:13 2014 (r4759) @@ -40,6 +40,9 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. +* Support for Python 2.5 is declared obsolete and will be removed + in the next release. + Minor features -------------- |
|
From: <sub...@co...> - 2014-07-01 17:34:04
|
Author: phd
Date: Tue Jul 1 11:33:55 2014
New Revision: 4758
Log:
SQLObject 1.7.0b1
Modified:
SQLObject/tags/1.7.0b1/README.txt
SQLObject/tags/1.7.0b1/setup.py
SQLObject/tags/1.7.0b1/sqlobject/__version__.py
Modified: SQLObject/tags/1.7.0b1/README.txt
==============================================================================
--- SQLObject/tags/1.7.0b1/README.txt Tue Jul 1 11:29:21 2014 (r4757)
+++ SQLObject/tags/1.7.0b1/README.txt Tue Jul 1 11:33:55 2014 (r4758)
@@ -1,5 +1,5 @@
-SQLObject 1.7
-=============
+SQLObject 1.7.0b1
+=================
Thanks for looking at SQLObject. SQLObject is an object-relational
mapper, i.e., a library that will wrap your database tables in Python
Modified: SQLObject/tags/1.7.0b1/setup.py
==============================================================================
--- SQLObject/tags/1.7.0b1/setup.py Tue Jul 1 11:29:21 2014 (r4757)
+++ SQLObject/tags/1.7.0b1/setup.py Tue Jul 1 11:33:55 2014 (r4758)
@@ -68,7 +68,7 @@
maintainer="Oleg Broytman",
maintainer_email="ph...@ph...",
url="http://sqlobject.org/",
- download_url="https://pypi.python.org/pypi/SQLObject/%s" % version,
+ download_url="https://pypi.python.org/pypi/SQLObject/%sdev-r4758" % version,
license="LGPL",
packages=["sqlobject"] + ['sqlobject.%s' % package for package in subpackages],
scripts=["scripts/sqlobject-admin", "scripts/sqlobject-convertOldURI"],
Modified: SQLObject/tags/1.7.0b1/sqlobject/__version__.py
==============================================================================
--- SQLObject/tags/1.7.0b1/sqlobject/__version__.py Tue Jul 1 11:29:21 2014 (r4757)
+++ SQLObject/tags/1.7.0b1/sqlobject/__version__.py Tue Jul 1 11:33:55 2014 (r4758)
@@ -1,8 +1,8 @@
-version = '1.7'
+version = '1.7.0b1'
major = 1
minor = 7
micro = 0
-release_level = 'branch'
-serial = 0
+release_level = 'beta'
+serial = 1
version_info = (major, minor, micro, release_level, serial)
|
|
From: <sub...@co...> - 2014-07-01 17:29:30
|
Author: phd
Date: Tue Jul 1 11:29:21 2014
New Revision: 4757
Log:
Tagging 1.7.0b1
Added:
SQLObject/tags/1.7.0b1/
- copied from r4756, SQLObject/branches/1.7/
|
|
From: <sub...@co...> - 2014-06-29 14:26:37
|
Author: phd
Date: Sun Jun 29 08:26:29 2014
New Revision: 4756
Log:
Merge revision 4755 from branch 1.7: "upgrade" ez_setup to 5.3
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/ez_setup.py
Modified: SQLObject/trunk/docs/News.txt
==============================================================================
--- SQLObject/trunk/docs/News.txt Sun Jun 29 08:25:25 2014 (r4755)
+++ SQLObject/trunk/docs/News.txt Sun Jun 29 08:26:29 2014 (r4756)
@@ -34,7 +34,7 @@
Minor features
--------------
-* Upgrade ez_setup to 5.2.
+* Upgrade ez_setup to 5.3.
Bugfixes
--------
Modified: SQLObject/trunk/ez_setup.py
==============================================================================
--- SQLObject/trunk/ez_setup.py Sun Jun 29 08:25:25 2014 (r4755)
+++ SQLObject/trunk/ez_setup.py Sun Jun 29 08:26:29 2014 (r4756)
@@ -36,7 +36,7 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "5.2"
+DEFAULT_VERSION = "5.3"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
|
|
From: <sub...@co...> - 2014-06-29 14:25:34
|
Author: phd
Date: Sun Jun 29 08:25:25 2014
New Revision: 4755
Log:
"Upgrade" ez_setup to 5.3
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/ez_setup.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Thu Jun 26 07:56:30 2014 (r4754)
+++ SQLObject/branches/1.7/docs/News.txt Sun Jun 29 08:25:25 2014 (r4755)
@@ -22,7 +22,7 @@
Minor features
--------------
-* Upgrade ez_setup to 5.2.
+* Upgrade ez_setup to 5.3.
Bugfixes
--------
Modified: SQLObject/branches/1.7/ez_setup.py
==============================================================================
--- SQLObject/branches/1.7/ez_setup.py Thu Jun 26 07:56:30 2014 (r4754)
+++ SQLObject/branches/1.7/ez_setup.py Sun Jun 29 08:25:25 2014 (r4755)
@@ -36,7 +36,7 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "5.2"
+DEFAULT_VERSION = "5.3"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
|
|
From: <sub...@co...> - 2014-06-26 13:56:42
|
Author: phd
Date: Thu Jun 26 07:56:30 2014
New Revision: 4754
Log:
Merge revision 4753 from branch 1.7: "upgrade" ez_setup to 5.2
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/ez_setup.py
Modified: SQLObject/trunk/docs/News.txt
==============================================================================
--- SQLObject/trunk/docs/News.txt Thu Jun 26 07:55:28 2014 (r4753)
+++ SQLObject/trunk/docs/News.txt Thu Jun 26 07:56:30 2014 (r4754)
@@ -34,7 +34,7 @@
Minor features
--------------
-* Upgrade ez_setup to 5.0.
+* Upgrade ez_setup to 5.2.
Bugfixes
--------
Modified: SQLObject/trunk/ez_setup.py
==============================================================================
--- SQLObject/trunk/ez_setup.py Thu Jun 26 07:55:28 2014 (r4753)
+++ SQLObject/trunk/ez_setup.py Thu Jun 26 07:56:30 2014 (r4754)
@@ -36,7 +36,7 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "5.0"
+DEFAULT_VERSION = "5.2"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
|
|
From: <sub...@co...> - 2014-06-26 13:55:39
|
Author: phd
Date: Thu Jun 26 07:55:28 2014
New Revision: 4753
Log:
"Upgrade" ez_setup to 5.2
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/ez_setup.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Sat Jun 14 12:00:30 2014 (r4752)
+++ SQLObject/branches/1.7/docs/News.txt Thu Jun 26 07:55:28 2014 (r4753)
@@ -22,7 +22,7 @@
Minor features
--------------
-* Upgrade ez_setup to 5.0.
+* Upgrade ez_setup to 5.2.
Bugfixes
--------
Modified: SQLObject/branches/1.7/ez_setup.py
==============================================================================
--- SQLObject/branches/1.7/ez_setup.py Sat Jun 14 12:00:30 2014 (r4752)
+++ SQLObject/branches/1.7/ez_setup.py Thu Jun 26 07:55:28 2014 (r4753)
@@ -36,7 +36,7 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "5.0"
+DEFAULT_VERSION = "5.2"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
|
|
From: <sub...@co...> - 2014-06-14 18:00:36
|
Author: phd
Date: Sat Jun 14 12:00:30 2014
New Revision: 4752
Log:
Merge revision 4751 from branch 1.7: upgrade ez_setup to 5.0
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/ez_setup.py
Modified: SQLObject/trunk/docs/News.txt
==============================================================================
--- SQLObject/trunk/docs/News.txt Sat Jun 14 11:59:08 2014 (r4751)
+++ SQLObject/trunk/docs/News.txt Sat Jun 14 12:00:30 2014 (r4752)
@@ -34,7 +34,7 @@
Minor features
--------------
-* Upgrade ez_setup to 3.6.0.
+* Upgrade ez_setup to 5.0.
Bugfixes
--------
Modified: SQLObject/trunk/ez_setup.py
==============================================================================
--- SQLObject/trunk/ez_setup.py Sat Jun 14 11:59:08 2014 (r4751)
+++ SQLObject/trunk/ez_setup.py Sat Jun 14 12:00:30 2014 (r4752)
@@ -27,11 +27,16 @@
from distutils import log
try:
+ from urllib.request import urlopen
+except ImportError:
+ from urllib2 import urlopen
+
+try:
from site import USER_SITE
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "3.6"
+DEFAULT_VERSION = "5.0"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
@@ -64,17 +69,24 @@
raise IOError('Could not build the egg.')
-def get_zip_class():
+class ContextualZipFile(zipfile.ZipFile):
"""
Supplement ZipFile class to support context manager for Python 2.6
"""
- class ContextualZipFile(zipfile.ZipFile):
- def __enter__(self):
- return self
- def __exit__(self, type, value, traceback):
- self.close
- return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \
- ContextualZipFile
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, traceback):
+ self.close()
+
+ def __new__(cls, *args, **kwargs):
+ """
+ Construct a ZipFile or ContextualZipFile as appropriate
+ """
+ if hasattr(zipfile.ZipFile, '__exit__'):
+ return zipfile.ZipFile(*args, **kwargs)
+ return super(ContextualZipFile, cls).__new__(cls)
@contextlib.contextmanager
@@ -85,7 +97,7 @@
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
- with get_zip_class()(filename) as archive:
+ with ContextualZipFile(filename) as archive:
archive.extractall()
# going in the directory
@@ -183,14 +195,11 @@
if platform.system() != 'Windows':
return False
cmd = ['powershell', '-Command', 'echo test']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_powershell.viable = has_powershell
@@ -201,14 +210,11 @@
def has_curl():
cmd = ['curl', '--version']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_curl.viable = has_curl
@@ -219,14 +225,11 @@
def has_wget():
cmd = ['wget', '--version']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_wget.viable = has_wget
@@ -236,37 +239,28 @@
Use Python to download the file, even though it cannot authenticate the
connection.
"""
+ src = urlopen(url)
try:
- from urllib.request import urlopen
- except ImportError:
- from urllib2 import urlopen
- src = dst = None
- try:
- src = urlopen(url)
- # Read/write all in one block, so we don't create a corrupt file
- # if the download is interrupted.
+ # Read all the data in one block.
data = src.read()
- dst = open(target, "wb")
- dst.write(data)
finally:
- if src:
- src.close()
- if dst:
- dst.close()
+ src.close()
+
+ # Write all the data in one block to avoid creating a partial file.
+ with open(target, "wb") as dst:
+ dst.write(data)
download_file_insecure.viable = lambda: True
def get_best_downloader():
- downloaders = [
+ downloaders = (
download_file_powershell,
download_file_curl,
download_file_wget,
download_file_insecure,
- ]
-
- for dl in downloaders:
- if dl.viable():
- return dl
+ )
+ viable_downloaders = (dl for dl in downloaders if dl.viable())
+ return next(viable_downloaders, None)
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
|
|
From: <sub...@co...> - 2014-06-14 17:59:17
|
Author: phd
Date: Sat Jun 14 11:59:08 2014
New Revision: 4751
Log:
Upgrade ez_setup to 5.0
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/ez_setup.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Sun Jun 1 13:00:21 2014 (r4750)
+++ SQLObject/branches/1.7/docs/News.txt Sat Jun 14 11:59:08 2014 (r4751)
@@ -22,7 +22,7 @@
Minor features
--------------
-* Upgrade ez_setup to 3.6.0.
+* Upgrade ez_setup to 5.0.
Bugfixes
--------
Modified: SQLObject/branches/1.7/ez_setup.py
==============================================================================
--- SQLObject/branches/1.7/ez_setup.py Sun Jun 1 13:00:21 2014 (r4750)
+++ SQLObject/branches/1.7/ez_setup.py Sat Jun 14 11:59:08 2014 (r4751)
@@ -27,11 +27,16 @@
from distutils import log
try:
+ from urllib.request import urlopen
+except ImportError:
+ from urllib2 import urlopen
+
+try:
from site import USER_SITE
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "3.6"
+DEFAULT_VERSION = "5.0"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
@@ -64,17 +69,24 @@
raise IOError('Could not build the egg.')
-def get_zip_class():
+class ContextualZipFile(zipfile.ZipFile):
"""
Supplement ZipFile class to support context manager for Python 2.6
"""
- class ContextualZipFile(zipfile.ZipFile):
- def __enter__(self):
- return self
- def __exit__(self, type, value, traceback):
- self.close
- return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \
- ContextualZipFile
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, traceback):
+ self.close()
+
+ def __new__(cls, *args, **kwargs):
+ """
+ Construct a ZipFile or ContextualZipFile as appropriate
+ """
+ if hasattr(zipfile.ZipFile, '__exit__'):
+ return zipfile.ZipFile(*args, **kwargs)
+ return super(ContextualZipFile, cls).__new__(cls)
@contextlib.contextmanager
@@ -85,7 +97,7 @@
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
- with get_zip_class()(filename) as archive:
+ with ContextualZipFile(filename) as archive:
archive.extractall()
# going in the directory
@@ -183,14 +195,11 @@
if platform.system() != 'Windows':
return False
cmd = ['powershell', '-Command', 'echo test']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_powershell.viable = has_powershell
@@ -201,14 +210,11 @@
def has_curl():
cmd = ['curl', '--version']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_curl.viable = has_curl
@@ -219,14 +225,11 @@
def has_wget():
cmd = ['wget', '--version']
- devnull = open(os.path.devnull, 'wb')
- try:
+ with open(os.path.devnull, 'wb') as devnull:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
except Exception:
return False
- finally:
- devnull.close()
return True
download_file_wget.viable = has_wget
@@ -236,37 +239,28 @@
Use Python to download the file, even though it cannot authenticate the
connection.
"""
+ src = urlopen(url)
try:
- from urllib.request import urlopen
- except ImportError:
- from urllib2 import urlopen
- src = dst = None
- try:
- src = urlopen(url)
- # Read/write all in one block, so we don't create a corrupt file
- # if the download is interrupted.
+ # Read all the data in one block.
data = src.read()
- dst = open(target, "wb")
- dst.write(data)
finally:
- if src:
- src.close()
- if dst:
- dst.close()
+ src.close()
+
+ # Write all the data in one block to avoid creating a partial file.
+ with open(target, "wb") as dst:
+ dst.write(data)
download_file_insecure.viable = lambda: True
def get_best_downloader():
- downloaders = [
+ downloaders = (
download_file_powershell,
download_file_curl,
download_file_wget,
download_file_insecure,
- ]
-
- for dl in downloaders:
- if dl.viable():
- return dl
+ )
+ viable_downloaders = (dl for dl in downloaders if dl.viable())
+ return next(viable_downloaders, None)
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
|
|
From: <sub...@co...> - 2014-06-01 19:00:29
|
Author: phd
Date: Sun Jun 1 13:00:21 2014
New Revision: 4750
Log:
Merge revision 4749 from branch 1.7: upgrade ez_setup to 3.6.0
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/docs/TODO.txt
SQLObject/trunk/ez_setup.py
Modified: SQLObject/trunk/docs/News.txt
==============================================================================
--- SQLObject/trunk/docs/News.txt Sun Jun 1 12:58:42 2014 (r4749)
+++ SQLObject/trunk/docs/News.txt Sun Jun 1 13:00:21 2014 (r4750)
@@ -31,6 +31,11 @@
* DateTimeCol and TimeCol can read values with microseconds (created by
SQLObject 2.0) but do not write microseconds back.
+Minor features
+--------------
+
+* Upgrade ez_setup to 3.6.0.
+
Bugfixes
--------
Modified: SQLObject/trunk/docs/TODO.txt
==============================================================================
--- SQLObject/trunk/docs/TODO.txt Sun Jun 1 12:58:42 2014 (r4749)
+++ SQLObject/trunk/docs/TODO.txt Sun Jun 1 13:00:21 2014 (r4750)
@@ -46,8 +46,7 @@
* Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join.
* Stop supporting Python 2.5:
- make ConnectionHub a context manager instead of .doInTransaction();
- Upgrade ez_setup to 2.0+.
+ make ConnectionHub a context manager instead of .doInTransaction().
* Create JSONCol.
Modified: SQLObject/trunk/ez_setup.py
==============================================================================
--- SQLObject/trunk/ez_setup.py Sun Jun 1 12:58:42 2014 (r4749)
+++ SQLObject/trunk/ez_setup.py Sun Jun 1 13:00:21 2014 (r4750)
@@ -1,14 +1,14 @@
-#!python
+#!/usr/bin/env python
"""Bootstrap setuptools installation
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
+To use setuptools in your package's setup.py, include this
+file in the same directory and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
+To require a specific version of setuptools, set a download
+mirror, or use an alternate download directory, simply supply
the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
@@ -17,10 +17,12 @@
import shutil
import sys
import tempfile
-import tarfile
+import zipfile
import optparse
import subprocess
import platform
+import textwrap
+import contextlib
from distutils import log
@@ -29,38 +31,19 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "1.4.2"
+DEFAULT_VERSION = "3.6"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
+ """
+ Return True if the command succeeded.
+ """
args = (sys.executable,) + args
return subprocess.call(args) == 0
-def _check_call_py24(cmd, *args, **kwargs):
- res = subprocess.call(cmd, *args, **kwargs)
- class CalledProcessError(Exception):
- pass
- if not res == 0:
- msg = "Command '%s' return non-zero exit status %d" % (cmd, res)
- raise CalledProcessError(msg)
-vars(subprocess).setdefault('check_call', _check_call_py24)
-
-def _install(tarball, install_args=()):
- # extracting the tarball
- tmpdir = tempfile.mkdtemp()
- log.warn('Extracting in %s', tmpdir)
- old_wd = os.getcwd()
- try:
- os.chdir(tmpdir)
- tar = tarfile.open(tarball)
- _extractall(tar)
- tar.close()
-
- # going in the directory
- subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
- os.chdir(subdir)
- log.warn('Now working in %s', subdir)
+def _install(archive_filename, install_args=()):
+ with archive_context(archive_filename):
# installing
log.warn('Installing Setuptools')
if not _python_cmd('setup.py', 'install', *install_args):
@@ -68,47 +51,61 @@
log.warn('See the error message above.')
# exitcode will be 2
return 2
- finally:
- os.chdir(old_wd)
- shutil.rmtree(tmpdir)
-def _build_egg(egg, tarball, to_dir):
- # extracting the tarball
+def _build_egg(egg, archive_filename, to_dir):
+ with archive_context(archive_filename):
+ # building an egg
+ log.warn('Building a Setuptools egg in %s', to_dir)
+ _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+ # returning the result
+ log.warn(egg)
+ if not os.path.exists(egg):
+ raise IOError('Could not build the egg.')
+
+
+def get_zip_class():
+ """
+ Supplement ZipFile class to support context manager for Python 2.6
+ """
+ class ContextualZipFile(zipfile.ZipFile):
+ def __enter__(self):
+ return self
+ def __exit__(self, type, value, traceback):
+ self.close
+ return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \
+ ContextualZipFile
+
+
+@contextlib.contextmanager
+def archive_context(filename):
+ # extracting the archive
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
- tar = tarfile.open(tarball)
- _extractall(tar)
- tar.close()
+ with get_zip_class()(filename) as archive:
+ archive.extractall()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
-
- # building an egg
- log.warn('Building a Setuptools egg in %s', to_dir)
- _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+ yield
finally:
os.chdir(old_wd)
shutil.rmtree(tmpdir)
- # returning the result
- log.warn(egg)
- if not os.path.exists(egg):
- raise IOError('Could not build the egg.')
def _do_download(version, download_base, to_dir, download_delay):
egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg'
% (version, sys.version_info[0], sys.version_info[1]))
if not os.path.exists(egg):
- tarball = download_setuptools(version, download_base,
+ archive = download_setuptools(version, download_base,
to_dir, download_delay)
- _build_egg(egg, tarball, to_dir)
+ _build_egg(egg, archive, to_dir)
sys.path.insert(0, egg)
# Remove previously-imported pkg_resources if present (see
@@ -121,11 +118,10 @@
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=os.curdir, download_delay=15):
- # making sure we use the absolute path
+ to_dir=os.curdir, download_delay=15):
to_dir = os.path.abspath(to_dir)
- was_imported = 'pkg_resources' in sys.modules or \
- 'setuptools' in sys.modules
+ rep_modules = 'pkg_resources', 'setuptools'
+ imported = set(sys.modules).intersection(rep_modules)
try:
import pkg_resources
except ImportError:
@@ -133,23 +129,24 @@
try:
pkg_resources.require("setuptools>=" + version)
return
- except pkg_resources.VersionConflict:
- e = sys.exc_info()[1]
- if was_imported:
- sys.stderr.write(
- "The required version of setuptools (>=%s) is not available,\n"
- "and can't be installed while this script is running. Please\n"
- "install a more recent version first, using\n"
- "'easy_install -U setuptools'."
- "\n\n(Currently using %r)\n" % (version, e.args[0]))
- sys.exit(2)
- else:
- del pkg_resources, sys.modules['pkg_resources'] # reload ok
- return _do_download(version, download_base, to_dir,
- download_delay)
except pkg_resources.DistributionNotFound:
- return _do_download(version, download_base, to_dir,
- download_delay)
+ return _do_download(version, download_base, to_dir, download_delay)
+ except pkg_resources.VersionConflict as VC_err:
+ if imported:
+ msg = textwrap.dedent("""
+ The required version of setuptools (>={version}) is not available,
+ and can't be installed while this script is running. Please
+ install a more recent version first, using
+ 'easy_install -U setuptools'.
+
+ (Currently using {VC_err.args[0]!r})
+ """).format(VC_err=VC_err, version=version)
+ sys.stderr.write(msg)
+ sys.exit(2)
+
+ # otherwise, reload ok
+ del pkg_resources, sys.modules['pkg_resources']
+ return _do_download(version, download_base, to_dir, download_delay)
def _clean_check(cmd, target):
"""
@@ -169,10 +166,16 @@
trust). Raise an exception if the command cannot complete.
"""
target = os.path.abspath(target)
+ ps_cmd = (
+ "[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
+ "[System.Net.CredentialCache]::DefaultCredentials; "
+ "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)"
+ % vars()
+ )
cmd = [
'powershell',
'-Command',
- "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(),
+ ps_cmd,
]
_clean_check(cmd, target)
@@ -184,7 +187,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -202,7 +205,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -220,7 +223,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -266,9 +269,9 @@
return dl
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=os.curdir, delay=15,
- downloader_factory=get_best_downloader):
- """Download setuptools from a specified location and return its filename
+ to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
+ """
+ Download setuptools from a specified location and return its filename
`version` should be a valid setuptools version number that is available
as an egg for download under the `download_base` URL (which should end
@@ -281,74 +284,20 @@
"""
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
- tgz_name = "setuptools-%s.tar.gz" % version
- url = download_base + tgz_name
- saveto = os.path.join(to_dir, tgz_name)
+ zip_name = "setuptools-%s.zip" % version
+ url = download_base + zip_name
+ saveto = os.path.join(to_dir, zip_name)
if not os.path.exists(saveto): # Avoid repeated downloads
log.warn("Downloading %s", url)
downloader = downloader_factory()
downloader(url, saveto)
return os.path.realpath(saveto)
-
-def _extractall(self, path=".", members=None):
- """Extract all members from the archive to the current working
- directory and set owner, modification time and permissions on
- directories afterwards. `path' specifies a different directory
- to extract to. `members' is optional and must be a subset of the
- list returned by getmembers().
- """
- import copy
- import operator
- from tarfile import ExtractError
- directories = []
-
- if members is None:
- members = self
-
- for tarinfo in members:
- if tarinfo.isdir():
- # Extract directories with a safe mode.
- directories.append(tarinfo)
- tarinfo = copy.copy(tarinfo)
- tarinfo.mode = 448 # decimal for oct 0700
- self.extract(tarinfo, path)
-
- # Reverse sort directories.
- if sys.version_info < (2, 4):
- def sorter(dir1, dir2):
- return cmp(dir1.name, dir2.name)
- directories.sort(sorter)
- directories.reverse()
- else:
- directories.sort(key=operator.attrgetter('name'), reverse=True)
-
- # Set correct owner, mtime and filemode on directories.
- for tarinfo in directories:
- dirpath = os.path.join(path, tarinfo.name)
- try:
- self.chown(tarinfo, dirpath)
- self.utime(tarinfo, dirpath)
- self.chmod(tarinfo, dirpath)
- except ExtractError:
- e = sys.exc_info()[1]
- if self.errorlevel > 1:
- raise
- else:
- self._dbg(1, "tarfile: %s" % e)
-
-
def _build_install_args(options):
"""
Build the arguments to 'python setup.py install' on the setuptools package
"""
- install_args = []
- if options.user_install:
- if sys.version_info < (2, 6):
- log.warn("--user requires Python 2.6 or later")
- raise SystemExit(1)
- install_args.append('--user')
- return install_args
+ return ['--user'] if options.user_install else []
def _parse_args():
"""
@@ -367,16 +316,23 @@
const=lambda: download_file_insecure, default=get_best_downloader,
help='Use internal, non-validating downloader'
)
+ parser.add_option(
+ '--version', help="Specify which version to download",
+ default=DEFAULT_VERSION,
+ )
options, args = parser.parse_args()
# positional arguments are ignored
return options
-def main(version=DEFAULT_VERSION):
+def main():
"""Install or upgrade setuptools and EasyInstall"""
options = _parse_args()
- tarball = download_setuptools(download_base=options.download_base,
- downloader_factory=options.downloader_factory)
- return _install(tarball, _build_install_args(options))
+ archive = download_setuptools(
+ version=options.version,
+ download_base=options.download_base,
+ downloader_factory=options.downloader_factory,
+ )
+ return _install(archive, _build_install_args(options))
if __name__ == '__main__':
sys.exit(main())
|
|
From: <sub...@co...> - 2014-06-01 18:58:51
|
Author: phd
Date: Sun Jun 1 12:58:42 2014
New Revision: 4749
Log:
Upgrade ez_setup to 3.6.0
Modified:
SQLObject/branches/1.7/docs/News.txt
SQLObject/branches/1.7/docs/TODO.txt
SQLObject/branches/1.7/ez_setup.py
Modified: SQLObject/branches/1.7/docs/News.txt
==============================================================================
--- SQLObject/branches/1.7/docs/News.txt Thu May 15 09:17:27 2014 (r4748)
+++ SQLObject/branches/1.7/docs/News.txt Sun Jun 1 12:58:42 2014 (r4749)
@@ -19,6 +19,11 @@
* DateTimeCol and TimeCol can read values with microseconds (created by
SQLObject 2.0) but do not write microseconds back.
+Minor features
+--------------
+
+* Upgrade ez_setup to 3.6.0.
+
Bugfixes
--------
Modified: SQLObject/branches/1.7/docs/TODO.txt
==============================================================================
--- SQLObject/branches/1.7/docs/TODO.txt Thu May 15 09:17:27 2014 (r4748)
+++ SQLObject/branches/1.7/docs/TODO.txt Sun Jun 1 12:58:42 2014 (r4749)
@@ -46,8 +46,7 @@
* Cache columns in sqlmeta.getColumns(); reset the cache on add/del Column/Join.
* Stop supporting Python 2.5:
- make ConnectionHub a context manager instead of .doInTransaction();
- Upgrade ez_setup to 2.0+.
+ make ConnectionHub a context manager instead of .doInTransaction().
* Create JSONCol.
Modified: SQLObject/branches/1.7/ez_setup.py
==============================================================================
--- SQLObject/branches/1.7/ez_setup.py Thu May 15 09:17:27 2014 (r4748)
+++ SQLObject/branches/1.7/ez_setup.py Sun Jun 1 12:58:42 2014 (r4749)
@@ -1,14 +1,14 @@
-#!python
+#!/usr/bin/env python
"""Bootstrap setuptools installation
-If you want to use setuptools in your package's setup.py, just include this
-file in the same directory with it, and add this to the top of your setup.py::
+To use setuptools in your package's setup.py, include this
+file in the same directory and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
-If you want to require a specific version of setuptools, set a download
-mirror, or use an alternate download directory, you can do so by supplying
+To require a specific version of setuptools, set a download
+mirror, or use an alternate download directory, simply supply
the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
@@ -17,10 +17,12 @@
import shutil
import sys
import tempfile
-import tarfile
+import zipfile
import optparse
import subprocess
import platform
+import textwrap
+import contextlib
from distutils import log
@@ -29,38 +31,19 @@
except ImportError:
USER_SITE = None
-DEFAULT_VERSION = "1.4.2"
+DEFAULT_VERSION = "3.6"
DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/"
def _python_cmd(*args):
+ """
+ Return True if the command succeeded.
+ """
args = (sys.executable,) + args
return subprocess.call(args) == 0
-def _check_call_py24(cmd, *args, **kwargs):
- res = subprocess.call(cmd, *args, **kwargs)
- class CalledProcessError(Exception):
- pass
- if not res == 0:
- msg = "Command '%s' return non-zero exit status %d" % (cmd, res)
- raise CalledProcessError(msg)
-vars(subprocess).setdefault('check_call', _check_call_py24)
-
-def _install(tarball, install_args=()):
- # extracting the tarball
- tmpdir = tempfile.mkdtemp()
- log.warn('Extracting in %s', tmpdir)
- old_wd = os.getcwd()
- try:
- os.chdir(tmpdir)
- tar = tarfile.open(tarball)
- _extractall(tar)
- tar.close()
-
- # going in the directory
- subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
- os.chdir(subdir)
- log.warn('Now working in %s', subdir)
+def _install(archive_filename, install_args=()):
+ with archive_context(archive_filename):
# installing
log.warn('Installing Setuptools')
if not _python_cmd('setup.py', 'install', *install_args):
@@ -68,47 +51,61 @@
log.warn('See the error message above.')
# exitcode will be 2
return 2
- finally:
- os.chdir(old_wd)
- shutil.rmtree(tmpdir)
-def _build_egg(egg, tarball, to_dir):
- # extracting the tarball
+def _build_egg(egg, archive_filename, to_dir):
+ with archive_context(archive_filename):
+ # building an egg
+ log.warn('Building a Setuptools egg in %s', to_dir)
+ _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+ # returning the result
+ log.warn(egg)
+ if not os.path.exists(egg):
+ raise IOError('Could not build the egg.')
+
+
+def get_zip_class():
+ """
+ Supplement ZipFile class to support context manager for Python 2.6
+ """
+ class ContextualZipFile(zipfile.ZipFile):
+ def __enter__(self):
+ return self
+ def __exit__(self, type, value, traceback):
+ self.close
+ return zipfile.ZipFile if hasattr(zipfile.ZipFile, '__exit__') else \
+ ContextualZipFile
+
+
+@contextlib.contextmanager
+def archive_context(filename):
+ # extracting the archive
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
- tar = tarfile.open(tarball)
- _extractall(tar)
- tar.close()
+ with get_zip_class()(filename) as archive:
+ archive.extractall()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
-
- # building an egg
- log.warn('Building a Setuptools egg in %s', to_dir)
- _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
+ yield
finally:
os.chdir(old_wd)
shutil.rmtree(tmpdir)
- # returning the result
- log.warn(egg)
- if not os.path.exists(egg):
- raise IOError('Could not build the egg.')
def _do_download(version, download_base, to_dir, download_delay):
egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg'
% (version, sys.version_info[0], sys.version_info[1]))
if not os.path.exists(egg):
- tarball = download_setuptools(version, download_base,
+ archive = download_setuptools(version, download_base,
to_dir, download_delay)
- _build_egg(egg, tarball, to_dir)
+ _build_egg(egg, archive, to_dir)
sys.path.insert(0, egg)
# Remove previously-imported pkg_resources if present (see
@@ -121,11 +118,10 @@
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=os.curdir, download_delay=15):
- # making sure we use the absolute path
+ to_dir=os.curdir, download_delay=15):
to_dir = os.path.abspath(to_dir)
- was_imported = 'pkg_resources' in sys.modules or \
- 'setuptools' in sys.modules
+ rep_modules = 'pkg_resources', 'setuptools'
+ imported = set(sys.modules).intersection(rep_modules)
try:
import pkg_resources
except ImportError:
@@ -133,23 +129,24 @@
try:
pkg_resources.require("setuptools>=" + version)
return
- except pkg_resources.VersionConflict:
- e = sys.exc_info()[1]
- if was_imported:
- sys.stderr.write(
- "The required version of setuptools (>=%s) is not available,\n"
- "and can't be installed while this script is running. Please\n"
- "install a more recent version first, using\n"
- "'easy_install -U setuptools'."
- "\n\n(Currently using %r)\n" % (version, e.args[0]))
- sys.exit(2)
- else:
- del pkg_resources, sys.modules['pkg_resources'] # reload ok
- return _do_download(version, download_base, to_dir,
- download_delay)
except pkg_resources.DistributionNotFound:
- return _do_download(version, download_base, to_dir,
- download_delay)
+ return _do_download(version, download_base, to_dir, download_delay)
+ except pkg_resources.VersionConflict as VC_err:
+ if imported:
+ msg = textwrap.dedent("""
+ The required version of setuptools (>={version}) is not available,
+ and can't be installed while this script is running. Please
+ install a more recent version first, using
+ 'easy_install -U setuptools'.
+
+ (Currently using {VC_err.args[0]!r})
+ """).format(VC_err=VC_err, version=version)
+ sys.stderr.write(msg)
+ sys.exit(2)
+
+ # otherwise, reload ok
+ del pkg_resources, sys.modules['pkg_resources']
+ return _do_download(version, download_base, to_dir, download_delay)
def _clean_check(cmd, target):
"""
@@ -169,10 +166,16 @@
trust). Raise an exception if the command cannot complete.
"""
target = os.path.abspath(target)
+ ps_cmd = (
+ "[System.Net.WebRequest]::DefaultWebProxy.Credentials = "
+ "[System.Net.CredentialCache]::DefaultCredentials; "
+ "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)"
+ % vars()
+ )
cmd = [
'powershell',
'-Command',
- "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars(),
+ ps_cmd,
]
_clean_check(cmd, target)
@@ -184,7 +187,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -202,7 +205,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -220,7 +223,7 @@
try:
try:
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
- except:
+ except Exception:
return False
finally:
devnull.close()
@@ -266,9 +269,9 @@
return dl
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
- to_dir=os.curdir, delay=15,
- downloader_factory=get_best_downloader):
- """Download setuptools from a specified location and return its filename
+ to_dir=os.curdir, delay=15, downloader_factory=get_best_downloader):
+ """
+ Download setuptools from a specified location and return its filename
`version` should be a valid setuptools version number that is available
as an egg for download under the `download_base` URL (which should end
@@ -281,74 +284,20 @@
"""
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
- tgz_name = "setuptools-%s.tar.gz" % version
- url = download_base + tgz_name
- saveto = os.path.join(to_dir, tgz_name)
+ zip_name = "setuptools-%s.zip" % version
+ url = download_base + zip_name
+ saveto = os.path.join(to_dir, zip_name)
if not os.path.exists(saveto): # Avoid repeated downloads
log.warn("Downloading %s", url)
downloader = downloader_factory()
downloader(url, saveto)
return os.path.realpath(saveto)
-
-def _extractall(self, path=".", members=None):
- """Extract all members from the archive to the current working
- directory and set owner, modification time and permissions on
- directories afterwards. `path' specifies a different directory
- to extract to. `members' is optional and must be a subset of the
- list returned by getmembers().
- """
- import copy
- import operator
- from tarfile import ExtractError
- directories = []
-
- if members is None:
- members = self
-
- for tarinfo in members:
- if tarinfo.isdir():
- # Extract directories with a safe mode.
- directories.append(tarinfo)
- tarinfo = copy.copy(tarinfo)
- tarinfo.mode = 448 # decimal for oct 0700
- self.extract(tarinfo, path)
-
- # Reverse sort directories.
- if sys.version_info < (2, 4):
- def sorter(dir1, dir2):
- return cmp(dir1.name, dir2.name)
- directories.sort(sorter)
- directories.reverse()
- else:
- directories.sort(key=operator.attrgetter('name'), reverse=True)
-
- # Set correct owner, mtime and filemode on directories.
- for tarinfo in directories:
- dirpath = os.path.join(path, tarinfo.name)
- try:
- self.chown(tarinfo, dirpath)
- self.utime(tarinfo, dirpath)
- self.chmod(tarinfo, dirpath)
- except ExtractError:
- e = sys.exc_info()[1]
- if self.errorlevel > 1:
- raise
- else:
- self._dbg(1, "tarfile: %s" % e)
-
-
def _build_install_args(options):
"""
Build the arguments to 'python setup.py install' on the setuptools package
"""
- install_args = []
- if options.user_install:
- if sys.version_info < (2, 6):
- log.warn("--user requires Python 2.6 or later")
- raise SystemExit(1)
- install_args.append('--user')
- return install_args
+ return ['--user'] if options.user_install else []
def _parse_args():
"""
@@ -367,16 +316,23 @@
const=lambda: download_file_insecure, default=get_best_downloader,
help='Use internal, non-validating downloader'
)
+ parser.add_option(
+ '--version', help="Specify which version to download",
+ default=DEFAULT_VERSION,
+ )
options, args = parser.parse_args()
# positional arguments are ignored
return options
-def main(version=DEFAULT_VERSION):
+def main():
"""Install or upgrade setuptools and EasyInstall"""
options = _parse_args()
- tarball = download_setuptools(download_base=options.download_base,
- downloader_factory=options.downloader_factory)
- return _install(tarball, _build_install_args(options))
+ archive = download_setuptools(
+ version=options.version,
+ download_base=options.download_base,
+ downloader_factory=options.downloader_factory,
+ )
+ return _install(archive, _build_install_args(options))
if __name__ == '__main__':
sys.exit(main())
|
|
From: <sub...@co...> - 2014-05-15 15:17:34
|
Author: phd Date: Thu May 15 09:17:27 2014 New Revision: 4748 Log: Version 1.6.0 final Modified: SQLObject/tags/1.6.0/README.txt SQLObject/tags/1.6.0/setup.cfg SQLObject/tags/1.6.0/sqlobject/__version__.py Modified: SQLObject/tags/1.6.0/README.txt ============================================================================== --- SQLObject/tags/1.6.0/README.txt Thu May 15 09:14:43 2014 (r4747) +++ SQLObject/tags/1.6.0/README.txt Thu May 15 09:17:27 2014 (r4748) @@ -1,5 +1,5 @@ -SQLObject 1.6 -============= +SQLObject 1.6.0 +=============== Thanks for looking at SQLObject. SQLObject is an object-relational mapper, i.e., a library that will wrap your database tables in Python Modified: SQLObject/tags/1.6.0/setup.cfg ============================================================================== --- SQLObject/tags/1.6.0/setup.cfg Thu May 15 09:14:43 2014 (r4747) +++ SQLObject/tags/1.6.0/setup.cfg Thu May 15 09:17:27 2014 (r4748) @@ -5,10 +5,6 @@ [easy_install] #find_links = http://svn.pythonpaste.org/package_index.html -[egg_info] -tag_build = dev -tag_svn_revision = true - [pudge] theme = pythonpaste.org docs = docs/index.txt docs/Authors.txt docs/DeveloperGuide.txt docs/FAQ.txt Modified: SQLObject/tags/1.6.0/sqlobject/__version__.py ============================================================================== --- SQLObject/tags/1.6.0/sqlobject/__version__.py Thu May 15 09:14:43 2014 (r4747) +++ SQLObject/tags/1.6.0/sqlobject/__version__.py Thu May 15 09:17:27 2014 (r4748) @@ -1,8 +1,8 @@ -version = '1.6' +version = '1.6.0' major = 1 minor = 6 micro = 0 -release_level = 'branch' +release_level = 'final' serial = 0 version_info = (major, minor, micro, release_level, serial) |
|
From: <sub...@co...> - 2014-05-15 15:14:50
|
Author: phd
Date: Thu May 15 09:14:43 2014
New Revision: 4747
Log:
Tagging 1.6.0
Added:
SQLObject/tags/1.6.0/
- copied from r4746, SQLObject/branches/1.6/
|
|
From: <sub...@co...> - 2014-05-15 15:12:56
|
Author: phd Date: Thu May 15 09:12:48 2014 New Revision: 4746 Log: Merge revision 4744 from branch 1.6: SQLObject 1.6.0 was released 15 May 2014 Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Thu May 15 09:12:07 2014 (r4745) +++ SQLObject/trunk/docs/News.txt Thu May 15 09:12:48 2014 (r4746) @@ -39,6 +39,8 @@ SQLObject 1.6.0 =============== +Released 15 May 2014. + Features & Interface -------------------- |
|
From: <sub...@co...> - 2014-05-15 15:12:14
|
Author: phd Date: Thu May 15 09:12:07 2014 New Revision: 4745 Log: Merge revision 4744 from branch 1.6: SQLObject 1.6.0 was released 15 May 2014 Modified: SQLObject/branches/1.7/docs/News.txt Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Thu May 15 09:10:01 2014 (r4744) +++ SQLObject/branches/1.7/docs/News.txt Thu May 15 09:12:07 2014 (r4745) @@ -27,6 +27,8 @@ SQLObject 1.6.0 =============== +Released 15 May 2014. + Features & Interface -------------------- |
|
From: <sub...@co...> - 2014-05-15 15:10:19
|
Author: phd Date: Thu May 15 09:10:01 2014 New Revision: 4744 Log: SQLObject 1.6.0 was released 15 May 2014 Modified: SQLObject/branches/1.6/docs/News.txt Modified: SQLObject/branches/1.6/docs/News.txt ============================================================================== --- SQLObject/branches/1.6/docs/News.txt Mon May 12 13:21:43 2014 (r4743) +++ SQLObject/branches/1.6/docs/News.txt Thu May 15 09:10:01 2014 (r4744) @@ -10,6 +10,8 @@ SQLObject 1.6.0 =============== +Released 15 May 2014. + Features & Interface -------------------- |
|
From: <sub...@co...> - 2014-05-12 19:21:50
|
Author: phd Date: Mon May 12 13:21:43 2014 New Revision: 4743 Log: Merge revision 4741 from branch 1.6: split news into minor features and bugfixes Modified: SQLObject/trunk/docs/News.txt Modified: SQLObject/trunk/docs/News.txt ============================================================================== --- SQLObject/trunk/docs/News.txt Mon May 12 13:21:21 2014 (r4742) +++ SQLObject/trunk/docs/News.txt Mon May 12 13:21:43 2014 (r4743) @@ -45,8 +45,14 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. +Minor features +-------------- + * Upgrade ez_setup to 1.4.2. +Bugfixes +-------- + * A bugfix was ported from `SQLObject 1.5.2`_. SQLObject 1.5.2 |
|
From: <sub...@co...> - 2014-05-12 19:21:29
|
Author: phd Date: Mon May 12 13:21:21 2014 New Revision: 4742 Log: Merge revision 4741 from branch 1.6: split news into minor features and bugfixes Modified: SQLObject/branches/1.7/docs/News.txt Modified: SQLObject/branches/1.7/docs/News.txt ============================================================================== --- SQLObject/branches/1.7/docs/News.txt Mon May 12 13:19:44 2014 (r4741) +++ SQLObject/branches/1.7/docs/News.txt Mon May 12 13:21:21 2014 (r4742) @@ -33,8 +33,14 @@ * Python 2.4 is no longer supported. The minimal supported version is Python 2.5. +Minor features +-------------- + * Upgrade ez_setup to 1.4.2. +Bugfixes +-------- + * A bugfix was ported from `SQLObject 1.5.2`_. SQLObject 1.5.2 |
|
From: <sub...@co...> - 2014-05-12 19:19:53
|
Author: phd Date: Mon May 12 13:19:44 2014 New Revision: 4741 Log: Split news into minor features and bugfixes Modified: SQLObject/branches/1.6/docs/News.txt Modified: SQLObject/branches/1.6/docs/News.txt ============================================================================== --- SQLObject/branches/1.6/docs/News.txt Sun May 11 10:46:13 2014 (r4740) +++ SQLObject/branches/1.6/docs/News.txt Mon May 12 13:19:44 2014 (r4741) @@ -19,8 +19,14 @@ * Support for Python 2.5 is declared obsolete and will be removed in the next release. +Minor features +-------------- + * Upgrade ez_setup to 1.4.2. +Bugfixes +-------- + * A bugfix was ported from `SQLObject 1.5.2`_. SQLObject 1.5.2 |
|
From: <sub...@co...> - 2014-05-11 16:46:20
|
Author: phd
Date: Sun May 11 10:46:13 2014
New Revision: 4740
Log:
Merge revision 4739 from branch 1.7: replace time.strptime with datetime.strptime
Modified:
SQLObject/trunk/docs/TODO.txt
SQLObject/trunk/sqlobject/col.py
Modified: SQLObject/trunk/docs/TODO.txt
==============================================================================
--- SQLObject/trunk/docs/TODO.txt Sun May 11 10:45:09 2014 (r4739)
+++ SQLObject/trunk/docs/TODO.txt Sun May 11 10:46:13 2014 (r4740)
@@ -47,7 +47,7 @@
* Stop supporting Python 2.5:
make ConnectionHub a context manager instead of .doInTransaction();
- replace time.strptime with datetime.strptime. Upgrade ez_setup to 2.0+.
+ Upgrade ez_setup to 2.0+.
* Create JSONCol.
Modified: SQLObject/trunk/sqlobject/col.py
==============================================================================
--- SQLObject/trunk/sqlobject/col.py Sun May 11 10:45:09 2014 (r4739)
+++ SQLObject/trunk/sqlobject/col.py Sun May 11 10:46:13 2014 (r4740)
@@ -1113,11 +1113,7 @@
value = '.'.join(_value)
else:
value += '.0'
- if sys.version_info[:3] < (2, 6, 0): # datetime.strptime in python2.5 doesn't support '%f' format
- stime = time.strptime(value, self.format)
- return datetime.datetime(*stime[:6])
- else:
- return datetime.datetime.strptime(value, self.format)
+ return datetime.datetime.strptime(value, self.format)
except:
raise validators.Invalid("expected a date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
@@ -1160,13 +1156,9 @@
value = '.'.join(_value)
else:
value += '.0'
- if sys.version_info[:3] < (2, 6, 0): # datetime.strptime in python2.5 doesn't support '%f' format
- stime = time.strptime(value, self.format)
- return DateTime.mktime(stime)
- else:
- value = datetime.datetime.strptime(value, self.format)
- return DateTime.DateTime(value.year, value.month, value.day,
- value.hour, value.minute, value.second)
+ value = datetime.datetime.strptime(value, self.format)
+ return DateTime.DateTime(value.year, value.month, value.day,
+ value.hour, value.minute, value.second)
except:
raise validators.Invalid("expected a date/time string of the '%s' format in the DateTimeCol '%s', got %s %r instead" % \
(self.format, self.name, type(value), value), value, state)
|