Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-django-request for 
openSUSE:Factory checked in at 2022-05-12 22:59:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-request (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-request.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-request"

Thu May 12 22:59:57 2022 rev:3 rq:976387 version:1.6.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-django-request/python-django-request.changes  
    2022-02-25 21:25:38.491644408 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-django-request.new.1538/python-django-request.changes
    2022-05-12 23:00:22.172797542 +0200
@@ -1,0 +2,12 @@
+Wed May 11 12:12:59 UTC 2022 - pgaj...@suse.com
+
+- version update to 1.6.1
+  * Adds warning logging to middleware on invalid IP addresses in
+    ``REMOTE_ADDR``.
+  * Adds a missing migration to change ``help_text`` of ``Request.is_ajax``.
+- do not require python-mock for build
+- added patches
+  fix https://github.com/django-request/django-request/issues/245
+  + python-django-request-no-mock.patch
+
+-------------------------------------------------------------------

Old:
----
  django-request-1.6.0.tar.gz

New:
----
  django-request-1.6.1.tar.gz
  python-django-request-no-mock.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-django-request.spec ++++++
--- /var/tmp/diff_new_pack.bqzVLe/_old  2022-05-12 23:00:22.992798643 +0200
+++ /var/tmp/diff_new_pack.bqzVLe/_new  2022-05-12 23:00:23.000798654 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python3-%{**}}
 Name:           python-django-request
-Version:        1.6.0
+Version:        1.6.1
 Release:        0
 Summary:        Django statistics app
 License:        BSD-2-Clause
@@ -26,6 +26,8 @@
 Source:         
https://github.com/django-request/django-request/archive/%{version}.tar.gz#/django-request-%{version}.tar.gz
 # gh#django-request/django-request#241
 Patch0:         set-timezone-for-day-tests.patch
+# https://github.com/django-request/django-request/issues/245
+Patch1:         python-django-request-no-mock.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -33,7 +35,6 @@
 Requires:       python-python-dateutil
 BuildArch:      noarch
 # SECTION test requirements
-BuildRequires:  %{python_module mock}
 BuildRequires:  %{python_module Django >= 2.2}
 BuildRequires:  %{python_module python-dateutil}
 # /SECTION
@@ -60,7 +61,7 @@
 %python_exec -m django test -v 2
 
 %files %{python_files}
