This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py | |
index 1dc4385..60f42c1 100644 | |
--- a/pyramid/config/__init__.py | |
+++ b/pyramid/config/__init__.py | |
@@ -1061,7 +1061,7 @@ class ActionState(object): | |
""" | |
try: | |
- for action in resolveConflicts(self.actions): | |
+ for action in self.resolve_conficts(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Disk /dev/sda: 256.1 GB, 256060514304 bytes | |
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors | |
Units = sectors of 1 * 512 = 512 bytes | |
Sector size (logical/physical): 512 bytes / 512 bytes | |
I/O size (minimum/optimal): 512 bytes / 512 bytes | |
Disk identifier: 0x044bc487 | |
Device Boot Start End Blocks Id System | |
/dev/sda1 2048 27265023 13631488 27 Hidden NTFS WinRE | |
/dev/sda2 * 27265024 27469823 102400 7 HPFS/NTFS/exFAT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[chrism@thinkx 04-pep8]$ env/bin/flake8 --max-complexity 10 pyramid | grep W901 | |
pyramid/pyramid/renderers.py:564:1: W901 'RendererHelper._make_response' is too complex (12) | |
pyramid/pyramid/traversal.py:632:1: W901 'ResourceTreeTraverser.__call__' is too complex (10) | |
pyramid/pyramid/authentication.py:853:1: W901 'AuthTktCookieHelper.identify' is too complex (14) | |
pyramid/pyramid/static.py:95:1: W901 'static_view.__call__' is too complex (11) | |
pyramid/pyramid/authorization.py:105:1: W901 'ACLAuthorizationPolicy.principals_allowed_by_permission' is too complex (10) | |
pyramid/pyramid/testing.py:562:1: W901 'skip_on' is too complex (11) | |
pyramid/pyramid/url.py:85:1: W901 'URLMethodsMixin.route_url' is too complex (15) | |
pyramid/pyramid/url.py:289:1: W901 'URLMethodsMixin.resource_url' is too complex (17) | |
pyramid/pyramid/url.py:35:1: W901 'URLMethodsMixin._partial_application_url' is too complex (18) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### | |
# wsgi.py | |
########### | |
from waitress import serve | |
import os | |
from pyramid.config import Configurator | |
configurator = Configurator() | |
configurator.include('obie', route_prefix=os.environ.get('ROUTE_PREFIX', '/')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="whatever"> | |
<tal:block | |
define="form view.addrform"> | |
<div class="row" | |
tal:repeat="field form"> | |
<div class="span2"> | |
${structure:field.title} | |
<span class="req" tal:condition="field.required">*</span> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_it_location_is_not_dir(): | |
from somewhere import Config | |
c = Config() | |
c.os = DummyOS(False) | |
assertRaises(SomeException, setattr, c, settings_location, '/whatever') | |
def test_it_location_is_dir(): | |
from somewhere import Config | |
c = Config() | |
c.os = DummyOS(True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wont work | |
__acl__ = [ | |
(Allow, Everyone, 'view'), | |
(Allow, 'group:editors', 'add'), | |
(Allow, ['group:editors','group:moderators','group:admins'], 'edit'), | |
] | |
# will work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[chrism@thinko tmp]$ cd ~/tmp/ | |
[chrism@thinko tmp]$ virtualenv -p python3.2 tmpenv | |
The program 'virtualenv' is currently not installed. You can install it by typing: | |
sudo apt-get install python-virtualenv | |
[chrism@thinko tmp]$ cd ~/bin | |
[chrism@thinko bin]$ ln -s virtualenv | |
virtualenv2.4 virtualenv2.6 virtualenv3.2 virtualenv-pypy | |
virtualenv2.5 virtualenv2.7 virtualenv3.3 | |
[chrism@thinko bin]$ ln -s virtualenv2.7 virtualenv | |
[chrism@thinko bin]$ c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[chrism@thinko pyramid]$ virtualenv -p python2.7 myenv | |
Running virtualenv with interpreter /home/chrism/bin/python2.7 | |
New python executable in myenv/bin/python2.7 | |
Also creating executable in myenv/bin/python | |
Installing setuptools.............done. | |
Installing pip...............done. | |
[chrism@thinko pyramid]$ myenv/bin/python setup.py develop | |
running develop | |
running egg_info | |
writing requirements to pyramid.egg-info/requires.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[chrism@thinko flask]$ env27/bin/coverage run --source=flask setup.py test | |
running test | |
running egg_info | |
writing requirements to Flask.egg-info/requires.txt | |
writing Flask.egg-info/PKG-INFO | |
writing top-level names to Flask.egg-info/top_level.txt | |
writing dependency_links to Flask.egg-info/dependency_links.txt | |
reading manifest file 'Flask.egg-info/SOURCES.txt' | |
reading manifest template 'MANIFEST.in' | |
warning: no previously-included files matching '*.pyc' found under directory 'docs' |