profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/antlarr/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Antonio Larrosa antlarr Spain @SUSE / @openSUSE / @KDE developer writing Free Software since 1996 . This is my personal account . My work account is @antlarr-suse

antlarr/bard 59

Bard Music Manager - A database to manage your music, find duplicates and fix tags

antlarr/imwriter 1

Downloads and writes raw disk images and operating systems to usb drives

antlarr/20-years-of-KDE 0

a book for KDE's 20th anniversary about KDE's past, present and future by its contributors

antlarr/aaa_base 0

Files for the openSUSE package aaa_base

antlarr/ankh-morpork 0

Hi. I'm a starter theme called _s, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.

antlarr/appstream 0

Tools and libraries to work with AppStream metadata

antlarr/audiofile 0

Audio File Library

antlarr/beets 0

music library manager and MusicBrainz tagger

antlarr/borg 0

Deduplicating archiver with compression and authenticated encryption.

antlarr/borgmatic 0

A simple wrapper script for the Borg backup software that creates and prunes backups

push eventantlarr/bard

Antonio Larrosa

commit sha 188870a58058bc4e9de745728256847af3849267

Add Changelog for old releases

view details

Antonio Larrosa

commit sha 24d80942d2683940db1a4b421ccf2848f2e6723e

Draw percentage bars when doing a backup

view details

Antonio Larrosa

commit sha b4fc1928a0d97a789fb67b206867a42e6bd48446

Add SQLAlchemy 1.4 support

view details

Antonio Larrosa

commit sha 48e39e5b561be2d1fd55c9609f05d9d6bce83280

Add webp support for cover images

view details

push time in 14 days

fork antlarr/numpy

The fundamental package for scientific computing with Python.

https://numpy.org

fork in 20 days

issue openedmaliit/keyboard

Features of the sample text for languages

I noticed the plugins directory contains some free books to extract language characteristics (n-grams) that I guess are used for the autocomplete feature.

In the case of Spanish, I saw that the book "Don Quijote de la Mancha" is used as sample text. This is good because the book is long and it has a large vocabulary, but it has the problem that it was written in 1605-1615, so it uses quite a lot of old Spanish vocabulary and expressions that are not used at all these days and it doesn't include new words and expressions that appeared since then.

So I think it would be good to find a substitute text.

Apart from it being free for (re)distribution. Are there any special features that the text should have?

created time in a month

pull request commentencode/httpx

Add a network pytest mark for tests that use the network

Seems fair. I'd been keen on us switching these cases out to non-network-requiring tests at some point, tho not a massive priority right now.

@antlarr Could you comment here showing how to disable running the network tests once we've got this marker? Does it require a particular envvar to be set in order to skip them?

Sure. We just use it in our build service by running the tests like this:

%pytest -k 'not network'

Where %pytest is a rpm macro that basically runs pytest with the given arguments for every python flavor (currently 3.6, 3.8 and 3.9) in order to test the rpm packages that are being built for each flavor.

You can see this at the python-httpx spec file in openSUSE build service in line 84.

Where is this marker (and making use of it) documented?

@s-t-e-v-e-n-k already linked the pytest documentation for markers. I also added a comment at https://github.com/encode/httpx/pull/1669/commits/5f7ee8e5efb1d85c39a5507598f7772522f9aae3 to document what that particular marker is used for, just in case some other test is added in the future that makes use of the network.

Once we've got that info against this history, then I'm super happy for this to go in, yup.

Cool

antlarr

comment created time in a month

pull request commentFlask-Middleware/flask-security

Do not raise a TypeError exception if phone.data is None

Thanks for merging it. Just for completion, this happened with WTForms 2.3.3 . I don't think it's worth to invest more time on this, but just in case you're curious and want to dig deeper, I've attached here the full build log where it fails:

build.log.txt

You can see the raised exception at the end and if you search for "WTForms" in the log, you can see it's using 2.3.3 (actually, the latest version from git, commit a55be54 )

antlarr

comment created time in a month

pull request commentencode/httpx

Add a network pytest mark for tests that use the network

I'm personally okay with this, though perhaps let's make sure this doesn't just appear as a "utility marker", since you'd be relying on it for building on SUSE?

That's right, we'll use it for building the httpx SUSE (and openSUSE) packages

antlarr

comment created time in a month

push eventantlarr/httpx

Antonio Larrosa

commit sha 5f7ee8e5efb1d85c39a5507598f7772522f9aae3

Add a better explanation for the network marker Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>

view details

push time in a month

push eventantlarr/flask-security

Antonio Larrosa

commit sha a6c4200582eaf773fd6c4dce30e01d6a1a97dafe

Format code with black

view details

push time in a month

PR opened Flask-Middleware/flask-security

Do not raise a TypeError exception if phone.data is None

Running the tests on the openSUSE build service to generate packages fails because a TypeError exception is raised.

TypeError: object of type 'NoneType' has no len()