-%doc CHANGELOG.md README.md
+%doc CHANGELOG.md README.rst
 %license LICENSE
 %{python_sitelib}/*
 

++++++ django-request-1.6.0.tar.gz -> django-request-1.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/CHANGELOG.md 
new/django-request-1.6.1/CHANGELOG.md
--- old/django-request-1.6.0/CHANGELOG.md       2021-12-20 20:35:50.000000000 
+0100
+++ new/django-request-1.6.1/CHANGELOG.md       2022-01-09 16:09:51.000000000 
+0100
@@ -1,5 +1,16 @@
 # Changelog for django-request
 
+## 1.6.1
+
+### Enhancements
+
+* Adds warning logging to middleware on invalid IP addresses in
+  ``REMOTE_ADDR``.
+
+### Bug Fixes
+
+* Adds a missing migration to change ``help_text`` of ``Request.is_ajax``.
+
 ## 1.6.0
 
 ### Breaking
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/LICENSE 
new/django-request-1.6.1/LICENSE
--- old/django-request-1.6.0/LICENSE    2021-12-20 20:35:50.000000000 +0100
+++ new/django-request-1.6.1/LICENSE    2022-01-09 16:09:51.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2021, Kyle Fuller and Mariusz Felisiak
+Copyright (c) 2009-2022, Kyle Fuller and Mariusz Felisiak
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/README.md 
new/django-request-1.6.1/README.md
--- old/django-request-1.6.0/README.md  2021-12-20 20:35:50.000000000 +0100
+++ new/django-request-1.6.1/README.md  1970-01-01 01:00:00.000000000 +0100
@@ -1,51 +0,0 @@
-django-request
-==============
-
-[![Build 
Status](https://github.com/django-request/django-request/workflows/Tests/badge.svg?branch=master)](https://github.com/django-request/django-request/actions)
-[![Coverage 
Status](https://coveralls.io/repos/github/django-request/django-request/badge.svg?branch=master)](https://coveralls.io/github/django-request/django-request?branch=master)
-[![PyPI 
Version](https://img.shields.io/pypi/v/django-request.svg)](https://pypi.org/project/django-request/)
-
-django-request is a statistics module for django. It stores requests in a 
database for admins to see, it can also be used to get statistics on who is 
online etc.
-
-![Traffic graph](docs/graph.png)
-
-As well as a site statistics module, with the `active_users` template tag and 
manager method you can also use django-request to show who is online in a 
certain time.
-
-    Request.objects.active_users(minutes=15)
-
-To find the request overview page, please click on Requests inside the admin, 
then ???Overview??? on the top right, next to ???add request???.
-
-Requirements
-------------
-
-* **Python**: 3.6, 3.7, 3.8, 3.9, 3.10
-* **Django**: 2.2, 3.2, 4.0
-* **python-dateutil**
-
-django-request [1.5.1](https://pypi.org/project/django-request/1.5.1/) is the 
last version that supports Django 1.4, 1.5, 1.6.
-
-django-request [1.5.4](https://pypi.org/project/django-request/1.5.4/) is the
-last version that supports Django 1.7, 1.8, 1.9.
-
-django-request [1.5.5](https://pypi.org/project/django-request/1.5.5/) is the
-last version that supports Django 1.10.
-
-django-request [1.5.6](https://pypi.org/project/django-request/1.5.5/) is the
-last version that supports Django 1.11, 2.0, 2.1, 3.0, 3.1, and Python 2.7 and
-3.4.
-
-Installation
-------------
-
-- Put `'request'` in your `INSTALLED_APPS` setting.
-- Run the command `manage.py migrate`.
-- Add `request.middleware.RequestMiddleware` to `MIDDLEWARE`. If you use 
`django.contrib.auth.middleware.AuthenticationMiddleware`, place the 
`RequestMiddleware` after it. If you use 
`django.contrib.flatpages.middleware.FlatpageFallbackMiddleware` place 
`request.middleware.RequestMiddleware` before it else flatpages will be marked 
as error pages in the admin panel.
-- Add `REQUEST_BASE_URL` to your settings with the base URL of your site (e.g.
-  `https://www.my.site/`). This is used to calculate unique visitors and top
-  referrers. `REQUEST_BASE_URL` defaults to
-  `'http://%s' % Site.objects.get_current().domain`.
-
-Detailed documentation
-----------------------
-
-For a detailed documentation of django-request, or how to install 
django-request please see: 
[django-request](https://django-request.readthedocs.org/en/latest/) or the 
docs/ directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/README.rst 
new/django-request-1.6.1/README.rst
--- old/django-request-1.6.0/README.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/django-request-1.6.1/README.rst 2022-01-09 16:09:51.000000000 +0100
@@ -0,0 +1,74 @@
+django-request
+==============
+
+.. image:: 
https://github.com/django-request/django-request/workflows/Tests/badge.svg?branch=master
+    :alt: Build Status
+    :target: https://github.com/django-request/django-request/actions
+
+.. image:: 
https://coveralls.io/repos/github/django-request/django-request/badge.svg?branch=master
+    :alt: Coverage Status
+    :target: 
https://coveralls.io/github/django-request/django-request?branch=master
+
+.. image:: https://img.shields.io/pypi/v/django-request.svg
+    :alt: PyPI Version
+    :target: https://pypi.org/project/django-request/
+
+django-request is a statistics module for django. It stores requests in a
+database for admins to see, it can also be used to get statistics on who is
+online etc.
+
+.. image:: 
https://github.com/django-request/django-request/raw/master/docs/graph.png
+    :alt: Traffic graph
+
+As well as a site statistics module, with the ``active_users`` template tag and
+manager method you can also use django-request to show who is online in a
+certain time::
+
+    Request.objects.active_users(minutes=15)
+
+To find the request overview page, please click on Requests inside the admin,
+then ???Overview??? on the top right, next to ???add request???.
+
+Requirements
+------------
+
+* **Python**: 3.6, 3.7, 3.8, 3.9, 3.10
+* **Django**: 2.2, 3.2, 4.0
+* **python-dateutil**
+
+django-request 1.5.1_ is the last version that supports Django 1.4, 1.5, 1.6.
+
+django-request 1.5.4_ is the last version that supports Django 1.7, 1.8, 1.9.
+
+django-request 1.5.5_ is the last version that supports Django 1.10.
+
+django-request 1.5.6_ is the last version that supports Django 1.11, 2.0, 2.1,
+3.0, 3.1, and Python 2.7 and 3.4.
+
+.. _`1.5.1`: https://pypi.org/project/django-request/1.5.1/
+.. _`1.5.4`: https://pypi.org/project/django-request/1.5.4/
+.. _`1.5.5`: https://pypi.org/project/django-request/1.5.5/
+.. _`1.5.6`: https://pypi.org/project/django-request/1.5.6/
+
+Installation
+------------
+
+* Put ``'request'`` in your ``INSTALLED_APPS`` setting.
+* Run the command ``manage.py migrate``.
+* Add ``request.middleware.RequestMiddleware`` to ``MIDDLEWARE``. If you use
+  ``django.contrib.auth.middleware.AuthenticationMiddleware``, place the
+  ``RequestMiddleware`` after it. If you use
+  ``django.contrib.flatpages.middleware.FlatpageFallbackMiddleware`` place
+  ``request.middleware.RequestMiddleware`` before it else flatpages will be
+  marked as error pages in the admin panel.
+* Add ``REQUEST_BASE_URL`` to your settings with the base URL of your site
+  (e.g. ``https://www.my.site/``). This is used to calculate unique visitors
+  and top referrers. ``REQUEST_BASE_URL`` defaults to
+  ``'http://%s' % Site.objects.get_current().domain``.
+
+Detailed documentation
+----------------------
+
+For a detailed documentation of django-request, or how to install
+django-request please see: `django-request
+<https://django-request.readthedocs.org/en/latest/>`_ or the docs/ directory.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/docs/long_description.txt 
new/django-request-1.6.1/docs/long_description.txt
--- old/django-request-1.6.0/docs/long_description.txt  2021-12-20 
20:35:50.000000000 +0100
+++ new/django-request-1.6.1/docs/long_description.txt  2022-01-09 
16:09:51.000000000 +0100
@@ -1,4 +1,6 @@
-.. include:: description.txt
+django-request is a statistics module for django. It stores requests in a
+database for admins to see, it can also be used to get statistics on who is
+online etc.
 
 .. image:: 
https://github.com/django-request/django-request/raw/master/docs/graph.png
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/request/__init__.py 
new/django-request-1.6.1/request/__init__.py
--- old/django-request-1.6.0/request/__init__.py        2021-12-20 
20:35:50.000000000 +0100
+++ new/django-request-1.6.1/request/__init__.py        2022-01-09 
16:09:51.000000000 +0100
@@ -1,5 +1,5 @@
-__version__ = '1.6.0'
-__copyright__ = 'Copyright (c) 2009-2021, Kyle Fuller, Mariusz Felisiak'
+__version__ = '1.6.1'
+__copyright__ = 'Copyright (c) 2009-2022, Kyle Fuller, Mariusz Felisiak'
 __author__ = [
     'Kyle Fuller <k...@fuller.li>',
     'Jannis Leidel (jezdez)',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/request/middleware.py 
new/django-request-1.6.1/request/middleware.py
--- old/django-request-1.6.0/request/middleware.py      2021-12-20 
20:35:50.000000000 +0100
+++ new/django-request-1.6.1/request/middleware.py      2022-01-09 
16:09:51.000000000 +0100
@@ -1,3 +1,5 @@
+import logging
+
 from django.core.exceptions import ValidationError
 from django.utils.deprecation import MiddlewareMixin
 
@@ -6,6 +8,8 @@
 from .router import Patterns
 from .utils import request_is_ajax
 
+logger = logging.getLogger('request.security.middleware')
+
 
 class RequestMiddleware(MiddlewareMixin):
     def process_response(self, request, response):
@@ -37,8 +41,13 @@
         try:
             r.from_http_request(request, response, commit=False)
             r.full_clean()
-        except ValidationError:
-            pass
+        except ValidationError as exc:
+            logger.warning(
+                'Bad request: %s',
+                str(exc),
+                exc_info=exc,
+                extra={'status_code': 400, 'request': request},
+            )
         else:
             r.save()
         return response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/django-request-1.6.0/request/migrations/0007_alter_request_is_ajax.py 
new/django-request-1.6.1/request/migrations/0007_alter_request_is_ajax.py
--- old/django-request-1.6.0/request/migrations/0007_alter_request_is_ajax.py   
1970-01-01 01:00:00.000000000 +0100
+++ new/django-request-1.6.1/request/migrations/0007_alter_request_is_ajax.py   
2022-01-09 16:09:51.000000000 +0100
@@ -0,0 +1,20 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('request', '0006_alter_request_method_default'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='request',
+            name='is_ajax',
+            field=models.BooleanField(
+                default=False,
+                help_text='Whether this request was used via JavaScript.',
+                verbose_name='is ajax',
+            ),
+        ),
+    ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/setup.cfg 
new/django-request-1.6.1/setup.cfg
--- old/django-request-1.6.0/setup.cfg  2021-12-20 20:35:50.000000000 +0100
+++ new/django-request-1.6.1/setup.cfg  2022-01-09 16:09:51.000000000 +0100
@@ -1,14 +1,14 @@
 [metadata]
 name = django-request
-version = 1.6.0
+version = 1.6.1
 url = https://django-request.readthedocs.io/en/latest/
 download_url = https://pypi.org/project/django-request/
 author = Kyle Fuller
 author_email = k...@fuller.li
 maintainer = Mariusz Felisiak
 maintainer_email = felisiak.mari...@gmail.com
-description = file: docs/description.txt
-long_description = file: docs/long_description.txt
+description = django-request is a statistics module for django. It stores 
requests in a database for admins to see, it can also be used to get statistics 
on who is online etc.
+long_description = file: README.rst
 long_description_content_type = text/x-rst
 license = BSD
 license_files = LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/django-request-1.6.0/tests/test_middlewares.py 
new/django-request-1.6.1/tests/test_middlewares.py
--- old/django-request-1.6.0/tests/test_middlewares.py  2021-12-20 
20:35:50.000000000 +0100
+++ new/django-request-1.6.1/tests/test_middlewares.py  2022-01-09 
16:09:51.000000000 +0100
@@ -136,7 +136,12 @@
     def test_invalid_addr(self):
         request = self.factory.get('/foo')
         request.META['REMOTE_ADDR'] = 'invalid-addr'
-        self.middleware(request)
+        with self.assertLogs('request.security.middleware', 'WARNING') as cm:
+            self.middleware(request)
+        self.assertIn(
+            "Bad request: {'ip': ['Enter a valid IPv4 or IPv6 address.']}",
+            cm.output[0],
+        )
         self.assertEqual(Request.objects.count(), 0)
 
     @mock.patch('request.middleware.settings.IGNORE_USER_AGENTS',

++++++ python-django-request-no-mock.patch ++++++
diff -upr django-request-1.6.1.orig/tests/test_command.py 
django-request-1.6.1/tests/test_command.py
--- django-request-1.6.1.orig/tests/test_command.py     2022-05-11 
13:48:09.679479134 +0200
+++ django-request-1.6.1/tests/test_command.py  2022-05-11 13:48:09.683479158 
+0200
@@ -1,7 +1,7 @@
 from datetime import timedelta
 from io import StringIO
 
-import mock
+from unittest import mock
 from django.core.management.base import CommandError
 from django.test import TestCase
 from django.utils.timezone import now
diff -upr django-request-1.6.1.orig/tests/test_middlewares.py 
django-request-1.6.1/tests/test_middlewares.py
--- django-request-1.6.1.orig/tests/test_middlewares.py 2022-05-11 
13:48:09.679479134 +0200
+++ django-request-1.6.1/tests/test_middlewares.py      2022-05-11 
13:48:09.683479158 +0200
@@ -1,4 +1,4 @@
-import mock
+from unittest import mock
 from django.contrib.auth import get_user_model
 from django.http import HttpResponse, HttpResponseServerError
 from django.test import RequestFactory, TestCase
diff -upr django-request-1.6.1.orig/tests/test_models.py 
django-request-1.6.1/tests/test_models.py
--- django-request-1.6.1.orig/tests/test_models.py      2022-05-11 
13:48:09.679479134 +0200
+++ django-request-1.6.1/tests/test_models.py   2022-05-11 13:48:09.683479158 
+0200
@@ -1,7 +1,7 @@
 import socket
 from datetime import datetime
 
-import mock
+from unittest import mock
 from django.contrib.auth import get_user_model
 from django.http import HttpRequest, HttpResponse
 from django.test import TestCase
diff -upr django-request-1.6.1.orig/tests/test_plugins.py 
django-request-1.6.1/tests/test_plugins.py
--- django-request-1.6.1.orig/tests/test_plugins.py     2022-05-11 
13:48:09.679479134 +0200
+++ django-request-1.6.1/tests/test_plugins.py  2022-05-11 13:48:09.683479158 
+0200
@@ -1,4 +1,4 @@
-import mock
+from unittest import mock
 from django.core import exceptions
 from django.test import TestCase
 
diff -upr django-request-1.6.1.orig/tests/test_traffic.py 
django-request-1.6.1/tests/test_traffic.py
--- django-request-1.6.1.orig/tests/test_traffic.py     2022-05-11 
13:48:09.679479134 +0200
+++ django-request-1.6.1/tests/test_traffic.py  2022-05-11 13:48:09.687479185 
+0200
@@ -1,4 +1,4 @@
-import mock
+from unittest import mock
 from django.core import exceptions
 from django.test import TestCase
 

Reply via email to