Package to provide translation methods for pyramid, and means to reload translations without stopping the application

Overview

pyramid_localize

Latest PyPI version Documentation Status Wheel Status Supported Python Versions License

pyramid_localize is a pyramid extension providing ready-to-use, translation functionality for your pyramid based projects. All you need is to add Babel, and add some configuration. localize provides also a web interface that allows you to reload translations live, without reloading application.

Package resources

Instalation:

pip install pyramid_localize

or add pyramid_localize to your project requirements.

Comments
  • Set Language name and native_name from pycountry during creation

    Set Language name and native_name from pycountry during creation

    As specified in #8, this adds an event listener that should automatically set the name and native_name attributes of a Language object during its creation using databases from pycountry.

    In addition, if the language code is not valid/recognized, these values default to UNKNOWN.

    opened by rmed 6
  • Bump zope-sqlalchemy from 1.1.0 to 1.2

    Bump zope-sqlalchemy from 1.1.0 to 1.2

    Bumps zope-sqlalchemy from 1.1.0 to 1.2.

    Changelog

    Sourced from zope-sqlalchemy's changelog.

    1.2 (2019-10-17)

    • Drop support for Python 3.4.

    • Add support for Python 3.7 and 3.8.

    • Fix deprecation warnings for the event system. We already used it in general but still leveraged the old extension mechanism in some places. (#31)

      To make things clearer we renamed the ZopeTransactionExtension class to ZopeTransactionEvents. Existing code using the 'register' version stays compatible.

    1.1 (2019-01-03)

    • Add support to MySQL using pymysql.

    1.0 (2018-01-31)

    • Add support for Python 3.4 up to 3.6.
    • Support SQLAlchemy 1.2.
    • Drop support for Python 2.6, 3.2 and 3.3.
    • Drop support for transaction < 1.6.0.
    • Fix hazard that could cause SQLAlchemy session not to be committed when transaction is committed in rare situations. (#23)

    0.7.7 (2016-06-23)

    • Support SQLAlchemy 1.1. (#15)

    0.7.6 (2015-03-20)

    • Make version check in register compatible with prereleases.

    0.7.5 (2014-06-17)

    • Ensure mapped objects are expired following a transaction.commit() when no database commit was required. (#8)

    0.7.4 (2014-01-06)

    • Allow session.commit() on nested transactions to facilitate integration of existing code that might not use transaction.savepoint(). (#1)
    • Add a new function zope.sqlalchemy.register(), which replaces the direct use of ZopeTransactionExtension to make use of the newer SQLAlchemy event system to establish instrumentation on the given Session instance/class/factory. Requires at least SQLAlchemy 0.7. (#4)
    • Fix keep_session=True doesn't work when a transaction is joined by flush and other manngers bug. (#5)

    0.7.3 (2013-09-25)

    • Prevent the Session object from getting into a "wedged" state if joining a transaction fails. With thread scoped sessions that are reused this can cause persistent errors requiring a server restart. (#2)
    ... (truncated)
    Commits
    • 1c2a56f Preparing release 1.2
    • c54db13 Garden change log.
    • 829c415 Drop support for Python 3.4, add support for Python 3.8. (#35)
    • 1a62988 Fix link.
    • 57162d5 Garden change log.
    • 0ebebea Merge pull request #34 from zopefoundation/ctheune-fix-event-registration
    • fd191b4 Require SQLAlchemy > 0.7 and remove compatibility assertion for register()
    • 6cbf0eb Fix #31: stop using the deprecated "extension" way of registering events.
    • 59f18f0 Fix homepage URL.
    • 3119260 Add Python 3.7 to Travis (#33)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 5
  • Integrate pycountry

    Integrate pycountry

    Integrate pycountry into the locale model, we should be able to return data from pycountry, throu Language model (specific data based on the Language instance - language_code dependant)

    hacktoberfest 
    opened by fizyk 5
  • Bump pytest from 5.4.3 to 6.0.0

    Bump pytest from 5.4.3 to 6.0.0

    Bumps pytest from 5.4.3 to 6.0.0.

    Release notes

    Sourced from pytest's releases.

    6.0.0

    pytest 6.0.0 (2020-07-28)

    (Please see the full set of changes for this release also in the 6.0.0rc1 notes below)

    Breaking Changes

    • #5584: PytestDeprecationWarning are now errors by default.

      Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestDeprecationWarning now generate errors instead of warning messages.

      The affected features will be effectively removed in pytest 6.1, so please consult the Deprecations and Removals section in the docs for directions on how to update existing code.

      In the pytest 6.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

      [pytest]
      filterwarnings =
          ignore::pytest.PytestDeprecationWarning
      

      But this will stop working when pytest 6.1 is released.

      If you have concerns about the removal of a specific feature, please add a comment to #5584.

    • #7472: The exec_() and is_true() methods of _pytest._code.Frame have been removed.

    Features

    • #7464: Added support for NO_COLOR and FORCE_COLOR environment variables to control colored output.

    Improvements

    • #7467: --log-file CLI option and log_file ini marker now create subdirectories if needed.
    • #7489: The pytest.raises function has a clearer error message when match equals the obtained string but is not a regex match. In this case it is suggested to escape the regex.

    Bug Fixes

    • #7392: Fix the reported location of tests skipped with @pytest.mark.skip when --runxfail is used.
    Changelog

    Sourced from pytest's changelog.

    Commits
    • 41a4539 Add link to 6.0.0rc1 changelog
    • 45ced1d Update doc/en/announce/release-6.0.0.rst
    • 1e4b8d4 Prepare release version 6.0.0
    • 3802982 Support generating major releases using issue comments (#7548)
    • c2c0b7a Merge pull request #7545 from asottile/pylib_in_docs
    • 9818899 remove usage of pylib in docs
    • 3a060b7 Revert change to traceback repr (#7535)
    • 7ec6401 Change pytest deprecation warnings into errors for 6.0 release (#7362)
    • a9799f0 Merge pull request #7531 from bluetech/changelog-mypy-version
    • 102360b Merge pull request #7519 from hroncok/pytest_warning_captured_deprecated
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 4
  • Bump ridedott/merge-me-action from 2.9.82 to 2.9.84

    Bump ridedott/merge-me-action from 2.9.82 to 2.9.84

    Bumps ridedott/merge-me-action from 2.9.82 to 2.9.84.

    Release notes

    Sourced from ridedott/merge-me-action's releases.

    v2.9.84

    2.9.84 (2021-12-20)

    Chores

    • deps-dev: bump @​vercel/ncc from 0.33.0 to 0.33.1 (94c39f8)

    v2.9.83

    2.9.83 (2021-12-20)

    Chores

    • deps-dev: bump cspell from 5.13.3 to 5.13.4 (164515d)
    Changelog

    Sourced from ridedott/merge-me-action's changelog.

    2.9.84 (2021-12-20)

    Chores

    • deps-dev: bump @​vercel/ncc from 0.33.0 to 0.33.1 (94c39f8)

    2.9.83 (2021-12-20)

    Chores

    • deps-dev: bump cspell from 5.13.3 to 5.13.4 (164515d)
    Commits
    • e9fa630 chore(release): v2.9.84
    • 94c39f8 chore(deps-dev): bump @​vercel/ncc from 0.33.0 to 0.33.1
    • 1d622a2 chore(release): v2.9.83
    • 164515d chore(deps-dev): bump cspell from 5.13.3 to 5.13.4
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 3
  • Bump zope-sqlalchemy from 1.2 to 1.3

    Bump zope-sqlalchemy from 1.2 to 1.3

    Bumps zope-sqlalchemy from 1.2 to 1.3.

    Changelog

    Sourced from zope-sqlalchemy's changelog.

    1.3 (2020-02-17)

    • .datamanager.register() now returns the ZopeTransactionEvents instance which was used to register the events. This allows to change its parameters afterwards. (#40)
    • Add preliminary support for Python 3.9a3.
    Commits
    • eb37fba Preparing release 1.3
    • cd9b7db Document SQLAlchemy sessions wrapping
    • 522aca3 Add preliminary support for Python 3.9a3. (#42)
    • ca3a094 Restore possibility to change keep_session param. (#40)
    • b2227a3 Merge pull request #41 from martinstein/patch-1
    • 51209a9 Fix string comparison (use != instead of is not)
    • 47efbba Add upgrade instructions in changelog
    • 61673a4 Add so some more classifiers.
    • f863c8e Back to development: 1.3
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump coverage from 5.0.4 to 5.1

    Bump coverage from 5.0.4 to 5.1

    Bumps coverage from 5.0.4 to 5.1.

    Changelog

    Sourced from coverage's changelog.

    Version 5.1 --- 2020-04-12

    • The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria.
    • On Python 3.8, try-finally-return reported wrong branch coverage with decorated async functions (issue 964). This is now fixed. Thanks, Kjell Braden.
    • The ~coverage.Coverage.get_option and ~coverage.Coverage.set_option methods can now manipulate the [paths] configuration setting. Thanks to Bernát Gábor for the fix for issue 967.
    Commits
    • b854e61 Remove a no-longer needed wheel pin
    • dd11976 Prep for v5.1
    • b79005b New JSON info should be reported on individual files also.
    • b1194fb Merge pull request #966 from SZVector/json_dump_all_attributes
    • 42344f3 Beef up the test for get_option(paths)
    • fd43e35 Finish up #967. Thanks, Bernát Gábor
    • 97997d2 Merge pull request #969 from gaborbernat/967
    • f5eb5f2 Extending jsonreport.py to also include all branch attributes
    • 1720459 One clarification
    • b890a3d Make the questions heading so they can be linked to
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump pytest from 5.3.5 to 5.4.0

    Bump pytest from 5.3.5 to 5.4.0

    Bumps pytest from 5.3.5 to 5.4.0.

    Release notes

    Sourced from pytest's releases.

    pytest 5.4.0 (2020-03-12)

    Breaking Changes

    • #6316: Matching of -k EXPRESSION to test names is now case-insensitive.

    • #6443: Plugins specified with -p are now loaded after internal plugins, which results in their hooks being called before the internal ones.

      This makes the -p behavior consistent with PYTEST_PLUGINS.

    • #6637: Removed the long-deprecated pytest_itemstart hook.

      This hook has been marked as deprecated and not been even called by pytest for over 10 years now.

    • #6673: Reversed / fix meaning of "+/-" in error diffs. "-" means that sth. expected is missing in the result and "+" means that there are unexpected extras in the result.

    • #6737: The cached_result attribute of FixtureDef is now set to None when the result is unavailable, instead of being deleted.

      If your plugin performs checks like hasattr(fixturedef, 'cached_result'), for example in a pytest_fixture_post_finalizer hook implementation, replace it with fixturedef.cached_result is not None. If you del the attribute, set it to None instead.

    Deprecations

    • #3238: Option --no-print-logs is deprecated and meant to be removed in a future release. If you use --no-print-logs, please try out --show-capture and provide feedback.

      --show-capture command-line option was added in pytest 3.5.0 and allows to specify how to display captured output when tests fail: no, stdout, stderr, log or all (the default).

    • #571: Deprecate the unused/broken [pytest_collect_directory]{.title-ref} hook. It was misaligned since the removal of the Directory collector in 2010 and incorrect/unusable as soon as collection was split from test execution.

    • #5975: Deprecate using direct constructors for Nodes.

      Instead they are new constructed via Node.from_parent.

      This transitional mechanism enables us to detangle the very intensely entangled Node relationships by enforcing more controlled creation/configruation patterns.

      As part of that session/config are already disallowed parameters and as we work on the details we might need disallow a few more as well.

      Subclasses are expected to use [super().from_parent]{.title-ref} if they intend to expand the creation of [Nodes]{.title-ref}.

    • #6779: The TerminalReporter.writer attribute has been deprecated and should no longer be used. This was inadvertently exposed as part of the public API of that plugin and ties it too much

    ... (truncated)
    Changelog

    Sourced from pytest's changelog.

    Commits
    • c9fd1bd Preparing release version 5.4.0
    • 93aa988 Merge pull request #6901 from RonnyPfannschmidt/regendoc-fix-simple
    • 7996724 Merge pull request #6902 from RoyalTS/filterwarnings-docfix
    • 90ee8a7 docfix
    • 378a75d run and fix tox -e regen to prepare 5.4
    • e1b3a68 Merge pull request #6896 from nicoddemus/release-trigger
    • fb7dbc9 Merge pull request #6893 from RonnyPfannschmidt/url-fixes
    • a0ea300 Fix bot trigger event
    • 09b289e fix mozilla qa project link
    • 694dbe5 fix pydanny.com url to the one with ssl set up
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump mock from 3.0.5 to 4.0.0

    Bump mock from 3.0.5 to 4.0.0

    Bumps mock from 3.0.5 to 4.0.0.

    Changelog

    Sourced from mock's changelog.

    4.0.0

    • No Changes from 4.0.0b1.

    4.0.0b1

    • The release is a fresh cut of cpython's 4a686504__. All changes to mock from that commit and before are included in this release along with the subsequent changes listed below.

      __ https://github.com/python/cpython/commit/4a686504eb2bbf69adf78077458508a7ba131667

    • Issue #37972: Subscripts to the unittest.mock.call objects now receive the same chaining mechanism as any other custom attributes, so that the following usage no longer raises a `TypeError`:

      call().foo().__getitem__('bar')

      Patch by blhsing

    • Issue #38839: Fix some unused functions in tests. Patch by Adam Johnson.

    • Issue #39485: Fix a bug in unittest.mock.create_autospec that would complain about the wrong number of arguments for custom descriptors defined in an extension module returning functions.

    • Issue #39082: Allow AsyncMock to correctly patch static/class methods

    • Issue #38093: Fixes AsyncMock so it doesn't crash when used with AsyncContextManagers or AsyncIterators.

    • Issue #38859: AsyncMock now returns StopAsyncIteration on the exaustion of a side_effects iterable. Since PEP-479 its Impossible to raise a StopIteration exception from a coroutine.

    • Issue #38163: Child mocks will now detect their type as either synchronous or asynchronous, asynchronous child mocks will be AsyncMocks and synchronous child mocks will be either MagicMock or Mock (depending on their parent type).

    • Issue #38473: Use signature from inner mock for autospecced methods attached with unittest.mock.attach_mock. Patch by Karthikeyan Singaravelan.

    • Issue #38136: Changes AsyncMock call count and await count to be two different counters. Now await count only counts when a coroutine has been awaited, not when it has been called, and vice-versa. Update the documentation around this.

    • Issue #37555: Fix NonCallableMock._call_matcher returning tuple instead of _Call object when self._spec_signature exists. Patch by Elizabeth Uselton

    • Issue #37251: Remove __code__ check in AsyncMock that incorrectly evaluated function specs as async objects but failed to evaluate classes with __await__ but no __code__ attribute defined as async objects.

    • Issue #38669: Raise TypeError when passing target as a string with unittest.mock.patch.object.

    • Issue #25597: Ensure, if wraps is supplied to unittest.mock.MagicMock, it is used to calculate return values for the magic methods instead of using the default return values. Patch by Karthikeyan Singaravelan.

    • Issue #38108: Any synchronous magic methods on an AsyncMock now return a MagicMock. Any asynchronous magic methods on a MagicMock now return an AsyncMock.

    • Issue #21478: Record calls to parent when autospecced object is attached to a mock using unittest.mock.attach_mock. Patch by Karthikeyan Singaravelan.

    • Issue #38857: AsyncMock fix for return values that are awaitable types. This also covers side_effect iterable values that happend to be awaitable, and wraps callables that return an awaitable type. Before these awaitables were being awaited instead of being returned as is.

    • Issue #38932: Mock fully resets child objects on reset_mock(). Patch by Vegard Stikbakke

    • Issue #37685: Fixed __eq__, __lt__ etc implementations in some classes. They now return NotImplemented for unsupported type of the other operand. This allows the other operand to play role (for example the equality comparison with ~unittest.mock.ANY will return True).

    • Issue #37212: unittest.mock.call now preserves the order of keyword arguments in repr output. Patch by Karthikeyan Singaravelan.

    • Issue #37828: Fix default mock name in unittest.mock.Mock.assert_called exceptions. Patch by Abraham Toriz Cruz.

    • Issue #36871: Improve error handling for the assert_has_calls and assert_has_awaits methods of mocks. Fixed a bug where any errors encountered while binding the expected calls to the mock's spec were silently swallowed, leading to misleading error output.

    • Issue #21600: Fix mock.patch.stopall to stop active patches that were created with mock.patch.dict.

    • Issue #38161: Removes _AwaitEvent from AsyncMock.

    • Issue #36871: Ensure method signature is used instead of constructor signature of a class while asserting mock object against method calls. Patch by Karthikeyan Singaravelan.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    If all status checks pass Dependabot will automatically merge this pull request.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in the .dependabot/config.yml file in this repo:

    • Update frequency
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Bump codecov/codecov-action from 2.0.3 to 2.1.0

    Bump codecov/codecov-action from 2.0.3 to 2.1.0

    Bumps codecov/codecov-action from 2.0.3 to 2.1.0.

    Release notes

    Sourced from codecov/codecov-action's releases.

    v2.1.0

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    Changelog

    Sourced from codecov/codecov-action's changelog.

    2.1.0

    Features

    • #515 Allow specifying version of Codecov uploader

    Dependencies

    • #499 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • #508 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • #514 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    Commits
    • f32b3a3 Merge pull request #515 from codecov/specify-version
    • 72dfd47 Allow specifying version of Codecov uploader
    • 46edaed Merge pull request #499 from codecov/dependabot/npm_and_yarn/vercel/ncc-0.30.0
    • b6fd8cc Merge pull request #508 from codecov/dependabot/npm_and_yarn/openpgp-5.0.0
    • 07a4e97 build(deps-dev): bump @​vercel/ncc from 0.29.0 to 0.30.0
    • c071c70 build(deps): bump openpgp from 5.0.0-5 to 5.0.0
    • f6d4366 Merge pull request #514 from codecov/dependabot/npm_and_yarn/types/node-16.9.0
    • 2bbefc9 build(deps-dev): bump @​types/node from 16.6.0 to 16.9.0
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Bump ridedott/merge-me-action from 2.9.12 to 2.9.13

    Bump ridedott/merge-me-action from 2.9.12 to 2.9.13

    Bumps ridedott/merge-me-action from 2.9.12 to 2.9.13.

    Release notes

    Sourced from ridedott/merge-me-action's releases.

    v2.9.13

    2.9.13 (2021-08-11)

    Chores

    • deps-dev: bump @​types/jest from 26.0.24 to 27.0.0 (bfe44a5)
    Changelog

    Sourced from ridedott/merge-me-action's changelog.

    2.9.13 (2021-08-11)

    Chores

    • deps-dev: bump @​types/jest from 26.0.24 to 27.0.0 (bfe44a5)
    Commits
    • 666606b chore(release): v2.9.13
    • bfe44a5 chore(deps-dev): bump @​types/jest from 26.0.24 to 27.0.0
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 2
  • Path-aware language negotiator

    Path-aware language negotiator

    It is common pattern to carry the content language in URL as /en/foobar style path. This strategy is recommended by search engines. This might make sense to be included in pyramid_localize, so I am opening the discussion here.

    Here is a preliminary gist if one wants to try out this: https://gist.github.com/miohtama/b93fd1ab11353f86e2da2b484d761358

    enhancement 
    opened by miohtama 3
Releases(v0.0.4)
  • v0.0.4(Sep 13, 2013)

  • v0.1a1(Sep 13, 2013)

    • license information
    • requires at least pyramid 1.5a1 (rely on default localizer reify method)
    • py3 compatibility (require at least babel 1.0)
    • locale negotiator looks first for request attribute LOCALE

    backward incompatible +++++++++++++++++++++

    • required cookie name changed to LOCALE to be consistent with other places
    Source code(tar.gz)
    Source code(zip)
Owner
Grzegorz Śliwiński
Grzegorz Śliwiński
An app to automatically take attendance by scanning students' bar coded ID card as they enter the classroom.

Auto Classroom Attendance This application may be run on a PC to automatically scan students' ID card using a generic bar code scanner and output the

1 Nov 10, 2021
simple password manager.

simple password manager.

1 Nov 18, 2021
IOP Support for Python (Experimental)

TAGS Experimental IOP Framework for Python WARNING: Currently, this project has NO EXCEPTION HANDLING. USE AT YOUR OWN RISK! I. Introduction to Interf

1 Oct 22, 2021
A Python program for calculating the 95%CI for GNSS-derived site velocities

GNSS_Vel_95%CI A Python program for calculating the 95%CI for GNSS-derived site velocities Function_GNSS_95CI.py is a Python function for calculating

<a href=[email protected]"> 4 Dec 16, 2022
Grouping nucleotide coordinate ranges.

NuclRanger Grouping nucleotide coordinate ranges. A quick pre-processing step for "bedtools getfasta":- https://bedtools.readthedocs.io/en/latest/cont

Sujanavan Tiruvayipati 1 Oct 04, 2022
The fastest way to copy to (not from) high speed flash storage.

FastestCopy The fastest way to copy to (not from) high speed flash storage. This is about 3-6x faster than file copy on explorer.exe to usb flash driv

Derek Frombach 0 Nov 03, 2021
[arXiv 2020] Video Representation Learning with Visual Tempo Consistency

Video Representation Learning with Visual Tempo Consistency [Paper] [Project Page] News Full codebae is coming soon Pretained Models For now, we provi

DeciForce: Crossroads of Machine Perception and Autonomy 24 Nov 23, 2022
Calculatrix is a project where I'll create plenty of calculators in a lot of differents languages

Calculatrix What is Calculatrix ? Calculatrix is a project where I'll create plenty of calculators in a lot of differents languages. I know this sound

1 Jun 14, 2022
synchronize projects via yaml/json manifest. built on libvcs

vcspull - synchronize your repos. built on libvcs Manage your commonly used repos from YAML / JSON manifest(s). Compare to myrepos. Great if you use t

python utilities for version control 200 Dec 20, 2022
Google Foobar challenge solutions from my experience and other's on the web.

Google Foobar challenge Google Foobar challenge solutions from my experience and other's on the web. Note: Problems indicated with "Mine" are tested a

Islam Ayman 6 Jan 20, 2022
SymbLang are my programming language! Insired by the brainf**k.

SymbLang . - output as Unicode. , - input. ; - clear data. & - character that the main line start with. @value: 0 - 9 - character that the function

1 Apr 04, 2022
Different steganography methods with examples and my own small image database

literally-the-most-useless-project [Different steganography methods with examples and my own small image database] This project currently contains thr

Kamyishka 1 Dec 09, 2022
This is the improvised version of Dobot Magician which can be implemented for Dobot M1

pydobotM1 This is the edited driver for Dobot M1 version of the original pydobot library intended for use with the Dobot Magician. Here's what you nee

Shaik Abdullah 2 Jul 11, 2022
pgvector support for Python

pgvector-python pgvector support for Python Great for online recommendations 🎉 Supports Django, SQLAlchemy, Psycopg 2, Psycopg 3, and asyncpg Install

Andrew Kane 37 Dec 20, 2022
Integration of Hotwire's Turbo library with Flask.

turbo-flask Integration of Hotwire's Turbo library with Flask, to allow you to create applications that look and feel like single-page apps without us

Miguel Grinberg 240 Jan 06, 2023
Macros in Python: quasiquotes, case classes, LINQ and more!

MacroPy3 1.1.0b2 MacroPy is an implementation of Syntactic Macros in the Python Programming Language. MacroPy provides a mechanism for user-defined fu

Li Haoyi 3.2k Jan 06, 2023
Combines power of torch, numerical methods to conquer and solve ALL {O,P}DEs

torch_DE_solver Combines power of torch, numerical methods and math overall to conquer and solve ALL {O,P}DEs There are three examples to provide a li

Natural Systems Simulation Lab 28 Dec 12, 2022
Heads Down Application for Mac OSX

Heads Down A Mac app that lives in your ribbon—with a click of the mouse, temporarily block distracting websites and applications to encourage "heads

20 Mar 10, 2021
Python project that aims to discover CDP neighbors and map their Layer-2 topology within a shareable medium like Visio or Draw.io.

Python project that aims to discover CDP neighbors and map their Layer-2 topology within a shareable medium like Visio or Draw.io.

3 Feb 11, 2022
CountBoard 是一个基于Tkinter简单的,开源的桌面日程倒计时应用。

CountBoard 是一个基于Tkinter简单的,开源的桌面日程倒计时应用。 基本功能 置顶功能 是否使窗体一直保持在最上面。 简洁模式 简洁模式使窗体更加简洁。 此模式下不可调整大小,请提前在普通模式下调整大小。 设置功能 修改主窗体背景颜色,修改计时模式。 透明设置 调整窗体的透明度。 修改

gaoyongxian 130 Dec 01, 2022