This commit checks that phone.data is not None before calling len() in the two lines where the exception is raised.

+4 -2

0 comment

2 changed files

pr created time in a month

create barnchantlarr/flask-security

branch : fix-TypeError-on-phone-data

created branch time in a month

fork antlarr/flask-security

Quick and simple security for Flask applications

fork in a month

PR opened encode/httpx

Add a network pytest mark for tests that use the network

Sometimes it's useful to have the tests that use the network marked so they can be skipped easily when we know the network is not available.

This is useful for example on SUSE and openSUSE's build servers. When building the httpx packages (actually, any package in the distribution) the network is disabled so we can assure reproducible builds (among other benefits). With this mark, it's easier to skip tests that can not succeed.

+4 -0

0 comment

3 changed files

pr created time in 2 months

create barnchantlarr/httpx

branch : add_network_mark

created branch time in 2 months

fork antlarr/httpx

A next generation HTTP client for Python. 🦋

https://www.python-httpx.org/

fork in 2 months

PR opened openSUSE/obs-service-download_files

Don't reuse the CURL env var to download sources correctly

This fixes a problem that makes the service sometimes not download all source files silently.

Since the CURL env var was being reused for every Source file processed, the curl command was using more and more --time-cond arguments with all previous existing source files. When one of those source files has a newer mtime than the requested file, the new file wasn't downloaded.

This was found while trying to debug why if you do:

  • osc co mozilla:Factory MozillaFirefox
  • cd .../MozillaFirefox
  • rm mozilla.keyring
  • osc service ra download_files

Then the mozilla.keyring file was not downloaded

+2 -2

0 comment

1 changed file

pr created time in 2 months

create barnchantlarr/obs-service-download_files

branch : fix-download-old-files

created branch time in 2 months

push eventantlarr/obs-service-download_files

Antonio Larrosa

commit sha 2884871f2505ed3d53e23d62129e7192cb72d817

Don't reuse the CURL env var to download sources correctly This fixes a problem that makes the service sometimes not download all source files. Since the CURL env var was being reused for every Source file processed, the curl command was using more and more --time-cond arguments with all previous existing source files. When one of those source files has a newer mtime than the requested file, the new file wasn't downloaded. This was found while trying to debug why if you do: * osc co mozilla:Factory MozillaFirefox * cd .../MozillaFirefox * rm mozilla.keyring * osc service ra download_files Then the mozilla.keyring file was not downloaded

view details

push time in 2 months

push eventantlarr/pecan

Antonio Larrosa

commit sha 942d92e7eb83e2eccb5d172b226b8e5fdc2d0368

Fix typo from bad copy&paste I copied the structure of the code from a few lines above and forgot to change the name of the classes

view details

push time in 3 months

PR opened pecan/pecan

Support SQLAlchemy 1.4.x

SQLAlchemy 1.4 is returning new types, LegacyCursorResult and LegacyRow, which are not JSON serializable and this makes tests fail with:

======================================================================
ERROR: test_result_proxy (pecan.tests.test_jsonify.TestJsonifySQLAlchemyGenericEncoder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/tests/test_jsonify.py", line 220, in test_result_proxy
    result = encode(self.result_proxy)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 133, in encode
    return _instance.encode(obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 127, in default
    return jsonify(obj)
  File "/usr/lib64/python3.6/functools.py", line 807, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 122, in jsonify
    return _default.default(obj)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 108, in default
    return JSONEncoder.default(self, obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'LegacyCursorResult' is not JSON serializable

======================================================================
ERROR: test_row_proxy (pecan.tests.test_jsonify.TestJsonifySQLAlchemyGenericEncoder)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/tests/test_jsonify.py", line 227, in test_row_proxy
    result = encode(self.row_proxy)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 133, in encode
    return _instance.encode(obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 127, in default
    return jsonify(obj)
  File "/usr/lib64/python3.6/functools.py", line 807, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 122, in jsonify
    return _default.default(obj)
  File "/home/abuild/rpmbuild/BUILD/pecan-1.3.3/pecan/jsonify.py", line 108, in default
    return JSONEncoder.default(self, obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'LegacyRow' is not JSON serializable

The SQLALchemy migration guide says:

For mapping-like behaviors from a Row object, including support for
these methods as well as a key-oriented __contains__ operator, the API
going forward will be to first access a special attribute Row._mapping,
which will then provide a complete mapping interface to the row, rather
than a tuple interface.

This commit makes it possible to use SQLAlchemy 1.4 by handling these new returned classes as a special case and using _mapping to convert them to dicts.

+18 -0

0 comment

1 changed file

pr created time in 3 months

create barnchantlarr/pecan

branch : support_sqlalchemy_1_4

created branch time in 3 months

fork antlarr/pecan

A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.

http://pecanpy.org

fork in 3 months

fork antlarr/sqlalchemy

The Database Toolkit for Python

https://www.sqlalchemy.org

fork in 3 months