diff --git a/_service b/_service
index 71d174d..b89a4a8 100644
--- a/_service
+++ b/_service
@@ -4,11 +4,11 @@
@PARENT_TAG@
https://github.com/matrix-org/synapse.git
git
- v1.39.0
+ v1.40.0
v(.*)
\1
diff --git a/matrix-synapse-1.39.0.obscpio b/matrix-synapse-1.39.0.obscpio
deleted file mode 100644
index 9e9516c..0000000
--- a/matrix-synapse-1.39.0.obscpio
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:95cebd9d0b9c4690ee129fd33de1a88e93dedffed760658bb3b8633a6ea02231
-size 30644749
diff --git a/matrix-synapse-1.40.0.obscpio b/matrix-synapse-1.40.0.obscpio
new file mode 100644
index 0000000..80f8241
--- /dev/null
+++ b/matrix-synapse-1.40.0.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:41eb619a3dfcd0ec09d0e8c56f276857335c897d8bdb15e7a4033932437fe8f4
+size 30763533
diff --git a/matrix-synapse-test.spec b/matrix-synapse-test.spec
index 332421c..a411b1d 100644
--- a/matrix-synapse-test.spec
+++ b/matrix-synapse-test.spec
@@ -27,7 +27,7 @@
%define pkgname matrix-synapse
Name: %{pkgname}-test
-Version: 1.39.0
+Version: 1.40.0
Release: 0
Summary: Test package for %{pkgname}
License: Apache-2.0
diff --git a/matrix-synapse.changes b/matrix-synapse.changes
index 94130b4..0c2887e 100644
--- a/matrix-synapse.changes
+++ b/matrix-synapse.changes
@@ -1,3 +1,92 @@
+-------------------------------------------------------------------
+Tue Aug 10 13:38:13 UTC 2021 - Marcus Rueckert
+
+- Update to 1.40.0
+ - Features
+ - Support MSC3289: room version 8. (#10449)
+ - Add support for MSC2033: device_id on /account/whoami.
+ (#9918)
+ - Update support for MSC2716 - Incrementally importing history
+ into existing rooms. (#10245, #10432, #10463)
+ - Update support for MSC3083 to consider changes in the MSC
+ around which servers can issue join events. (#10254, #10447,
+ #10489)
+ - Initial support for MSC3244, Room version capabilities over
+ the /capabilities API. (#10283)
+ - Add a buffered logging handler which periodically flushes
+ itself. (#10407, #10515)
+ - Add support for https connections to a proxy server.
+ Contributed by @Bubu and @dklimpel. (#10411)
+ - Support for MSC2285 (hidden read receipts). Contributed by
+ @SimonBrandner. (#10413)
+ - Email notifications now state whether an invitation is to a
+ room or a space. (#10426)
+ - Allow setting transaction limit for database connections.
+ (#10440, #10511)
+ - Add creation_ts to "list users" admin API. (#10448)
+ - Bugfixes
+ - Mark the experimental room version from MSC2716 as unstable.
+ (#10449)
+ - Fix the PeriodicallyFlushingMemoryHandler inhibiting
+ application shutdown because of its background thread.
+ (#10517)
+ - Fix a bug introduced in Synapse v1.40.0rc1 that could cause
+ Synapse to respond with an error when clients would update
+ read receipts. (#10531)
+ - Improve character set detection in URL previews by supporting
+ underscores (in addition to hyphens). Contributed by
+ @srividyut. (#10410)
+ - Fix events being incorrectly rejected over federation if they
+ reference auth events that the server needed to fetch.
+ (#10439)
+ - Fix synapse_federation_server_oldest_inbound_pdu_in_staging
+ Prometheus metric to not report a max age of 51 years when
+ the queue is empty. (#10455)
+ - Fix a bug which caused an explicit assignment of power-level
+ 0 to a user to be misinterpreted in rare circumstances.
+ (#10499)
+ - Improved Documentation
+ - Fix broken links in upgrade.md. Contributed by @dklimpel.
+ (#10543)
+ - Fix hierarchy of providers on the OpenID page. (#10445)
+ - Consolidate development documentation to docs/development/.
+ (#10453)
+ - Add some developer docs to explain room DAG concepts like
+ outliers, state_groups, depth, etc. (#10464)
+ - Document how to use Complement while developing a new Synapse
+ feature. (#10483)
+ - Internal Changes
+ - Fix release script to open the correct URL for the release.
+ (#10516)
+ - Prune inbound federation queues for a room if they get too
+ large. (#10390)
+ - Add type hints to synapse.federation.transport.client module.
+ (#10408)
+ - Remove shebang line from module files. (#10415)
+ - Drop backwards-compatibility code that was required to
+ support Ubuntu Xenial. (#10429)
+ - Use a docker image cache for the prerequisites for the debian
+ package build. (#10431)
+ - Improve servlet type hints. (#10437, #10438)
+ - Replace usage of or_ignore in simple_insert with
+ simple_upsert usage, to stop spamming postgres logs with
+ spurious ERROR messages. (#10442)
+ - Update the tests-done Github Actions status. (#10444, #10512)
+ - Update type annotations to work with forthcoming Twisted
+ 21.7.0 release. (#10446, #10450)
+ - Cancel redundant GHA workflows when a new commit is pushed.
+ (#10451)
+ - Mitigate media repo XSS attacks on IE11 via the non-standard
+ X-Content-Security-Policy header. (#10468)
+ - Additional type hints in the state handler. (#10482)
+ - Update syntax used to run complement tests. (#10488)
+ - Fix up type annotations to work with Twisted 21.7. (#10490)
+ - Improve type annotations for ObservableDeferred. (#10491)
+ - Extend release script to also tag and create GitHub releases.
+ (#10496)
+ - Fix a bug which caused production debian packages to be
+ incorrectly marked as 'prerelease'. (#10500)
+
-------------------------------------------------------------------
Thu Jul 29 11:49:07 UTC 2021 - Marcus Rueckert
diff --git a/matrix-synapse.obsinfo b/matrix-synapse.obsinfo
index 4ce389a..3092106 100644
--- a/matrix-synapse.obsinfo
+++ b/matrix-synapse.obsinfo
@@ -1,5 +1,5 @@
name: matrix-synapse
-version: 1.39.0
-mtime: 1627549560
-commit: 6449955920157764ba8ba7bcb479de0c04b2c0d1
+version: 1.40.0
+mtime: 1628599858
+commit: 9f7c038272318bab09535e85e6bb4345ed2f1368
diff --git a/matrix-synapse.spec b/matrix-synapse.spec
index f8be460..02b55a9 100644
--- a/matrix-synapse.spec
+++ b/matrix-synapse.spec
@@ -47,7 +47,7 @@
%define pkgname matrix-synapse
%define eggname matrix_synapse
Name: %{pkgname}
-Version: 1.39.0
+Version: 1.40.0
Release: 0
Summary: Matrix protocol reference homeserver
License: Apache-2.0