Custom Query (132 matches)


Show under each result:

Results (4 - 6 of 132)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#53 fixed Allow for immutable subclasses of YAMLObject xi toidinamai

Reported by toidinamai, 7 years ago.


YAMLObject are not directly instantiated so they don't need their own instance attribute (i.e. an own dict). Because of that they should define an empty slots and let subclasses decide whether they want arbitrary instance attributes or not:

--- lib/yaml/        (revision 251)
+++ lib/yaml/        (working copy)
@@ -272,6 +272,9 @@
     yaml_tag = None
     yaml_flow_style = None
+    # no direct instantiation, so allow for immutable subclasses
+    __slots__ = ()
     def from_yaml(cls, loader, node):
         Convert a representation node to a Python object.

The same is basically also true for YAMLObjectMetaclass but I doubt there is much use for this in practice.

#168 invalid Appengine query models xi martinhoarantes@…

Reported by martinhoarantes@…, 4 years ago.


Hi, I´m using Google Appengine, language Python. I´d like to know how to query a model.

I´m using this code, but the output is miserable:

class GerarYAML(webapp.RequestHandler):
    def post(self):
        user = users.get_current_user() 
        if user: 
            formacaos = models.Formacao().all()
            experiencias = models.Experiencia().all()
            investigacaos = models.Investigacao().all() 
            distribuicaos = models.Distribuicao().all()
            docentes = models.Docente.all()
            docentes.filter('user =', users.get_current_user())
            for docente in docentes:
                for formacao in formacaos:
                    for experiencia in experiencias:
                        for investigacao in investigacaos:
                            for distribuicao in distribuicaos:
                                formacao.docente = docente.key()
                                'Nome: %s' % (docente.nome)
                                'Apelido: %s' % (docente.apelido)
                                'Unidade: %s' % (docente.unidade)
                                'Categoria: %s' % (docente.categoria)
                                'Regime: %s' % (docente.regime)
                                'Formacao: %s' % (formacao.formAno)
                                'Grau de Formacao: %s' % (formacao.formGrau)
                                'Area de Formacao: %s' % (formacao.formArea)
                                'Instituicao Academica: %s' % (formacao.formInstituicao)
                                'Classificacao Final: %s' % (formacao.formClassificacao)
                                yaml.dump(docente, sys.stdout)
                                yaml.dump(formacao, sys.stdout)  
                                yaml.dump(experiencia, sys.stdout)
                                yaml.dump(investigacao, sys.stdout)
                                yaml.dump(distribuicao, sys.stdout)  
                                self.response.headers['Content-Type'] = 'application/yaml'
                                self.response.headers['Content-Disposition'] = 'filename = my.yaml'

Can someone point out, how can i solve this issue?

I´d like to download a file automatically when user submit a button with .yaml format and more or less formatted.

#122 wontfix Bool tag doesn't accept all defined variants xi anonymous

Reported by anonymous, 5 years ago.


One of the examples listed at will fail:

>>> yaml.load('!!bool y')
Traceback (most recent call last):
KeyError: u'y'
1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.