content_type stringclasses 8 values | main_lang stringclasses 7 values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Javascript | Javascript | update amp-first example to use gssp | b092ff72b9be4812cfd4a80b63478076170f6c6f | <ide><path>examples/amp-first/pages/index.js
<ide> const Home = props => (
<ide> )
<ide>
<ide> // amp-script requires absolute URLs, so we create a property `host` which we can use to calculate the script URL.
<del>Home.getInitialProps = async ({ req }) => {
<add>export async function getServerSideProps({ req }) {
<ide> // WARNING: This is a generally unsafe application unless you're deploying to a managed platform like ZEIT Now.
<ide> // Be sure your load balancer is configured to not allow spoofed host headers.
<del> return { host: `${getProtocol(req)}://${req.headers.host}` }
<add> return { props: { host: `${getProtocol(req)}://${req.headers.host}` } }
<ide> }
<ide>
<ide> function getProtocol(req) { | 1 |
Javascript | Javascript | add missing copyright notices | 1df77a743890e6007126044c3331c936572e6e2a | <ide><path>lib/_tls_legacy.js
<add>// Copyright Joyent, Inc. and other Node contributors.
<add>//
<add>// Permission is hereby granted, free of charge, to any person obtaining a
<add>// copy of this software and associated documentation files (the
<add>// "Software"), to deal in the Software without restriction, including
<add>// without limitation the rights to use, copy, modify, merge, publish,
<add>// distribute, sublicense, and/or sell copies of the Software, and to permit
<add>// persons to whom the Software is furnished to do so, subject to the
<add>// following conditions:
<add>//
<add>// The above copyright notice and this permission notice shall be included
<add>// in all copies or substantial portions of the Software.
<add>//
<add>// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
<add>// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
<add>// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
<add>// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
<add>// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
<add>// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
<add>// USE OR OTHER DEALINGS IN THE SOFTWARE.
<add>
<ide> var assert = require('assert');
<ide> var crypto = require('crypto');
<ide> var events = require('events');
<ide><path>lib/_tls_wrap.js
<add>// Copyright Joyent, Inc. and other Node contributors.
<add>//
<add>// Permission is hereby granted, free of charge, to any person obtaining a
<add>// copy of this software and associated documentation files (the
<add>// "Software"), to deal in the Software without restriction, including
<add>// without limitation the rights to use, copy, modify, merge, publish,
<add>// distribute, sublicense, and/or sell copies of the Software, and to permit
<add>// persons to whom the Software is furnished to do so, subject to the
<add>// following conditions:
<add>//
<add>// The above copyright notice and this permission notice shall be included
<add>// in all copies or substantial portions of the Software.
<add>//
<add>// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
<add>// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
<add>// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
<add>// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
<add>// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
<add>// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
<add>// USE OR OTHER DEALINGS IN THE SOFTWARE.
<add>
<ide> var assert = require('assert');
<ide> var constants = require('constants');
<ide> var crypto = require('crypto'); | 2 |
Ruby | Ruby | fix scaffold generator with --helper=false option | 4ba0e2fc22614cb15a7a22fe75697f367c3bcaa8 | <ide><path>railties/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb
<ide> class ScaffoldControllerGenerator < NamedBase # :nodoc:
<ide>
<ide> check_class_collision suffix: "Controller"
<ide>
<add> class_option :helper, type: :boolean
<ide> class_option :orm, banner: "NAME", type: :string, required: true,
<ide> desc: "ORM to generate the controller for"
<ide>
<ide><path>railties/test/generators/scaffold_generator_test.rb
<ide> def test_scaffold_generator_with_switch_resource_route_false
<ide> end
<ide> end
<ide>
<add> def test_scaffold_generator_no_helper_with_switch_no_helper
<add> output = run_generator [ "posts", "--no-helper" ]
<add>
<add> assert_no_match /error/, output
<add> assert_no_file "app/helpers/posts_helper.rb"
<add> end
<add>
<add> def test_scaffold_generator_no_helper_with_switch_helper_false
<add> output = run_generator [ "posts", "--helper=false" ]
<add>
<add> assert_no_match /error/, output
<add> assert_no_file "app/helpers/post_helper.rb"
<add> end
<add>
<ide> def test_scaffold_generator_no_stylesheets
<ide> run_generator [ "posts", "--no-stylesheets" ]
<ide> assert_no_file "app/assets/stylesheets/scaffold.css" | 2 |
Text | Text | fix indentation in bulleted list | 5ee80c011526e5d9f7cc19ff068cf081d8b78197 | <ide><path>docs/rfcs/002-atom-nightly-releases.md
<ide> The impact of not taking this approach is that we continue to have to wait 1-2 m
<ide> - Atom Reactor
<ide> - Atom Dev - Currently the name of dev builds but it might make sense to leave that for "normal" builds from `master`
<ide>
<del>According to a [Twitter poll](https://twitter.com/daviwil/status/1006545552987701248) with about 1,600 responses, 50% of the voters chose "Atom Nightly". The final name will be determined before launch.
<add> According to a [Twitter poll](https://twitter.com/daviwil/status/1006545552987701248) with about 1,600 responses, 50% of the voters chose "Atom Nightly". The final name will be determined before launch.
<ide>
<ide> - **Will Electron's new autoUpdate service work for all Atom releases?**
<ide> | 1 |
Javascript | Javascript | create error class for cache store errors | f12b8abcc09534202ca57ba124c10517a408c9fd | <ide><path>lib/Compilation.js
<ide> const ModuleGraph = require("./ModuleGraph");
<ide> const ModuleNotFoundError = require("./ModuleNotFoundError");
<ide> const ModuleProfile = require("./ModuleProfile");
<ide> const ModuleRestoreError = require("./ModuleRestoreError");
<add>const ModuleStoreError = require("./ModuleStoreError");
<ide> const ModuleTemplate = require("./ModuleTemplate");
<ide> const RuntimeGlobals = require("./RuntimeGlobals");
<ide> const RuntimeTemplate = require("./RuntimeTemplate");
<ide> class Compilation {
<ide> }
<ide> if (err) {
<ide> this.hooks.failedModule.call(module, err);
<del> return callback(err);
<add> return callback(new ModuleStoreError(module, err));
<ide> }
<ide> this.hooks.succeedModule.call(module);
<ide> return callback();
<ide><path>lib/ModuleStoreError.js
<add>/*
<add> MIT License http://www.opensource.org/licenses/mit-license.php
<add> Author Tobias Koppers @sokra
<add>*/
<add>
<add>"use strict";
<add>
<add>const WebpackError = require("./WebpackError");
<add>
<add>/** @typedef {import("./Module")} Module */
<add>
<add>class ModuleStoreError extends WebpackError {
<add> /**
<add> * @param {Module} module module tied to dependency
<add> * @param {string | Error} err error thrown
<add> */
<add> constructor(module, err) {
<add> let message = "Module storing failed: ";
<add> let details = undefined;
<add> if (err !== null && typeof err === "object") {
<add> if (typeof err.stack === "string" && err.stack) {
<add> const stack = err.stack;
<add> message += stack;
<add> } else if (typeof err.message === "string" && err.message) {
<add> message += err.message;
<add> } else {
<add> message += err;
<add> }
<add> } else {
<add> message += String(err);
<add> }
<add>
<add> super(message);
<add>
<add> this.name = "ModuleStoreError";
<add> this.details = details;
<add> this.module = module;
<add> this.error = err;
<add>
<add> Error.captureStackTrace(this, this.constructor);
<add> }
<add>}
<add>
<add>module.exports = ModuleStoreError; | 2 |
Go | Go | fix regression in docker-proxy | 4f9af99194125e948f5b108e064bab2798248236 | <ide><path>libnetwork/drivers/bridge/port_mapping.go
<ide> func (n *bridgeNetwork) allocatePortsInternal(bindings []types.PortBinding, cont
<ide> }
<ide> bs = append(bs, bIPv4)
<ide> }
<add>
<ide> // Allocate IPv6 Port mappings
<del> if ok := n.validatePortBindingIPv6(&bIPv6, containerIPv6, defHostIP); ok {
<add> // If the container has no IPv6 address, allow proxying host IPv6 traffic to it
<add> // by setting up the binding with the IPv4 interface if the userland proxy is enabled
<add> // This change was added to keep backward compatibility
<add> containerIP := containerIPv6
<add> if ulPxyEnabled && (containerIPv6 == nil) {
<add> containerIP = containerIPv4
<add> }
<add> if ok := n.validatePortBindingIPv6(&bIPv6, containerIP, defHostIP); ok {
<ide> if err := n.allocatePort(&bIPv6, ulPxyEnabled); err != nil {
<ide> // On allocation failure, release previously allocated ports. On cleanup error, just log a warning message
<ide> if cuErr := n.releasePortsInternal(bs); cuErr != nil {
<ide> func (n *bridgeNetwork) allocatePortsInternal(bindings []types.PortBinding, cont
<ide> // validatePortBindingIPv4 validates the port binding, populates the missing Host IP field and returns true
<ide> // if this is a valid IPv4 binding, else returns false
<ide> func (n *bridgeNetwork) validatePortBindingIPv4(bnd *types.PortBinding, containerIPv4, defHostIP net.IP) bool {
<del> //Return early if there is a valid Host IP, but its not a IPv6 address
<add> //Return early if there is a valid Host IP, but its not a IPv4 address
<ide> if len(bnd.HostIP) > 0 && bnd.HostIP.To4() == nil {
<ide> return false
<ide> }
<ide> func (n *bridgeNetwork) validatePortBindingIPv4(bnd *types.PortBinding, containe
<ide> }
<ide>
<ide> // validatePortBindingIPv6 validates the port binding, populates the missing Host IP field and returns true
<del>// if this is a valid IP6v binding, else returns false
<del>func (n *bridgeNetwork) validatePortBindingIPv6(bnd *types.PortBinding, containerIPv6, defHostIP net.IP) bool {
<del> // Return early if there is no IPv6 container endpoint
<del> if containerIPv6 == nil {
<add>// if this is a valid IPv6 binding, else returns false
<add>func (n *bridgeNetwork) validatePortBindingIPv6(bnd *types.PortBinding, containerIP, defHostIP net.IP) bool {
<add> // Return early if there is no container endpoint
<add> if containerIP == nil {
<ide> return false
<ide> }
<ide> // Return early if there is a valid Host IP, which is a IPv4 address
<ide> func (n *bridgeNetwork) validatePortBindingIPv6(bnd *types.PortBinding, containe
<ide> return false
<ide> }
<ide> }
<del> bnd.IP = containerIPv6
<add> bnd.IP = containerIP
<ide> return true
<del>
<ide> }
<ide>
<ide> func (n *bridgeNetwork) allocatePort(bnd *types.PortBinding, ulPxyEnabled bool) error { | 1 |
PHP | PHP | remove unnecessary whitespace | 32325d9dbf3f4f0941f27d3c2496fed33d3cb975 | <ide><path>src/Illuminate/Redis/RedisManager.php
<ide> public function disableEvents()
<ide> {
<ide> $this->events = false;
<ide> }
<del>
<add>
<ide> /**
<ide> * Change the default driver.
<ide> * | 1 |
Javascript | Javascript | add {{debugger}} helper | f3245cb111a495c413e0f346e0af3fcc754a7674 | <ide><path>packages/ember-htmlbars/lib/helpers/debugger.js
<add>/*jshint debug:true*/
<add>
<add>/**
<add>@module ember
<add>@submodule ember-handlebars
<add>*/
<add>import Logger from "ember-metal/logger";
<add>
<add>/**
<add> Execute the `debugger` statement in the current context.
<add>
<add> ```handlebars
<add> {{debugger}}
<add> ```
<add>
<add> Before invoking the `debugger` statement, there
<add> are a few helpful variables defined in the
<add> body of this helper that you can inspect while
<add> debugging that describe how and where this
<add> helper was invoked:
<add>
<add> - templateContext: this is most likely a controller
<add> from which this template looks up / displays properties
<add> - typeOfTemplateContext: a string description of
<add> what the templateContext is
<add>
<add> For example, if you're wondering why a value `{{foo}}`
<add> isn't rendering as expected within a template, you
<add> could place a `{{debugger}}` statement, and when
<add> the `debugger;` breakpoint is hit, you can inspect
<add> `templateContext`, determine if it's the object you
<add> expect, and/or evaluate expressions in the console
<add> to perform property lookups on the `templateContext`:
<add>
<add> ```
<add> > templateContext.get('foo') // -> "<value of {{foo}}>"
<add> ```
<add>
<add> @method debugger
<add> @for Ember.Handlebars.helpers
<add> @param {String} property
<add>*/
<add>export function debuggerHelper(options) {
<add>
<add> // These are helpful values you can inspect while debugging.
<add> /* jshint unused: false */
<add> var view = this;
<add> Logger.info('Use `this` to access the view context.');
<add>
<add> debugger;
<add>}
<ide><path>packages/ember-htmlbars/lib/main.js
<ide> import { viewHelper } from "ember-htmlbars/helpers/view";
<ide> import { yieldHelper } from "ember-htmlbars/helpers/yield";
<ide> import { withHelper } from "ember-htmlbars/helpers/with";
<ide> import { logHelper } from "ember-htmlbars/helpers/log";
<add>import { debuggerHelper } from "ember-htmlbars/helpers/debugger";
<ide> import {
<ide> ifHelper,
<ide> unlessHelper,
<ide> registerHelper('unless', unlessHelper);
<ide> registerHelper('unboundIf', unboundIfHelper);
<ide> registerHelper('boundIf', boundIfHelper);
<ide> registerHelper('log', logHelper);
<add>registerHelper('debugger', debuggerHelper);
<ide>
<ide> export var defaultEnv = {
<ide> dom: new DOMHelper(), | 2 |
Text | Text | update example for whitelisting arbitrary hashes | 17af429958a863ee25a9e847d84cf394259338b0 | <ide><path>guides/source/action_controller_overview.md
<ide> with a `has_many` association:
<ide> params.require(:book).permit(:title, chapters_attributes: [:title])
<ide> ```
<ide>
<del>#### Outside the Scope of Strong Parameters
<del>
<del>The strong parameter API was designed with the most common use cases
<del>in mind. It is not meant as a silver bullet to handle all of your
<del>whitelisting problems. However, you can easily mix the API with your
<del>own code to adapt to your situation.
<del>
<ide> Imagine a scenario where you have parameters representing a product
<ide> name and a hash of arbitrary data associated with that product, and
<ide> you want to whitelist the product name attribute and also the whole
<del>data hash. The strong parameters API doesn't let you directly
<del>whitelist the whole of a nested hash with any keys, but you can use
<del>the keys of your nested hash to declare what to whitelist:
<add>data hash:
<ide>
<ide> ```ruby
<ide> def product_params
<del> params.require(:product).permit(:name, data: params[:product][:data].try(:keys))
<add> params.require(:product).permit(:name, data: {})
<ide> end
<ide> ```
<ide>
<add>#### Outside the Scope of Strong Parameters
<add>
<add>The strong parameter API was designed with the most common use cases
<add>in mind. It is not meant as a silver bullet to handle all of your
<add>whitelisting problems. However, you can easily mix the API with your
<add>own code to adapt to your situation.
<add>
<ide> Session
<ide> -------
<ide> | 1 |
Javascript | Javascript | reach res._dump after abort clientrequest | f5b8853d4030bfd95be922a6dd38e671e1907109 | <ide><path>test/parallel/test-http-client-abort-response-event.js
<add>'use strict';
<add>const common = require('../common');
<add>const http = require('http');
<add>const net = require('net');
<add>const server = http.createServer(function(req, res) {
<add> res.end();
<add>});
<add>
<add>server.listen(0, common.mustCall(function() {
<add> const req = http.request({
<add> port: this.address().port
<add> }, common.mustCall());
<add>
<add> req.on('abort', common.mustCall(function() {
<add> server.close();
<add> }));
<add>
<add> req.end();
<add> req.abort();
<add>
<add> req.emit('response', new http.IncomingMessage(new net.Socket()));
<add>})); | 1 |
Python | Python | fix generation of v8 constants on freebsd | 88217ec276be56d531912773045a262da4eb240c | <ide><path>tools/genv8constants.py
<ide> sys.exit(2);
<ide>
<ide> outfile = file(sys.argv[1], 'w');
<del>pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ],
<del> bufsize=-1, stdout=subprocess.PIPE).stdout;
<del>pattern = re.compile('(00000000|0000000000000000) <(.*)>:');
<add>try:
<add> pipe = subprocess.Popen([ 'objdump', '-z', '-D', sys.argv[2] ],
<add> bufsize=-1, stdout=subprocess.PIPE).stdout;
<add>except OSError, e:
<add> if e.errno == errno.ENOENT:
<add> print '''
<add> Node.js compile error: could not find objdump
<add>
<add> Check that GNU binutils are installed and included in PATH
<add> '''
<add> else:
<add> print 'problem running objdump: ', e.strerror
<add>
<add> sys.exit()
<add>
<add>pattern = re.compile('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:');
<ide> v8dbg = re.compile('^v8dbg.*$')
<ide> numpattern = re.compile('^[0-9a-fA-F]{2} $');
<ide> octets = 4
<ide> def out_reset():
<ide> def out_define():
<ide> global curr_sym, curr_val, curr_octet, outfile, octets
<ide> if curr_sym != None:
<add> wrapped_val = curr_val & 0xffffffff;
<ide> if curr_val & 0x80000000 != 0:
<del> outfile.write("#define %s -0x%x\n" % (curr_sym.upper(), 0x100000000 - curr_val));
<add> wrapped_val = 0x100000000 - wrapped_val;
<add> outfile.write("#define %s -0x%x\n" % (curr_sym.upper(), wrapped_val));
<ide> else:
<del> outfile.write("#define %s 0x%x\n" % (curr_sym.upper(), curr_val));
<add> outfile.write("#define %s 0x%x\n" % (curr_sym.upper(), wrapped_val));
<ide> out_reset();
<ide>
<ide> for line in pipe:
<ide> def out_define():
<ide> if match == None:
<ide> continue;
<ide>
<del> octets = len(match.group(1)) / 2;
<del>
<ide> # Print previous symbol
<ide> out_define();
<ide> | 1 |
Javascript | Javascript | add colorwrite support to loaders | 40a7b6fbe489bd131b3955779afb5500f0aae01f | <ide><path>src/loaders/Loader.js
<ide> THREE.Loader.prototype = {
<ide> break;
<ide> case 'depthTest':
<ide> case 'depthWrite':
<add> case 'colorWrite':
<ide> case 'opacity':
<ide> case 'reflectivity':
<ide> case 'transparent':
<ide><path>src/loaders/MaterialLoader.js
<ide> THREE.MaterialLoader.prototype = {
<ide> if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest;
<ide> if ( json.depthTest !== undefined ) material.depthTest = json.depthTest;
<ide> if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite;
<add> if ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite;
<ide> if ( json.wireframe !== undefined ) material.wireframe = json.wireframe;
<ide> if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;
<ide> | 2 |
Ruby | Ruby | propagate frozen state during transaction changes | c6fd24643604b5779a76527e6364f21ee5cc3ce0 | <ide><path>activerecord/lib/active_record/transactions.rb
<ide> def with_transaction_returning_status
<ide> # Save the new record state and id of a record so it can be restored later if a transaction fails.
<ide> def remember_transaction_record_state #:nodoc:
<ide> @_start_transaction_state[:id] = id
<del> unless @_start_transaction_state.include?(:new_record)
<del> @_start_transaction_state[:new_record] = @new_record
<del> end
<del> unless @_start_transaction_state.include?(:destroyed)
<del> @_start_transaction_state[:destroyed] = @destroyed
<del> end
<add> @_start_transaction_state.reverse_merge!(
<add> new_record: @new_record,
<add> destroyed: @destroyed,
<add> frozen?: frozen?
<add> )
<ide> @_start_transaction_state[:level] = (@_start_transaction_state[:level] || 0) + 1
<del> @_start_transaction_state[:frozen?] = frozen?
<ide> end
<ide>
<ide> # Clear the new record state and id of a record.
<ide><path>activerecord/test/cases/transactions_test.rb
<ide> def test_restore_active_record_state_for_all_records_in_a_transaction
<ide> assert !@second.destroyed?, 'not destroyed'
<ide> end
<ide>
<add> def test_restore_frozen_state_after_double_destroy
<add> topic = Topic.create
<add> reply = topic.replies.create
<add>
<add> Topic.transaction do
<add> topic.destroy # calls #destroy on reply (since dependent: destroy)
<add> reply.destroy
<add>
<add> raise ActiveRecord::Rollback
<add> end
<add>
<add> assert !reply.frozen?, 'not frozen'
<add> end
<add>
<ide> def test_sqlite_add_column_in_transaction
<ide> return true unless current_adapter?(:SQLite3Adapter)
<ide> | 2 |
Ruby | Ruby | initialize instance variables in initialize... o_o | 38eb01863c9281d142c6494bae485b9c215ec9b7 | <ide><path>activerecord/lib/active_record/associations/class_methods/join_dependency/join_part.rb
<ide> class JoinPart # :nodoc:
<ide> def initialize(active_record)
<ide> @active_record = active_record
<ide> @cached_record = {}
<add> @column_names_with_alias = nil
<ide> end
<ide>
<ide> def aliased_table
<ide> def aliased_primary_key
<ide>
<ide> # An array of [column_name, alias] pairs for the table
<ide> def column_names_with_alias
<del> unless defined?(@column_names_with_alias)
<add> unless @column_names_with_alias
<ide> @column_names_with_alias = []
<ide>
<ide> ([primary_key] + (column_names - [primary_key])).each_with_index do |column_name, i|
<ide> @column_names_with_alias << [column_name, "#{aliased_prefix}_r#{i}"]
<ide> end
<ide> end
<del>
<ide> @column_names_with_alias
<ide> end
<ide> | 1 |
Go | Go | move maxdeviceid check in loadmetadata | 94caae2477f42b55adeab22f14bcef22b90373d6 | <ide><path>daemon/graphdriver/devmapper/deviceset.go
<ide> func (devices *DeviceSet) deviceFileWalkFunction(path string, finfo os.FileInfo)
<ide> return fmt.Errorf("Error loading device metadata file %s", hash)
<ide> }
<ide>
<del> if dinfo.DeviceID > maxDeviceID {
<del> logrus.Errorf("Ignoring Invalid DeviceID=%d", dinfo.DeviceID)
<del> return nil
<del> }
<del>
<ide> devices.Lock()
<ide> devices.markDeviceIDUsed(dinfo.DeviceID)
<ide> devices.Unlock()
<ide> func (devices *DeviceSet) loadMetadata(hash string) *devInfo {
<ide> return nil
<ide> }
<ide>
<add> if info.DeviceID > maxDeviceID {
<add> logrus.Errorf("Ignoring Invalid DeviceId=%d", info.DeviceID)
<add> return nil
<add> }
<add>
<ide> return info
<ide> }
<ide> | 1 |
Javascript | Javascript | fix typo in gltfloader.js | 724c0bdf8a6ca5a02745fb2778c9e89431215604 | <ide><path>examples/js/loaders/GLTFLoader.js
<ide> THREE.GLTFLoader = ( function () {
<ide> * Assigns final material to a Mesh, Line, or Points instance. The instance
<ide> * already has a material (generated from the glTF material options alone)
<ide> * but reuse of the same glTF material may require multiple threejs materials
<del> * to accomodate different primitive types, defines, etc. New materials will
<add> * to accommodate different primitive types, defines, etc. New materials will
<ide> * be created if necessary, and reused from a cache.
<ide> * @param {THREE.Object3D} mesh Mesh, Line, or Points instance.
<ide> */ | 1 |
Text | Text | clarify inspiration & thanks | 0bc1aa5de8ed60ddbfc7cd880d8b545f3cfc87d1 | <ide><path>README.md
<ide> function (state, action) {
<ide>
<ide> ## Inspiration and Thanks
<ide>
<del>* [Webpack Hot Module Replacement](https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack)
<del>* [The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial)
<del>* [Turning the database inside-out](http://blog.confluent.io/2015/03/04/turning-the-database-inside-out-with-apache-samza/)
<del>* [Developing ClojureScript with Figwheel](http://www.youtube.com/watch?v=j-kj2qwJa_E)
<del>* [Flummox](https://github.com/acdlite/flummox)
<del>* [disto](https://github.com/threepointone/disto)
<del>
<del>Special thanks to [Jamie Paton](http://jdpaton.github.io/) for handing over the `redux` NPM package name.
<add>* [Webpack](https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack) for Hot Module Replacement
<add>* [The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial) for a great intro to “stateless Stores”
<add>* [Turning the database inside-out](http://blog.confluent.io/2015/03/04/turning-the-database-inside-out-with-apache-samza/) for blowing my mind
<add>* [Developing ClojureScript with Figwheel](http://www.youtube.com/watch?v=j-kj2qwJa_E) for convincing me that re-evaluation should “just work”
<add>* [Flummox](https://github.com/acdlite/flummox) for teaching me to approach Flux without boilerplate or singletons
<add>* [disto](https://github.com/threepointone/disto) for a proof of concept of hot reloadable Stores
<add>* [NuclearJS](https://github.com/optimizely/nuclear-js) for proving this architecture can be performant
<add>* [Om](https://github.com/omcljs/om) for popularizing the idea of a single state atom
<add>* [Cycle](https://github.com/staltz/cycle) for showing how often a function is the best tool
<add>* [React](https://github.com/facebook/react) for the pragmatic innovation
<add>
<add>Special thanks go to [Jamie Paton](http://jdpaton.github.io/) for handing over the `redux` NPM package name. | 1 |
Text | Text | fix typo in stream doc | 113846b21b37b58dedbfcbb537581feaf8af1d53 | <ide><path>doc/api/stream.md
<ide> const stream = require('stream');
<ide>
<ide> While it is important for all Node.js users to understand how streams work,
<ide> the `stream` module itself is most useful for developers that are creating new
<del>types of stream instances. Developer's who are primarily *consuming* stream
<add>types of stream instances. Developers who are primarily *consuming* stream
<ide> objects will rarely (if ever) have need to use the `stream` module directly.
<ide>
<ide> ## Organization of this Document | 1 |
PHP | PHP | remove php interpretation of plugin/theme assets | f25ee98144548f62af8914094608301f73d7c282 | <ide><path>lib/Cake/Routing/Filter/AssetDispatcher.php
<ide> <?php
<ide> /**
<del> *
<del> * PHP 5
<del> *
<ide> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<ide> * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
<ide> *
<ide> *
<ide> * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
<ide> * @link http://cakephp.org CakePHP(tm) Project
<del> * @package Cake.Routing
<ide> * @since CakePHP(tm) v 2.2
<ide> * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
<ide> */
<del>
<ide> namespace Cake\Routing\Filter;
<add>
<ide> use Cake\Routing\DispatcherFilter;
<ide> use Cake\Core\App;
<ide> use Cake\Core\Configure;
<ide> protected function _deliverAsset(Response $response, $assetFile, $ext) {
<ide> $response->cache(filemtime($assetFile));
<ide> $response->send();
<ide> ob_clean();
<del> if ($ext === 'css' || $ext === 'js') {
<del> include $assetFile;
<del> } else {
<del> readfile($assetFile);
<del> }
<del>
<add> readfile($assetFile);
<ide> if ($compressionEnabled) {
<ide> ob_end_flush();
<ide> }
<ide> }
<ide>
<del>}
<ide>\ No newline at end of file
<add>} | 1 |
Javascript | Javascript | use commands instead of setnativeprops on android | ed5f9eeb2a5ae702be881ee08d599c2adddf743a | <ide><path>Libraries/Components/TextInput/TextInput.js
<ide> const {useEffect, useRef, useState} = React;
<ide> type ReactRefSetter<T> = {current: null | T, ...} | ((ref: null | T) => mixed);
<ide>
<ide> let AndroidTextInput;
<add>let AndroidTextInputCommands;
<ide> let RCTMultilineTextInputView;
<ide> let RCTSinglelineTextInputView;
<ide>
<ide> if (Platform.OS === 'android') {
<ide> AndroidTextInput = require('./AndroidTextInputNativeComponent').default;
<add> AndroidTextInputCommands = require('./AndroidTextInputNativeComponent')
<add> .Commands;
<ide> } else if (Platform.OS === 'ios') {
<ide> RCTMultilineTextInputView = require('./RCTMultilineTextInputNativeComponent.js')
<ide> .default;
<ide> function InternalTextInput(props: Props): React.Node {
<ide> selection = null;
<ide> }
<ide>
<add> const text =
<add> typeof props.value === 'string'
<add> ? props.value
<add> : typeof props.defaultValue === 'string'
<add> ? props.defaultValue
<add> : '';
<add>
<ide> // This is necessary in case native updates the text and JS decides
<ide> // that the update should be ignored and we should stick with the value
<ide> // that we have in JS.
<ide> function InternalTextInput(props: Props): React.Node {
<ide> setLastNativeSelection({selection, mostRecentEventCount});
<ide> }
<ide>
<del> if (Object.keys(nativeUpdate).length > 0 && inputRef.current) {
<add> if (Object.keys(nativeUpdate).length === 0) {
<add> return;
<add> }
<add>
<add> if (AndroidTextInputCommands && inputRef.current != null) {
<add> AndroidTextInputCommands.setTextAndSelection(
<add> inputRef.current,
<add> mostRecentEventCount,
<add> text,
<add> selection?.start ?? -1,
<add> selection?.end ?? -1,
<add> );
<add> } else if (inputRef.current != null) {
<ide> inputRef.current.setNativeProps(nativeUpdate);
<ide> }
<ide> }, [
<add> mostRecentEventCount,
<ide> inputRef,
<ide> props.value,
<add> props.defaultValue,
<ide> lastNativeText,
<ide> selection,
<ide> lastNativeSelection,
<del> mostRecentEventCount,
<add> text,
<ide> ]);
<ide>
<ide> useFocusOnMount(props.autoFocus, inputRef);
<ide> function InternalTextInput(props: Props): React.Node {
<ide> }, [inputRef]);
<ide>
<ide> function clear(): void {
<del> if (inputRef.current != null) {
<add> if (AndroidTextInputCommands && inputRef.current != null) {
<add> AndroidTextInputCommands.setTextAndSelection(
<add> inputRef.current,
<add> mostRecentEventCount,
<add> '',
<add> 0,
<add> 0,
<add> );
<add> } else if (inputRef.current != null) {
<ide> inputRef.current.setNativeProps({text: ''});
<ide> }
<ide> }
<ide> function InternalTextInput(props: Props): React.Node {
<ide> return inputRef.current;
<ide> }
<ide>
<del> function _getText(): ?string {
<del> return typeof props.value === 'string'
<del> ? props.value
<del> : typeof props.defaultValue === 'string'
<del> ? props.defaultValue
<del> : '';
<del> }
<del>
<ide> const _setNativeRef = setAndForwardRef({
<ide> getForwardedRef: () => props.forwardedRef,
<ide> setLocalRef: ref => {
<ide> function InternalTextInput(props: Props): React.Node {
<ide> const _onChange = (event: ChangeEvent) => {
<ide> // Make sure to fire the mostRecentEventCount first so it is already set on
<ide> // native when the text value is set.
<del> if (inputRef.current) {
<add> if (AndroidTextInputCommands && inputRef.current != null) {
<add> AndroidTextInputCommands.setMostRecentEventCount(
<add> inputRef.current,
<add> event.nativeEvent.eventCount,
<add> );
<add> } else if (inputRef.current != null) {
<ide> inputRef.current.setNativeProps({
<ide> mostRecentEventCount: event.nativeEvent.eventCount,
<ide> });
<ide> function InternalTextInput(props: Props): React.Node {
<ide> props.onChange && props.onChange(event);
<ide> props.onChangeText && props.onChangeText(text);
<ide>
<del> if (!inputRef.current) {
<add> if (inputRef.current == null) {
<ide> // calling `props.onChange` or `props.onChangeText`
<ide> // may clean up the input itself. Exits here.
<ide> return;
<ide> }
<ide>
<ide> setLastNativeText(text);
<add> // This must happen last, after we call setLastNativeText.
<add> // Different ordering can cause bugs when editing AndroidTextInputs
<add> // with multiple Fragments.
<add> // We must update this so that controlled input updates work.
<add> setMostRecentEventCount(event.nativeEvent.eventCount);
<ide> };
<ide>
<ide> const _onSelectionChange = (event: SelectionChangeEvent) => {
<ide> props.onSelectionChange && props.onSelectionChange(event);
<ide>
<del> if (!inputRef.current) {
<add> if (inputRef.current == null) {
<ide> // calling `props.onSelectionChange`
<ide> // may clean up the input itself. Exits here.
<ide> return;
<ide> function InternalTextInput(props: Props): React.Node {
<ide> onSelectionChangeShouldSetResponder={emptyFunctionThatReturnsTrue}
<ide> selection={selection}
<ide> style={style}
<del> text={_getText()}
<add> text={text}
<ide> />
<ide> );
<ide> } else if (Platform.OS === 'android') {
<ide> function InternalTextInput(props: Props): React.Node {
<ide> autoCapitalize={autoCapitalize}
<ide> children={children}
<ide> disableFullscreenUI={props.disableFullscreenUI}
<del> mostRecentEventCount={0}
<add> mostRecentEventCount={mostRecentEventCount}
<ide> onBlur={_onBlur}
<ide> onChange={_onChange}
<ide> onFocus={_onFocus}
<ide> onScroll={_onScroll}
<ide> onSelectionChange={_onSelectionChange}
<ide> selection={selection}
<ide> style={style}
<del> text={_getText()}
<add> text={text}
<ide> textBreakStrategy={props.textBreakStrategy}
<ide> />
<ide> ); | 1 |
Javascript | Javascript | fix the lint error | d052f5502fcba157e80f7170d15a1a2561079574 | <ide><path>test/utils/identity.spec.js
<ide> import identity from '../../src/utils/identity';
<ide> describe('Utils', () => {
<ide> describe('identity', () => {
<ide> it('should return first argument passed to it', () => {
<del> var test = { 'a': 1 };
<add> const test = { 'a': 1 };
<ide> expect(identity(test, 'test')).toBe(test);
<ide> });
<ide> }); | 1 |
Text | Text | replace anonymous functions in repl.md | 5f8aa1fcb17febd2ea899da0af62ec2c33a23760 | <ide><path>doc/api/repl.md
<ide> const repl = require('repl');
<ide> const replServer = repl.start({prompt: '> '});
<ide> replServer.defineCommand('sayhello', {
<ide> help: 'Say hello',
<del> action: function(name) {
<add> action(name) {
<ide> this.lineParser.reset();
<ide> this.bufferedCommand = '';
<ide> console.log(`Hello, ${name}!`);
<ide> this.displayPrompt();
<ide> }
<ide> });
<del>replServer.defineCommand('saybye', function() {
<add>replServer.defineCommand('saybye', () => {
<ide> console.log('Goodbye!');
<ide> this.close();
<ide> }); | 1 |
PHP | PHP | trim zwnbsp | 8a10e3f61e05c05829ca80ac23656b6bffe38aba | <ide><path>src/Illuminate/Foundation/Http/Middleware/TrimStrings.php
<ide> protected function transform($key, $value)
<ide> return $value;
<ide> }
<ide>
<del> return is_string($value) ? preg_replace('~^\s+|\s+$~iu', '', $value) : $value;
<add> return is_string($value) ? preg_replace('~^[\s]+|[\s]+$~iu', '', $value) : $value;
<ide> }
<ide>
<ide> /**
<ide><path>tests/Foundation/Http/Middleware/TrimStringsTest.php
<ide> public function testTrimStringsNBSP()
<ide> $middleware = new TrimStrings;
<ide> $symfonyRequest = new SymfonyRequest([
<ide> // Here has some NBSP, but it still display to space.
<add> // Please note, do not edit in browser
<ide> 'abc' => ' 123 ',
<add> 'zwnbsp' => ' ha ',
<ide> 'xyz' => 'だ',
<ide> 'foo' => 'ム',
<ide> 'bar' => ' だ ',
<ide> public function testTrimStringsNBSP()
<ide>
<ide> $middleware->handle($request, function (Request $request) {
<ide> $this->assertSame('123', $request->get('abc'));
<add> $this->assertSame('ha', $request->get('zwnbsp'));
<ide> $this->assertSame('だ', $request->get('xyz'));
<ide> $this->assertSame('ム', $request->get('foo'));
<ide> $this->assertSame('だ', $request->get('bar')); | 2 |
Javascript | Javascript | extend url.format to support whatwg url | c5e9654b5bdb8495debaff6716d8409bc1b737d1 | <ide><path>lib/internal/url.js
<ide> 'use strict';
<ide>
<del>function getPunycode() {
<del> try {
<del> return process.binding('icu');
<del> } catch (err) {
<del> return require('punycode');
<del> }
<del>}
<del>const punycode = getPunycode();
<ide> const util = require('util');
<ide> const binding = process.binding('url');
<ide> const context = Symbol('context');
<ide> const kScheme = Symbol('scheme');
<ide> const kHost = Symbol('host');
<ide> const kPort = Symbol('port');
<ide> const kDomain = Symbol('domain');
<add>const kFormat = Symbol('format');
<ide>
<ide> // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
<ide> const IteratorPrototype = Object.getPrototypeOf(
<ide> class URL {
<ide> }
<ide>
<ide> Object.defineProperties(URL.prototype, {
<del> toString: {
<del> // https://heycam.github.io/webidl/#es-stringifier
<del> writable: true,
<del> enumerable: true,
<del> configurable: true,
<add> [kFormat]: {
<add> enumerable: false,
<add> configurable: false,
<ide> // eslint-disable-next-line func-name-matching
<del> value: function toString(options) {
<del> options = options || {};
<del> const fragment =
<del> options.fragment !== undefined ?
<del> !!options.fragment : true;
<del> const unicode = !!options.unicode;
<add> value: function format(options) {
<add> if (options && typeof options !== 'object')
<add> throw new TypeError('options must be an object');
<add> options = Object.assign({
<add> fragment: true,
<add> unicode: false,
<add> search: true,
<add> auth: true
<add> }, options);
<ide> const ctx = this[context];
<ide> var ret;
<ide> if (this.protocol)
<ide> Object.defineProperties(URL.prototype, {
<ide> const has_username = typeof ctx.username === 'string';
<ide> const has_password = typeof ctx.password === 'string' &&
<ide> ctx.password !== '';
<del> if (has_username || has_password) {
<add> if (options.auth && (has_username || has_password)) {
<ide> if (has_username)
<ide> ret += ctx.username;
<ide> if (has_password)
<ide> ret += `:${ctx.password}`;
<ide> ret += '@';
<ide> }
<del> if (unicode) {
<del> ret += punycode.toUnicode(this.hostname);
<del> if (this.port !== undefined)
<del> ret += `:${this.port}`;
<del> } else {
<del> ret += this.host;
<del> }
<add> ret += options.unicode ?
<add> domainToUnicode(this.host) : this.host;
<ide> } else if (ctx.scheme === 'file:') {
<ide> ret += '//';
<ide> }
<ide> if (this.pathname)
<ide> ret += this.pathname;
<del> if (typeof ctx.query === 'string')
<add> if (options.search && typeof ctx.query === 'string')
<ide> ret += `?${ctx.query}`;
<del> if (fragment & typeof ctx.fragment === 'string')
<add> if (options.fragment && typeof ctx.fragment === 'string')
<ide> ret += `#${ctx.fragment}`;
<ide> return ret;
<ide> }
<ide> Object.defineProperties(URL.prototype, {
<ide> configurable: true,
<ide> value: 'URL'
<ide> },
<add> toString: {
<add> // https://heycam.github.io/webidl/#es-stringifier
<add> writable: true,
<add> enumerable: true,
<add> configurable: true,
<add> // eslint-disable-next-line func-name-matching
<add> value: function toString() {
<add> return this[kFormat]({});
<add> }
<add> },
<ide> href: {
<ide> enumerable: true,
<ide> configurable: true,
<ide> get() {
<del> return this.toString();
<add> return this[kFormat]({});
<ide> },
<ide> set(input) {
<ide> parse(this, input);
<ide> exports.domainToASCII = domainToASCII;
<ide> exports.domainToUnicode = domainToUnicode;
<ide> exports.encodeAuth = encodeAuth;
<ide> exports.urlToOptions = urlToOptions;
<add>exports.formatSymbol = kFormat;
<ide><path>lib/url.js
<ide> function autoEscapeStr(rest) {
<ide> }
<ide>
<ide> // format a parsed object into a url string
<del>function urlFormat(obj) {
<add>function urlFormat(obj, options) {
<ide> // ensure it's an object, and not a string url.
<ide> // If it's an obj, this is a no-op.
<ide> // this way, you can call url_format() on strings
<ide> // to clean up potentially wonky urls.
<del> if (typeof obj === 'string') obj = urlParse(obj);
<del>
<del> else if (typeof obj !== 'object' || obj === null)
<add> if (typeof obj === 'string') {
<add> obj = urlParse(obj);
<add> } else if (typeof obj !== 'object' || obj === null) {
<ide> throw new TypeError('Parameter "urlObj" must be an object, not ' +
<ide> obj === null ? 'null' : typeof obj);
<del>
<del> else if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
<del>
<add> } else if (!(obj instanceof Url)) {
<add> var format = obj[internalUrl.formatSymbol];
<add> return format ?
<add> format.call(obj, options) :
<add> Url.prototype.format.call(obj);
<add> }
<ide> return obj.format();
<ide> }
<ide>
<ide><path>test/parallel/test-url-format-whatwg.js
<add>'use strict';
<add>
<add>require('../common');
<add>const assert = require('assert');
<add>const url = require('url');
<add>const URL = url.URL;
<add>
<add>const myURL = new URL('http://xn--lck1c3crb1723bpq4a.com/a?a=b#c');
<add>
<add>assert.strictEqual(
<add> url.format(myURL),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>const errreg = /^TypeError: options must be an object$/;
<add>assert.throws(() => url.format(myURL, true), errreg);
<add>assert.throws(() => url.format(myURL, 1), errreg);
<add>assert.throws(() => url.format(myURL, 'test'), errreg);
<add>assert.throws(() => url.format(myURL, Infinity), errreg);
<add>
<add>// Any falsy value other than undefined will be treated as false.
<add>// Any truthy value will be treated as true.
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {fragment: false}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {fragment: ''}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {fragment: 0}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {fragment: 1}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {fragment: {}}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {search: false}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {search: ''}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {search: 0}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {search: 1}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {search: {}}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {unicode: true}),
<add> 'http://理容ナカムラ.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {unicode: 1}),
<add> 'http://理容ナカムラ.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {unicode: {}}),
<add> 'http://理容ナカムラ.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {unicode: false}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>);
<add>
<add>assert.strictEqual(
<add> url.format(myURL, {unicode: 0}),
<add> 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c'
<add>); | 3 |
Ruby | Ruby | add regexp and notregexp nodes for postgresql | 6296617c159d5cee0ba1c76f4ea983e3b5e26b6b | <ide><path>lib/arel/nodes/binary.rb
<ide> def eql? other
<ide> Matches
<ide> NotEqual
<ide> NotIn
<add> NotRegexp
<ide> Or
<add> Regexp
<ide> Union
<ide> UnionAll
<ide> Intersect
<ide><path>lib/arel/visitors/depth_first.rb
<ide> def binary o
<ide> alias :visit_Arel_Nodes_Matches :binary
<ide> alias :visit_Arel_Nodes_NotEqual :binary
<ide> alias :visit_Arel_Nodes_NotIn :binary
<add> alias :visit_Arel_Nodes_NotRegexp :binary
<ide> alias :visit_Arel_Nodes_Or :binary
<ide> alias :visit_Arel_Nodes_OuterJoin :binary
<add> alias :visit_Arel_Nodes_Regexp :binary
<ide> alias :visit_Arel_Nodes_RightOuterJoin :binary
<ide> alias :visit_Arel_Nodes_TableAlias :binary
<ide> alias :visit_Arel_Nodes_Values :binary
<ide><path>lib/arel/visitors/postgresql.rb
<ide> def visit_Arel_Nodes_DoesNotMatch o
<ide> "#{visit o.left} NOT ILIKE #{visit o.right}"
<ide> end
<ide>
<add> def visit_Arel_Nodes_Regexp o
<add> "#{visit o.left} ~ #{visit o.right}"
<add> end
<add>
<add> def visit_Arel_Nodes_NotRegexp o
<add> "#{visit o.left} !~ #{visit o.right}"
<add> end
<add>
<ide> def visit_Arel_Nodes_DistinctOn o
<ide> "DISTINCT ON ( #{visit o.expr} )"
<ide> end
<ide><path>lib/arel/visitors/to_sql.rb
<ide> def visit_Arel_Nodes_DoesNotMatch o
<ide> "#{visit o.left} NOT LIKE #{visit o.right}"
<ide> end
<ide>
<add> def visit_Arel_Nodes_Regexp o
<add> raise NotImplementedError, '~ not implemented for this db'
<add> end
<add>
<add> def visit_Arel_Nodes_NotRegexp o
<add> raise NotImplementedError, '!~ not implemented for this db'
<add> end
<add>
<ide> def visit_Arel_Nodes_JoinSource o
<ide> [
<ide> (visit(o.left) if o.left),
<ide><path>test/visitors/test_postgres.rb
<ide> module Visitors
<ide> }
<ide> end
<ide> end
<add>
<add> describe "Nodes::Regexp" do
<add> it "should know how to visit" do
<add> node = Arel::Nodes::Regexp.new(@table[:name], Nodes.build_quoted('foo%'))
<add> @visitor.accept(node).must_be_like %{
<add> "users"."name" ~ 'foo%'
<add> }
<add> end
<add>
<add> it 'can handle subqueries' do
<add> subquery = @table.project(:id).where(Arel::Nodes::Regexp.new(@table[:name], Nodes.build_quoted('foo%')))
<add> node = @attr.in subquery
<add> @visitor.accept(node).must_be_like %{
<add> "users"."id" IN (SELECT id FROM "users" WHERE "users"."name" ~ 'foo%')
<add> }
<add> end
<add> end
<add>
<add> describe "Nodes::NotRegexp" do
<add> it "should know how to visit" do
<add> node = Arel::Nodes::NotRegexp.new(@table[:name], Nodes.build_quoted('foo%'))
<add> @visitor.accept(node).must_be_like %{
<add> "users"."name" !~ 'foo%'
<add> }
<add> end
<add>
<add> it 'can handle subqueries' do
<add> subquery = @table.project(:id).where(Arel::Nodes::NotRegexp.new(@table[:name], Nodes.build_quoted('foo%')))
<add> node = @attr.in subquery
<add> @visitor.accept(node).must_be_like %{
<add> "users"."id" IN (SELECT id FROM "users" WHERE "users"."name" !~ 'foo%')
<add> }
<add> end
<add> end
<ide> end
<ide> end
<ide> end
<ide><path>test/visitors/test_to_sql.rb
<ide> def quote value, column = nil
<ide> end
<ide> end
<ide> end
<add>
<add> describe 'Nodes::Regexp' do
<add> it 'raises not implemented error' do
<add> node = Arel::Nodes::Regexp.new(@table[:name], Nodes.build_quoted('foo%'))
<add>
<add> assert_raises(NotImplementedError) do
<add> @visitor.accept(node)
<add> end
<add> end
<add> end
<add>
<add> describe 'Nodes::NotRegexp' do
<add> it 'raises not implemented error' do
<add> node = Arel::Nodes::NotRegexp.new(@table[:name], Nodes.build_quoted('foo%'))
<add>
<add> assert_raises(NotImplementedError) do
<add> @visitor.accept(node)
<add> end
<add> end
<add> end
<ide> end
<ide> end
<ide> end | 6 |
Ruby | Ruby | make version#<=> allocation-free | 9b75afcf4ae735cb197f0ef835e0052c94cdb666 | <ide><path>Library/Homebrew/version.rb
<ide> def <=>(other)
<ide> return 1 if head? && !other.head?
<ide> return -1 if !head? && other.head?
<ide>
<del> max = [tokens.length, other.tokens.length].max
<del> pad_to(max) <=> other.pad_to(max)
<add> ltokens = tokens
<add> rtokens = other.tokens
<add> max = max(ltokens.length, rtokens.length)
<add> l = r = 0
<add>
<add> while l < max
<add> a = ltokens[l] || NULL_TOKEN
<add> b = rtokens[r] || NULL_TOKEN
<add>
<add> if a == b
<add> l += 1
<add> r += 1
<add> next
<add> elsif a.numeric? && b.numeric?
<add> return a <=> b
<add> elsif a.numeric?
<add> return 1 if a > NULL_TOKEN
<add> l += 1
<add> elsif b.numeric?
<add> return -1 if b > NULL_TOKEN
<add> r += 1
<add> else
<add> return a <=> b
<add> end
<add> end
<add>
<add> return 0
<ide> end
<ide> alias_method :eql?, :==
<ide>
<ide> def to_s
<ide>
<ide> attr_reader :version
<ide>
<del> def begins_with_numeric?
<del> tokens.first.numeric?
<add> def tokens
<add> @tokens ||= tokenize
<ide> end
<ide>
<del> def pad_to(length)
<del> if begins_with_numeric?
<del> nums, rest = tokens.partition(&:numeric?)
<del> nums.fill(NULL_TOKEN, nums.length, length - tokens.length)
<del> nums.concat(rest)
<del> else
<del> tokens.dup.fill(NULL_TOKEN, tokens.length, length - tokens.length)
<del> end
<del> end
<add> private
<ide>
<del> def tokens
<del> @tokens ||= tokenize
<add> def max(a, b)
<add> a > b ? a : b
<ide> end
<ide>
<ide> def tokenize | 1 |
Text | Text | fix ipam driver documentation | 6b209991aaa10fd90de54c611cbbe62c768a87aa | <ide><path>libnetwork/docs/ipam.md
<ide> It is the remote driver's responsibility to manage its database.
<ide>
<ide> ## Ipam Contract
<ide>
<del>The IPAM driver (internal or remote) has to comply with the contract specified in `ipamapi.contract.go`:
<add>The remote IPAM driver must serve the following requests:
<ide>
<del>```go
<del>// Ipam represents the interface the IPAM service plugins must implement
<del>// in order to allow injection/modification of IPAM database.
<del>type Ipam interface {
<del> // GetDefaultAddressSpaces returns the default local and global address spaces for this ipam
<del> GetDefaultAddressSpaces() (string, string, error)
<del> // RequestPool returns an address pool along with its unique id. Address space is a mandatory field
<del> // which denotes a set of non-overlapping pools. pool describes the pool of addresses in CIDR notation.
<del> // subpool indicates a smaller range of addresses from the pool, for now it is specified in CIDR notation.
<del> // Both pool and subpool are non mandatory fields. When they are not specified, Ipam driver may choose to
<del> // return a self chosen pool for this request. In such case the v6 flag needs to be set appropriately so
<del> // that the driver would return the expected ip version pool.
<del> RequestPool(addressSpace, pool, subPool string, options map[string]string, v6 bool) (string, *net.IPNet, map[string]string, error)
<del> // ReleasePool releases the address pool identified by the passed id
<del> ReleasePool(poolID string) error
<del> // Request address from the specified pool ID. Input options or required IP can be passed.
<del> RequestAddress(string, net.IP, map[string]string) (*net.IPNet, map[string]string, error)
<del> // Release the address from the specified pool ID
<del> ReleaseAddress(string, net.IP) error
<del>}
<del>```
<add>- **GetDefaultAddressSpaces**
<add>
<add>- **RequestPool**
<add>
<add>- **ReleasePool**
<add>
<add>- **Request address**
<ide>
<del>The following sections explain the each of the above API's semantics, when they are called during network/endpoint lifecycle, and the corresponding payload for remote driver HTTP request/responses.
<add>- **Release address**
<add>
<add>
<add>The following sections explain each of the above requests' semantic, when they are called during network/endpoint lifecycle, and the corresponding payload for remote driver HTTP request/responses.
<ide>
<ide>
<ide> ## IPAM Configuration and flow
<ide> For this API, the remote driver will receive a POST message to the URL `/IpamDri
<ide>
<ide> Where:
<ide>
<del> * `AddressSpace` the IP address space
<add> * `AddressSpace` the IP address space. It denotes a set of non-overlapping pools.
<ide> * `Pool` The IPv4 or IPv6 address pool in CIDR format
<ide> * `SubPool` An optional subset of the address pool, an ip range in CIDR format
<ide> * `Options` A map of IPAM driver specific options
<ide> * `V6` Whether an IPAM self-chosen pool should be IPv6
<ide>
<del>AddressSpace is the only mandatory field. If no `Pool` is specified IPAM driver may return a self chosen address pool. In such case, `V6` flag must be set if caller wants an IPAM-chosen IPv6 pool. A request with empty `Pool` and non-empty `SubPool` should be rejected as invalid.
<add>AddressSpace is the only mandatory field. If no `Pool` is specified IPAM driver may choose to return a self chosen address pool. In such case, `V6` flag must be set if caller wants an IPAM-chosen IPv6 pool. A request with empty `Pool` and non-empty `SubPool` should be rejected as invalid.
<ide> If a `Pool` is not specified IPAM will allocate one of the default pools. When `Pool` is not specified, the `V6` flag should be set if the network needs IPv6 addresses to be allocated.
<ide>
<ide> A successful response is in the form:
<ide> As of now libnetwork accepts the following capabilities:
<ide> ### RequiresMACAddress
<ide>
<ide> It is a boolean value which tells libnetwork whether the ipam driver needs to know the interface MAC address in order to properly process the `RequestAddress()` call.
<del>If true, on `CreateEndpoint()` request, libnetwork will generate a random MAC address for the endpoint (if an explicit MAC address was not already provided by the user) and pass it to `RequestAddress()` when requesting the IP address inside the options map. The key will be the `netlabel.MacAddress` constant: `"com.docker.network.endpoint.macaddress"`.
<ide>\ No newline at end of file
<add>If true, on `CreateEndpoint()` request, libnetwork will generate a random MAC address for the endpoint (if an explicit MAC address was not already provided by the user) and pass it to `RequestAddress()` when requesting the IP address inside the options map. The key will be the `netlabel.MacAddress` constant: `"com.docker.network.endpoint.macaddress"`.
<add>
<add>
<add>## Appendix
<add>
<add>A Go extension for the IPAM remote API is available at [docker/go-plugins-helpers/ipam](https://github.com/docker/go-plugins-helpers/tree/master/ipam)
<ide>\ No newline at end of file | 1 |
Javascript | Javascript | use fullhash instead of hash | e9cb04efcadd6ab550d95250c78eee1bf83a88ea | <ide><path>test/HotTestCases.template.js
<ide> const describeCases = config => {
<ide> if (!options.output.filename)
<ide> options.output.filename = "bundle.js";
<ide> if (!options.output.chunkFilename)
<del> options.output.chunkFilename = "[name].chunk.[hash].js";
<add> options.output.chunkFilename = "[name].chunk.[fullhash].js";
<ide> if (options.output.pathinfo === undefined)
<ide> options.output.pathinfo = true;
<ide> if (!options.optimization) options.optimization = {};
<ide><path>test/NodeTemplatePlugin.test.js
<ide> describe("NodeTemplatePlugin", () => {
<ide> output: {
<ide> path: path.join(__dirname, "js", "NodeTemplatePlugin"),
<ide> filename: "result.js",
<del> chunkFilename: "[hash].result.[id].js",
<add> chunkFilename: "[fullhash].result.[id].js",
<ide> library: "abc",
<ide> libraryTarget: "commonjs"
<ide> },
<ide> describe("NodeTemplatePlugin", () => {
<ide> output: {
<ide> path: path.join(__dirname, "js", "NodeTemplatePluginSingle"),
<ide> filename: "result2.js",
<del> chunkFilename: "[hash].result2.[id].js",
<add> chunkFilename: "[fullhash].result2.[id].js",
<ide> library: "def",
<ide> libraryTarget: "umd",
<ide> auxiliaryComment: "test"
<ide><path>test/configCases/hash-length/output-filename/webpack.config.js
<ide> module.exports = [
<ide> {
<ide> name: "hash with length in publicPath",
<ide> output: {
<del> publicPath: "/[hash:6]/",
<del> filename: "bundle0.[hash:6].js",
<del> chunkFilename: "[id].bundle0.[hash:6].js"
<add> publicPath: "/[fullhash:6]/",
<add> filename: "bundle0.[fullhash:6].js",
<add> chunkFilename: "[id].bundle0.[fullhash:6].js"
<ide> },
<ide> amd: {
<ide> expectedFilenameLength: 17,
<ide> module.exports = [
<ide> {
<ide> name: "hash in publicPath",
<ide> output: {
<del> publicPath: "/[hash]/",
<del> filename: "bundle1.[hash].js",
<del> chunkFilename: "[id].bundle1.[hash].js"
<add> publicPath: "/[fullhash]/",
<add> filename: "bundle1.[fullhash].js",
<add> chunkFilename: "[id].bundle1.[fullhash].js"
<ide> },
<ide> amd: {
<ide> expectedFilenameLength: 31,
<ide> module.exports = [
<ide> {
<ide> name: "hash with and without length",
<ide> output: {
<del> filename: "bundle4.[hash].js",
<del> chunkFilename: "[id].bundle4.[hash:8].js"
<add> filename: "bundle4.[fullhash].js",
<add> chunkFilename: "[id].bundle4.[fullhash:8].js"
<ide> },
<ide> amd: {
<ide> expectedFilenameLength: 31,
<ide> module.exports = [
<ide> {
<ide> name: "hash with length",
<ide> output: {
<del> filename: "bundle5.[hash:6].js",
<del> chunkFilename: "[id].bundle5.[hash:8].js"
<add> filename: "bundle5.[fullhash:6].js",
<add> chunkFilename: "[id].bundle5.[fullhash:8].js"
<ide> },
<ide> amd: {
<ide> expectedFilenameLength: 17,
<ide> module.exports = [
<ide> {
<ide> name: "chunkhash in chunkFilename ",
<ide> output: {
<del> filename: "bundle6.[hash].js",
<add> filename: "bundle6.[fullhash].js",
<ide> chunkFilename: "[id].bundle6.[chunkhash:7].js"
<ide> },
<ide> amd: {
<ide> module.exports = [
<ide> {
<ide> name: "hash with length and chunkhash with length",
<ide> output: {
<del> filename: "bundle7.[hash:7].js",
<add> filename: "bundle7.[fullhash:7].js",
<ide> chunkFilename: "[id].bundle7.[chunkhash:7].js"
<ide> },
<ide> target: "node",
<ide> module.exports = [
<ide> {
<ide> name: "hash with length in chunkFilename",
<ide> output: {
<del> filename: "bundle8.[hash].js",
<del> chunkFilename: "[id].bundle8.[hash:7].js"
<add> filename: "bundle8.[fullhash].js",
<add> chunkFilename: "[id].bundle8.[fullhash:7].js"
<ide> },
<ide> target: "node",
<ide> amd: {
<ide> module.exports = [
<ide> {
<ide> name: "chunkhash with length in chunkFilename",
<ide> output: {
<del> filename: "bundle9.[hash].js",
<add> filename: "bundle9.[fullhash].js",
<ide> chunkFilename: "[id].bundle9.[chunkhash:7].js"
<ide> },
<ide> target: "node",
<ide><path>test/configCases/issues/issue-7563/webpack.config.js
<ide> "use strict";
<ide>
<del>// Have to test [hash] and [chunkhash] separately to avoid
<del>// "Cannot use [chunkhash] or [contenthash] for chunk in 'bundle1.[hash].[hash:16].[chunkhash].[chunkhash:16].[name].[id].[query].js' (use [hash] instead)"
<del>var testAllButHash = "[chunkhash].[chunkhash:16].[name].[id].[query]";
<del>var testHash = "[hash].[hash:16]";
<add>// [fullhash] and [chunkhash] must be used separately
<add>const testAllButHash = "[chunkhash].[chunkhash:16].[name].[id].[query]";
<add>const testHash = "[fullhash].[fullhash:16]";
<ide>
<ide> module.exports = [
<ide> {
<ide><path>test/configCases/plugins/banner-plugin-hashing/index.js
<ide> const banner = parseBanner(source)
<ide> const REGEXP_HASH = /^[A-Za-z0-9]{20}$/
<ide>
<ide> it("should interpolate file hash in chunk banner", () => {
<del> expect(REGEXP_HASH.test(banner["hash"])).toBe(true);
<add> expect(REGEXP_HASH.test(banner["fullhash"])).toBe(true);
<ide> });
<ide>
<ide> it("should interpolate chunkHash in chunk banner", () => {
<ide><path>test/configCases/plugins/banner-plugin-hashing/webpack.config.js
<ide> module.exports = {
<ide> plugins: [
<ide> new webpack.BannerPlugin({
<ide> banner:
<del> "hash:[hash], chunkhash:[chunkhash], name:[name], base:[base], query:[query], file:[file], path:[path], ext:[ext]"
<add> "fullhash:[fullhash], chunkhash:[chunkhash], name:[name], base:[base], query:[query], file:[file], path:[path], ext:[ext]"
<ide> })
<ide> ]
<ide> };
<ide><path>test/configCases/plugins/lib-manifest-plugin/webpack.config.js
<ide> module.exports = {
<ide> __dirname,
<ide> "../../../js/config/plugins/lib-manifest-plugin/[name]-manifest.json"
<ide> ),
<del> name: "[name]_[hash]"
<add> name: "[name]_[fullhash]"
<ide> })
<ide> ],
<ide> node: {
<ide><path>test/hotPlayground/webpack.config.js
<ide> module.exports = {
<ide> entry: ["../../hot/dev-server", "./index.js"],
<ide> output: {
<ide> filename: "bundle.js",
<del> hotUpdateChunkFilename: "[id].[hash].bundle-update.js",
<add> hotUpdateChunkFilename: "[id].[fullhash].bundle-update.js",
<ide> hashDigestLength: 4
<ide> },
<ide> plugins: [new webpack.HotModuleReplacementPlugin()], | 8 |
Java | Java | eliminate trailing whitespace in spel classes | de2d8082121d3c2187b5555eb1e3a77f7128ba25 | <ide><path>spring-expression/src/main/java/org/springframework/expression/spel/ast/TypeReference.java
<ide>
<ide> /**
<ide> * Represents a reference to a type, for example "T(String)" or "T(com.somewhere.Foo)"
<del> *
<add> *
<ide> * @author Andy Clement
<ide> */
<ide> public class TypeReference extends SpelNodeImpl {
<ide> public String toStringAST() {
<ide> sb.append(")");
<ide> return sb.toString();
<ide> }
<del>
<add>
<ide> }
<ide><path>spring-expression/src/main/java/org/springframework/expression/spel/standard/InternalSpelExpressionParser.java
<ide>
<ide> /**
<ide> * Hand written SpEL parser. Instances are reusable but are not thread safe.
<del> *
<add> *
<ide> * @author Andy Clement
<ide> * @since 3.0
<ide> */
<ide> class InternalSpelExpressionParser extends TemplateAwareExpressionParser {
<ide>
<ide> // The token stream constructed from that expression string
<ide> private List<Token> tokenStream;
<del>
<add>
<ide> // length of a populated token stream
<ide> private int tokenStreamLength;
<del>
<add>
<ide> // Current location in the token stream when processing tokens
<ide> private int tokenStreamPointer;
<del>
<add>
<ide> // For rules that build nodes, they are stacked here for return
<ide> private Stack<SpelNodeImpl> constructedNodes = new Stack<SpelNodeImpl>();
<del>
<add>
<ide> private SpelParserConfiguration configuration;
<ide>
<ide>
<ide> protected SpelExpression doParseExpression(String expressionString, ParserContex
<ide> throw new SpelParseException(peekToken().startpos,SpelMessage.MORE_INPUT,toString(nextToken()));
<ide> }
<ide> Assert.isTrue(constructedNodes.isEmpty());
<del> return new SpelExpression(expressionString, ast, configuration);
<add> return new SpelExpression(expressionString, ast, configuration);
<ide> }
<ide> catch (InternalParseException ipe) {
<ide> throw ipe.getCause();
<ide> }
<ide> }
<del>
<add>
<ide> // expression
<ide> // : logicalOrExpression
<del> // ( (ASSIGN^ logicalOrExpression)
<del> // | (DEFAULT^ logicalOrExpression)
<add> // ( (ASSIGN^ logicalOrExpression)
<add> // | (DEFAULT^ logicalOrExpression)
<ide> // | (QMARK^ expression COLON! expression)
<ide> // | (ELVIS^ expression))?;
<ide> private SpelNodeImpl eatExpression() {
<ide> private SpelNodeImpl eatExpression() {
<ide> expr = new NullLiteral(toPos(t.startpos-1,t.endpos-1));
<ide> }
<ide> nextToken();
<del> SpelNodeImpl ifTrueExprValue = eatExpression();
<add> SpelNodeImpl ifTrueExprValue = eatExpression();
<ide> eatToken(TokenKind.COLON);
<del> SpelNodeImpl ifFalseExprValue = eatExpression();
<add> SpelNodeImpl ifFalseExprValue = eatExpression();
<ide> return new Ternary(toPos(t),expr,ifTrueExprValue,ifFalseExprValue);
<ide> }
<ide> }
<ide> return expr;
<ide> }
<del>
<add>
<ide> //logicalOrExpression : logicalAndExpression (OR^ logicalAndExpression)*;
<ide> private SpelNodeImpl eatLogicalOrExpression() {
<ide> SpelNodeImpl expr = eatLogicalAndExpression();
<ide> private SpelNodeImpl eatLogicalAndExpression() {
<ide> }
<ide> return expr;
<ide> }
<del>
<add>
<ide> // relationalExpression : sumExpression (relationalOperator^ sumExpression)?;
<ide> private SpelNodeImpl eatRelationalExpression() {
<ide> SpelNodeImpl expr = eatSumExpression();
<ide> private SpelNodeImpl eatRelationalExpression() {
<ide> }
<ide> return expr;
<ide> }
<del>
<add>
<ide> //sumExpression: productExpression ( (PLUS^ | MINUS^) productExpression)*;
<ide> private SpelNodeImpl eatSumExpression() {
<del> SpelNodeImpl expr = eatProductExpression();
<add> SpelNodeImpl expr = eatProductExpression();
<ide> while (peekToken(TokenKind.PLUS,TokenKind.MINUS)) {
<ide> Token t = nextToken();//consume PLUS or MINUS
<ide> SpelNodeImpl rhExpr = eatProductExpression();
<ide> private SpelNodeImpl eatSumExpression() {
<ide> }
<ide> return expr;
<ide> }
<del>
<add>
<ide> // productExpression: powerExpr ((STAR^ | DIV^| MOD^) powerExpr)* ;
<ide> private SpelNodeImpl eatProductExpression() {
<ide> SpelNodeImpl expr = eatPowerExpression();
<ide> private SpelNodeImpl eatProductExpression() {
<ide> }
<ide> return expr;
<ide> }
<del>
<add>
<ide> // powerExpr : unaryExpression (POWER^ unaryExpression)? ;
<ide> private SpelNodeImpl eatPowerExpression() {
<ide> SpelNodeImpl expr = eatUnaryExpression();
<ide> private SpelNodeImpl eatUnaryExpression() {
<ide> return eatPrimaryExpression();
<ide> }
<ide> }
<del>
<add>
<ide> // primaryExpression : startNode (node)? -> ^(EXPRESSION startNode (node)?);
<ide> private SpelNodeImpl eatPrimaryExpression() {
<ide> List<SpelNodeImpl> nodes = new ArrayList<SpelNodeImpl>();
<ide> private SpelNodeImpl eatPrimaryExpression() {
<ide> return new CompoundExpression(toPos(start.getStartPosition(),nodes.get(nodes.size()-1).getEndPosition()),nodes.toArray(new SpelNodeImpl[nodes.size()]));
<ide> }
<ide> }
<del>
<add>
<ide> // node : ((DOT dottedNode) | (SAFE_NAVI dottedNode) | nonDottedNode)+;
<ide> private boolean maybeEatNode() {
<ide> SpelNodeImpl expr = null;
<ide> private boolean maybeEatNode() {
<ide> return true;
<ide> }
<ide> }
<del>
<add>
<ide> // nonDottedNode: indexer;
<ide> private SpelNodeImpl maybeEatNonDottedNode() {
<ide> if (peekToken(TokenKind.LSQUARE)) {
<ide> private SpelNodeImpl maybeEatNonDottedNode() {
<ide> }
<ide> return null;
<ide> }
<del>
<add>
<ide> //dottedNode
<ide> // : ((methodOrProperty
<ide> // | functionOrVar
<del> // | projection
<del> // | selection
<del> // | firstSelection
<del> // | lastSelection
<add> // | projection
<add> // | selection
<add> // | firstSelection
<add> // | lastSelection
<ide> // ))
<ide> // ;
<ide> private SpelNodeImpl eatDottedNode() {
<ide> private SpelNodeImpl eatDottedNode() {
<ide> return pop();
<ide> }
<ide> if (peekToken()==null) {
<del> // unexpectedly ran out of data
<add> // unexpectedly ran out of data
<ide> raiseInternalException(t.startpos,SpelMessage.OOD);
<ide> } else {
<ide> raiseInternalException(t.startpos,SpelMessage.UNEXPECTED_DATA_AFTER_DOT,toString(peekToken()));
<ide> }
<ide> return null;
<ide> }
<del>
<del> // functionOrVar
<add>
<add> // functionOrVar
<ide> // : (POUND ID LPAREN) => function
<ide> // | var
<del> //
<del> // function : POUND id=ID methodArgs -> ^(FUNCTIONREF[$id] methodArgs);
<del> // var : POUND id=ID -> ^(VARIABLEREF[$id]);
<add> //
<add> // function : POUND id=ID methodArgs -> ^(FUNCTIONREF[$id] methodArgs);
<add> // var : POUND id=ID -> ^(VARIABLEREF[$id]);
<ide> private boolean maybeEatFunctionOrVar() {
<ide> if (!peekToken(TokenKind.HASH)) {
<ide> return false;
<ide> private boolean maybeEatFunctionOrVar() {
<ide> return true;
<ide> }
<ide> }
<del>
<add>
<ide> // methodArgs : LPAREN! (argument (COMMA! argument)* (COMMA!)?)? RPAREN!;
<ide> private SpelNodeImpl[] maybeEatMethodArgs() {
<ide> if (!peekToken(TokenKind.LPAREN)) {
<ide> private SpelNodeImpl[] maybeEatMethodArgs() {
<ide> eatToken(TokenKind.RPAREN);
<ide> return args.toArray(new SpelNodeImpl[args.size()]);
<ide> }
<del>
<add>
<ide> private void eatConstructorArgs(List<SpelNodeImpl> accumulatedArguments) {
<ide> if (!peekToken(TokenKind.LPAREN)) {
<ide> throw new InternalParseException(new SpelParseException(expressionString,positionOf(peekToken()),SpelMessage.MISSING_CONSTRUCTOR_ARGS));
<ide> }
<ide> consumeArguments(accumulatedArguments);
<ide> eatToken(TokenKind.RPAREN);
<ide> }
<del>
<add>
<ide> /**
<ide> * Used for consuming arguments for either a method or a constructor call
<ide> */
<ide> private void consumeArguments(List<SpelNodeImpl> accumulatedArguments) {
<ide> raiseInternalException(pos,SpelMessage.RUN_OUT_OF_ARGUMENTS);
<ide> }
<ide> }
<del>
<add>
<ide> private int positionOf(Token t) {
<ide> if (t==null) {
<del> // if null assume the problem is because the right token was
<add> // if null assume the problem is because the right token was
<ide> // not found at the end of the expression
<ide> return expressionString.length();
<ide> } else {
<ide> return t.startpos;
<ide> }
<ide> }
<del>
<ide>
<del> //startNode
<add>
<add> //startNode
<ide> // : parenExpr | literal
<ide> // | type
<del> // | methodOrProperty
<add> // | methodOrProperty
<ide> // | functionOrVar
<del> // | projection
<del> // | selection
<add> // | projection
<add> // | selection
<ide> // | firstSelection
<ide> // | lastSelection
<ide> // | indexer
<ide> private SpelNodeImpl eatStartNode() {
<ide> return null;
<ide> }
<ide> }
<del>
<add>
<ide> // parse: @beanname @'bean.name'
<ide> // quoted if dotted
<ide> private boolean maybeEatBeanReference() {
<ide> private boolean maybeEatBeanReference() {
<ide> } else {
<ide> raiseInternalException(beanRefToken.startpos,SpelMessage.INVALID_BEAN_REFERENCE);
<ide> }
<del>
<add>
<ide> BeanReference beanReference = new BeanReference(toPos(beanNameToken),beanname);
<ide> constructedNodes.push(beanReference);
<ide> return true;
<ide> private boolean maybeEatProjection(boolean nullSafeNavigation) {
<ide> constructedNodes.push(new Projection(nullSafeNavigation, toPos(t), expr));
<ide> return true;
<ide> }
<del>
<add>
<ide> // list = LCURLY (element (COMMA element)*) RCURLY
<ide> private boolean maybeEatInlineList() {
<ide> Token t = peekToken();
<ide> private boolean maybeEatInlineList() {
<ide> List<SpelNodeImpl> listElements = new ArrayList<SpelNodeImpl>();
<ide> do {
<ide> listElements.add(eatExpression());
<del> } while (peekToken(TokenKind.COMMA,true));
<add> } while (peekToken(TokenKind.COMMA,true));
<ide> closingCurly = eatToken(TokenKind.RCURLY);
<ide> expr = new InlineList(toPos(t.startpos,closingCurly.endpos),listElements.toArray(new SpelNodeImpl[listElements.size()]));
<ide> }
<ide> constructedNodes.push(expr);
<ide> return true;
<ide> }
<del>
<add>
<ide> private boolean maybeEatIndexer() {
<ide> Token t = peekToken();
<ide> if (!peekToken(TokenKind.LSQUARE,true)) {
<ide> private boolean maybeEatIndexer() {
<ide> constructedNodes.push(new Indexer(toPos(t),expr));
<ide> return true;
<ide> }
<del>
<add>
<ide> private boolean maybeEatSelection(boolean nullSafeNavigation) {
<ide> Token t = peekToken();
<ide> if (!peekSelectToken()) {
<ide> private boolean maybeEatSelection(boolean nullSafeNavigation) {
<ide> nextToken();
<ide> SpelNodeImpl expr = eatExpression();
<ide> eatToken(TokenKind.RSQUARE);
<del> if (t.kind==TokenKind.SELECT_FIRST) {
<add> if (t.kind==TokenKind.SELECT_FIRST) {
<ide> constructedNodes.push(new Selection(nullSafeNavigation,Selection.FIRST,toPos(t),expr));
<ide> } else if (t.kind==TokenKind.SELECT_LAST) {
<ide> constructedNodes.push(new Selection(nullSafeNavigation,Selection.LAST,toPos(t),expr));
<ide> private SpelNodeImpl eatPossiblyQualifiedId() {
<ide> qualifiedIdPieces.add(new Identifier(startnode.stringValue(),toPos(startnode)));
<ide> while (peekToken(TokenKind.DOT,true)) {
<ide> Token node = eatToken(TokenKind.IDENTIFIER);
<del> qualifiedIdPieces.add(new Identifier(node.stringValue(),toPos(node)));
<add> qualifiedIdPieces.add(new Identifier(node.stringValue(),toPos(node)));
<ide> }
<ide> return new QualifiedIdentifier(toPos(startnode.startpos,qualifiedIdPieces.get(qualifiedIdPieces.size()-1).getEndPosition()),qualifiedIdPieces.toArray(new SpelNodeImpl[qualifiedIdPieces.size()]));
<ide> }
<del>
<add>
<ide> // This is complicated due to the support for dollars in identifiers. Dollars are normally separate tokens but
<ide> // there we want to combine a series of identifiers and dollars into a single identifier
<ide> private boolean maybeEatMethodOrProperty(boolean nullSafeNavigation) {
<ide> private boolean maybeEatMethodOrProperty(boolean nullSafeNavigation) {
<ide> return false;
<ide>
<ide> }
<del>
<del> //constructor
<add>
<add> //constructor
<ide> //: ('new' qualifiedId LPAREN) => 'new' qualifiedId ctorArgs -> ^(CONSTRUCTOR qualifiedId ctorArgs)
<ide> private boolean maybeEatConstructorReference() {
<ide> if (peekIdentifierToken("new")) {
<ide> private void push(SpelNodeImpl newNode) {
<ide> private SpelNodeImpl pop() {
<ide> return constructedNodes.pop();
<ide> }
<del>
<del> // literal
<del> // : INTEGER_LITERAL
<add>
<add> // literal
<add> // : INTEGER_LITERAL
<ide> // | boolLiteral
<del> // | STRING_LITERAL
<del> // | HEXADECIMAL_INTEGER_LITERAL
<add> // | STRING_LITERAL
<add> // | HEXADECIMAL_INTEGER_LITERAL
<ide> // | REAL_LITERAL
<ide> // | DQ_STRING_LITERAL
<ide> // | NULL_LITERAL
<ide> private boolean maybeEatLiteral() {
<ide> push(Literal.getRealLiteral(t.data, toPos(t),false));
<ide> } else if (t.kind==TokenKind.LITERAL_REAL_FLOAT) {
<ide> push(Literal.getRealLiteral(t.data, toPos(t), true));
<del> } else if (peekIdentifierToken("true")) {
<add> } else if (peekIdentifierToken("true")) {
<ide> push(new BooleanLiteral(t.data,toPos(t),true));
<ide> } else if (peekIdentifierToken("false")) {
<ide> push(new BooleanLiteral(t.data,toPos(t),false));
<ide> } else if (t.kind==TokenKind.LITERAL_STRING) {
<ide> push(new StringLiteral(t.data,toPos(t),t.data));
<ide> } else {
<del> return false;
<add> return false;
<ide> }
<ide> nextToken();
<ide> return true;
<ide> private boolean maybeEatParenExpression() {
<ide>
<ide> // relationalOperator
<ide> // : EQUAL | NOT_EQUAL | LESS_THAN | LESS_THAN_OR_EQUAL | GREATER_THAN
<del> // | GREATER_THAN_OR_EQUAL | INSTANCEOF | BETWEEN | MATCHES
<add> // | GREATER_THAN_OR_EQUAL | INSTANCEOF | BETWEEN | MATCHES
<ide> private Token maybeEatRelationalOperator() {
<ide> Token t = peekToken();
<ide> if (t==null) {
<del> return null;
<add> return null;
<ide> }
<ide> if (t.isNumericRelationalOperator()) {
<ide> return t;
<ide> private Token maybeEatRelationalOperator() {
<ide> return t.asMatchesToken();
<ide> } else if (idString.equalsIgnoreCase("between")) {
<ide> return t.asBetweenToken();
<del> }
<add> }
<ide> }
<ide> return null;
<ide> }
<ide> private Token eatToken(TokenKind expectedKind) {
<ide> if (t==null) {
<ide> raiseInternalException( expressionString.length(), SpelMessage.OOD);
<ide> }
<del> if (t.kind!=expectedKind) {
<add> if (t.kind!=expectedKind) {
<ide> raiseInternalException(t.startpos,SpelMessage.NOT_EXPECTED_TOKEN, expectedKind.toString().toLowerCase(),t.getKind().toString().toLowerCase());
<ide> }
<ide> return t;
<ide> private boolean peekIdentifierToken(String identifierString) {
<ide> Token t = peekToken();
<ide> return t.kind==TokenKind.IDENTIFIER && t.stringValue().equalsIgnoreCase(identifierString);
<ide> }
<del>
<add>
<ide> private boolean peekSelectToken() {
<ide> if (!moreTokens()) return false;
<ide> Token t = peekToken();
<ide> return t.kind==TokenKind.SELECT || t.kind==TokenKind.SELECT_FIRST || t.kind==TokenKind.SELECT_LAST;
<ide> }
<del>
<del>
<add>
<add>
<ide> private boolean moreTokens() {
<ide> return tokenStreamPointer<tokenStream.size();
<ide> }
<del>
<add>
<ide> private Token nextToken() {
<ide> if (tokenStreamPointer>=tokenStreamLength) {
<ide> return null;
<ide> private Token peekToken() {
<ide> }
<ide>
<ide> private void raiseInternalException(int pos, SpelMessage message,Object... inserts) {
<del> throw new InternalParseException(new SpelParseException(expressionString,pos,message,inserts));
<add> throw new InternalParseException(new SpelParseException(expressionString,pos,message,inserts));
<ide> }
<del>
<add>
<ide> public String toString(Token t) {
<ide> if (t.getKind().hasPayload()) {
<ide> return t.stringValue();
<ide> } else {
<ide> return t.kind.toString().toLowerCase();
<ide> }
<ide> }
<del>
<add>
<ide> private void checkRightOperand(Token token, SpelNodeImpl operandExpression) {
<ide> if (operandExpression==null) {
<ide> raiseInternalException(token.startpos,SpelMessage.RIGHT_OPERAND_PROBLEM);
<ide> private int toPos(Token t) {
<ide> private int toPos(int start,int end) {
<ide> return (start<<16)+end;
<ide> }
<del>
<add>
<ide> } | 2 |
Ruby | Ruby | use double quotes for setting path." | 6e86976920f97eafaa8fcd2819b1ab3d63375059 | <ide><path>Library/Homebrew/cmd/doctor.rb
<ide> def check_user_path_1
<ide>
<ide> Consider setting your PATH so that #{HOMEBREW_PREFIX}/bin
<ide> occurs before /usr/bin. Here is a one-liner:
<del> echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
<add> echo export PATH='#{HOMEBREW_PREFIX}/bin:$PATH' >> ~/.bash_profile
<ide> EOS
<ide> end
<ide> end
<ide> def check_user_path_2
<ide> <<-EOS.undent
<ide> Homebrew's bin was not found in your PATH.
<ide> Consider setting the PATH for example like so
<del> echo export PATH="#{HOMEBREW_PREFIX}/bin:$PATH" >> ~/.bash_profile
<add> echo export PATH='#{HOMEBREW_PREFIX}/bin:$PATH' >> ~/.bash_profile
<ide> EOS
<ide> end
<ide> end
<ide> def check_user_path_3
<ide> Homebrew's sbin was not found in your PATH but you have installed
<ide> formulae that put executables in #{HOMEBREW_PREFIX}/sbin.
<ide> Consider setting the PATH for example like so
<del> echo export PATH="#{HOMEBREW_PREFIX}/sbin:$PATH" >> ~/.bash_profile
<add> echo export PATH='#{HOMEBREW_PREFIX}/sbin:$PATH' >> ~/.bash_profile
<ide> EOS
<ide> end
<ide> end | 1 |
Text | Text | add vidora to inthewild.md | 37263d609a877f27257663b877823b6dc6f60629 | <ide><path>INTHEWILD.md
<ide> Currently, **officially** using Airflow:
<ide> 1. [Vestiaire Collective](https://www.vestiairecollective.com/) [[@AdriMarteau](https://github.com/AdriMarteau), [@benbenbang](https://github.com/benbenbang)]
<ide> 1. [Vevo](https://www.vevo.com/) [[@csetiawan](https://github.com/csetiawan) & [@jerrygillespie](https://github.com/jerrygillespie)]
<ide> 1. [Vidio](https://www.vidio.com/)
<add>1. [Vidora](https://www.vidora.com/)
<ide> 1. [Ville de Montréal](http://ville.montreal.qc.ca/) [[@VilledeMontreal](https://github.com/VilledeMontreal/)]
<ide> 1. [Vnomics](https://github.com/vnomics) [[@lpalum](https://github.com/lpalum)]
<ide> 1. [Walmart Labs](https://www.walmartlabs.com) [[@bharathpalaksha](https://github.com/bharathpalaksha), [@vipul007ravi](https://github.com/vipul007ravi)] | 1 |
Javascript | Javascript | remove invalid props | 8770151a77069da9ea3d4fc7a02027cce5318752 | <ide><path>RNTester/js/components/RNTesterExampleList.js
<ide> class RNTesterExampleList extends React.Component<Props, $FlowFixMeState> {
<ide> style={{backgroundColor: theme.SystemBackgroundColor}}
<ide> sections={filteredSections}
<ide> renderItem={this._renderItem}
<del> enableEmptySections={true}
<del> itemShouldUpdate={this._itemShouldUpdate}
<ide> keyboardShouldPersistTaps="handled"
<ide> automaticallyAdjustContentInsets={false}
<ide> keyboardDismissMode="on-drag"
<ide> class RNTesterExampleList extends React.Component<Props, $FlowFixMeState> {
<ide> );
<ide> }
<ide>
<del> _itemShouldUpdate(curr, prev) {
<del> return curr.item !== prev.item;
<del> }
<del>
<ide> _renderItem = ({item, separators}) => (
<ide> <RowComponent
<ide> item={item} | 1 |
Ruby | Ruby | fix tests for postgres 8.3.x | c5d37c0662a65ce9723d668f57b59457e79ee5ca | <ide><path>activerecord/test/cases/datatype_test_postgresql.rb
<ide> def setup
<ide> @connection.execute("INSERT INTO postgresql_arrays (commission_by_quarter, nicknames) VALUES ( '{35000,21000,18000,17000}', '{foo,bar,baz}' )")
<ide> @first_array = PostgresqlArray.find(1)
<ide>
<del> @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('$567.89')")
<del> @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('-$567.89')")
<add> @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('567.89'::money)")
<add> @connection.execute("INSERT INTO postgresql_moneys (wealth) VALUES ('-567.89'::money)")
<ide> @first_money = PostgresqlMoney.find(1)
<ide> @second_money = PostgresqlMoney.find(2)
<ide>
<ide> def test_update_text_array
<ide> end
<ide>
<ide> def test_update_money
<del> new_value = 123.45
<add> new_value = BigDecimal.new('123.45')
<ide> assert @first_money.wealth = new_value
<ide> assert @first_money.save
<ide> assert @first_money.reload
<del> assert_equal @first_money.wealth, new_value
<add> assert_equal new_value, @first_money.wealth
<ide> end
<ide>
<ide> def test_update_number
<ide><path>activerecord/test/cases/finder_test.rb
<ide> def test_find_with_order_on_included_associations_with_construct_finder_sql_for_
<ide> end
<ide>
<ide> def test_with_limiting_with_custom_select
<del> posts = Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3)
<add> posts = Post.find(:all, :include => :author, :select => ' posts.*, authors.id as "author_id"', :limit => 3, :order => 'posts.id')
<ide> assert_equal 3, posts.size
<ide> assert_equal [0, 1, 1], posts.map(&:author_id).sort
<ide> end | 2 |
Python | Python | fix outdated tokenizer doc | a0d386455b347508ea31fc88dd06cc5555255c37 | <ide><path>templates/adding_a_new_model/tokenization_xxx.py
<ide> class XxxTokenizer(PreTrainedTokenizer):
<ide>
<ide> Args:
<ide> vocab_file: Path to a one-wordpiece-per-line vocabulary file
<del> do_lower_case: Whether to lower case the input. Only has an effect when do_wordpiece_only=False
<add> do_lower_case: Whether to lower case the input. Only has an effect when do_basic_tokenize=True
<ide> """
<ide>
<ide> vocab_files_names = VOCAB_FILES_NAMES
<ide><path>transformers/tokenization_bert.py
<ide> class BertTokenizer(PreTrainedTokenizer):
<ide>
<ide> Args:
<ide> vocab_file: Path to a one-wordpiece-per-line vocabulary file
<del> do_lower_case: Whether to lower case the input. Only has an effect when do_wordpiece_only=False
<add> do_lower_case: Whether to lower case the input. Only has an effect when do_basic_tokenize=True
<ide> do_basic_tokenize: Whether to do basic tokenization before wordpiece.
<ide> max_len: An artificial maximum length to truncate tokenized sequences to; Effective maximum length is always the
<ide> minimum of this value (if specified) and the underlying BERT model's sequence length.
<ide> never_split: List of tokens which will never be split during tokenization. Only has an effect when
<del> do_wordpiece_only=False
<add> do_basic_tokenize=True
<ide> """
<ide>
<ide> vocab_files_names = VOCAB_FILES_NAMES
<ide><path>transformers/tokenization_distilbert.py
<ide> class DistilBertTokenizer(BertTokenizer):
<ide>
<ide> Args:
<ide> vocab_file: Path to a one-wordpiece-per-line vocabulary file
<del> do_lower_case: Whether to lower case the input. Only has an effect when do_wordpiece_only=False
<add> do_lower_case: Whether to lower case the input. Only has an effect when do_basic_tokenize=True
<ide> do_basic_tokenize: Whether to do basic tokenization before wordpiece.
<ide> max_len: An artificial maximum length to truncate tokenized sequences to; Effective maximum length is always the
<ide> minimum of this value (if specified) and the underlying BERT model's sequence length.
<ide> never_split: List of tokens which will never be split during tokenization. Only has an effect when
<del> do_wordpiece_only=False
<add> do_basic_tokenize=True
<ide> """
<ide>
<ide> vocab_files_names = VOCAB_FILES_NAMES | 3 |
Javascript | Javascript | update path to .env file | c1a8227e99042bafaa702bf31709af9512848dc1 | <ide><path>tools/scripts/seed/seedChallenges.js
<ide> const path = require('path');
<ide> const fs = require('fs');
<del>require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
<add>require('dotenv').config({ path: path.resolve(__dirname, '../../../.env') });
<ide> const MongoClient = require('mongodb').MongoClient;
<ide> const { getChallengesForLang } = require('@freecodecamp/curriculum');
<ide> const { flatten } = require('lodash'); | 1 |
Python | Python | fix typo in file header (jsonimpl => json) | eaba4a73aa1013db908ea07af6028056c4fde706 | <ide><path>flask/json.py
<ide> # -*- coding: utf-8 -*-
<ide> """
<del> flask.jsonimpl
<del> ~~~~~~~~~~~~~~
<add> flask.json
<add> ~~~~~~~~~~
<ide>
<ide> Implementation helpers for the JSON support in Flask.
<ide> | 1 |
Text | Text | change wording of pr guidance | 82691be5e208a7d24cfbc8bf8748e03ebd4bc1cf | <ide><path>docs/how-to-open-a-pull-request.md
<ide> We recommend using [conventional title and messages](https://www.conventionalcom
<ide> >
<ide> > `fix(learn): tests for the do...while loop challenge`
<ide>
<del>When opening a Pull Request(PR), you can use the below to determine the type, scope (optional), and description.
<add>Whenever you open a Pull Request(PR), you can use the below to determine the type, scope (optional), and description.
<ide>
<ide> **Type:**
<ide>
<ide> You can select a scope from [this list of labels](https://github.com/freeCodeCam
<ide>
<ide> **Description:**
<ide>
<del>Keep it short (less than 30 characters) and simple, you can add more information in the PR description box and comments.
<add>Keep it short (less than 30 characters) and simple; you can add more information in the PR description box and comments.
<ide>
<ide> Some examples of good PR titles would be:
<ide>
<ide> Some examples of good PR titles would be:
<ide>
<ide> 3. Submit the pull request from your branch to freeCodeCamp's `main` branch.
<ide>
<del>4. In the body of your PR include a more detailed summary of the changes you made and why.
<add>4. Include a more detailed summary of the changes you made and how your changes are helpful in the body of your PR.
<ide>
<ide> - You will be presented with a pull request template. This is a checklist that you should have followed before opening the pull request.
<ide> | 1 |
Javascript | Javascript | use templates to test view.nearesttypeof | f892dc8390f40ba84e825e946dea131afbaa01c1 | <ide><path>packages/ember-views/tests/views/view/nearest_of_type_test.js
<ide> import run from "ember-metal/run_loop";
<ide> import { Mixin as EmberMixin } from "ember-metal/mixin";
<ide> import View from "ember-views/views/view";
<add>import compile from "ember-template-compiler/system/compile";
<ide>
<ide> var parentView, view;
<ide>
<ide> QUnit.module("View#nearest*", {
<ide> (function() {
<ide> var Mixin = EmberMixin.create({});
<ide> var Parent = View.extend(Mixin, {
<del> render(buffer) {
<del> this.appendChild(View.create());
<del> }
<add> template: compile(`{{view}}`)
<ide> });
<ide>
<del> QUnit.skip("nearestOfType should find the closest view by view class", function() {
<add> QUnit.test("nearestOfType should find the closest view by view class", function() {
<ide> var child;
<ide>
<ide> run(function() {
<ide> QUnit.module("View#nearest*", {
<ide> equal(child.nearestOfType(Parent), parentView, "finds closest view in the hierarchy by class");
<ide> });
<ide>
<del> QUnit.skip("nearestOfType should find the closest view by mixin", function() {
<add> QUnit.test("nearestOfType should find the closest view by mixin", function() {
<ide> var child;
<ide>
<ide> run(function() {
<ide> QUnit.module("View#nearest*", {
<ide> equal(child.nearestOfType(Mixin), parentView, "finds closest view in the hierarchy by class");
<ide> });
<ide>
<del> QUnit.skip("nearestWithProperty should search immediate parent", function() {
<add> QUnit.test("nearestWithProperty should search immediate parent", function() {
<ide> var childView;
<ide>
<ide> view = View.create({
<ide> myProp: true,
<del>
<del> render(buffer) {
<del> this.appendChild(View.create());
<del> }
<add> template: compile('{{view}}')
<ide> });
<ide>
<ide> run(function() {
<ide> QUnit.module("View#nearest*", {
<ide>
<ide> });
<ide>
<del> QUnit.skip("nearestChildOf should be deprecated", function() {
<add> QUnit.test("nearestChildOf should be deprecated", function() {
<ide> var child;
<ide>
<ide> run(function() { | 1 |
Python | Python | implement review fixes | 895cf2090c665fac2a50549932acd55cd2dc3856 | <ide><path>keras/backend.py
<ide> def resize_images(x, height_factor, width_factor, data_format,
<ide> height_factor: Positive integer.
<ide> width_factor: Positive integer.
<ide> data_format: One of `"channels_first"`, `"channels_last"`.
<del> interpolation: A string any of `tf.image.ResizeMethod`.
<add> interpolation: A string, one of `area`, `bicubic`, `bilinear`,
<add> `gaussian`, `lanczos3`, `lanczos5`, `mitchellcubic`, `nearest`.
<ide>
<ide> Returns:
<ide> A tensor.
<ide> def resize_images(x, height_factor, width_factor, data_format,
<ide> 'mitchellcubic': tf.image.ResizeMethod.MITCHELLCUBIC,
<ide> 'nearest': tf.image.ResizeMethod.NEAREST_NEIGHBOR,
<ide> }
<add> interploations_list = '`' + '`, `'.join(interpolations.keys()) + '`'
<ide> if interpolation in interpolations:
<ide> x = tf.image.resize(x, new_shape, method=interpolations[interpolation])
<ide> else:
<del> raise ValueError('interpolation should be '
<del> 'from `tf.image.ResizeMethod`.')
<add> raise ValueError('`interpolation` argument should be one of: '
<add> f'{interploations_list}. Received: "{interpolation}".')
<ide> if data_format == 'channels_first':
<ide> x = permute_dimensions(x, [0, 3, 1, 2])
<ide>
<ide><path>keras/layers/reshaping/up_sampling2d.py
<ide> class UpSampling2D(Layer):
<ide> It defaults to the `image_data_format` value found in your
<ide> Keras config file at `~/.keras/keras.json`.
<ide> If you never set it, then it will be "channels_last".
<del> interpolation: A string any of `tf.image.ResizeMethod`.
<add> interpolation: A string, one of `area`, `bicubic`, `bilinear`, `gaussian`,
<add> `lanczos3`, `lanczos5`, `mitchellcubic`, `nearest`.
<ide>
<ide> Input shape:
<ide> 4D tensor with shape:
<ide> def __init__(self,
<ide> 'mitchellcubic': tf.image.ResizeMethod.MITCHELLCUBIC,
<ide> 'nearest': tf.image.ResizeMethod.NEAREST_NEIGHBOR,
<ide> }
<add> interploations_list = '`' + '`, `'.join(interpolations.keys()) + '`'
<ide> if interpolation not in interpolations:
<del> raise ValueError('`interpolation` argument should be from `tf.image.ResizeMethod`. '
<del> f'Received: "{interpolation}".')
<add> raise ValueError('`interpolation` argument should be one of: '
<add> f'{interploations_list}. Received: "{interpolation}".')
<ide> self.interpolation = interpolation
<ide> self.input_spec = InputSpec(ndim=4)
<ide> | 2 |
Javascript | Javascript | fix 'private' keyword | 37315af515483bba60c2db3af643314225de7f8f | <ide><path>fonts.js
<ide> var Type1Parser = function() {
<ide> subrs: [],
<ide> charstrings: [],
<ide> properties: {
<del> private: {}
<add> 'private': {}
<ide> }
<ide> };
<ide> | 1 |
Javascript | Javascript | remove tvos from the e2e ci tests | dfdbf41cc3a9f4d8eb20ab4dd45a1d10a27d11c5 | <ide><path>scripts/run-ci-e2e-tests.js
<ide> * This script tests that React Native end to end installation/bootstrap works for different platforms
<ide> * Available arguments:
<ide> * --ios - 'react-native init' and check iOS app doesn't redbox
<del> * --tvos - 'react-native init' and check tvOS app doesn't redbox
<ide> * --android - 'react-native init' and check Android app doesn't redbox
<ide> * --js - 'react-native init' and only check the packager returns a bundle
<ide> * --skip-cli-install - to skip react-native-cli global installation (for local debugging)
<ide> try {
<ide> }
<ide> }
<ide>
<del> if (argv.ios || argv.tvos) {
<del> var iosTestType = argv.tvos ? 'tvOS' : 'iOS';
<add> if (argv.ios) {
<ide> cd('ios');
<ide> // shelljs exec('', {async: true}) does not emit stdout events, so we rely on good old spawn
<ide> const packagerEnv = Object.create(process.env);
<ide> try {
<ide> });
<ide> SERVER_PID = packagerProcess.pid;
<ide> exec('sleep 15s');
<del> // prepare cache to reduce chances of possible red screen "Can't fibd variable __fbBatchedBridge..."
<add> // prepare cache to reduce chances of possible red screen "Can't find variable __fbBatchedBridge..."
<ide> exec(
<ide> 'response=$(curl --write-out %{http_code} --silent --output /dev/null localhost:8081/index.bundle?platform=ios&dev=true)',
<ide> );
<ide> try {
<ide> describe('Install CocoaPod dependencies');
<ide> exec('pod install');
<ide>
<del> describe('Test: ' + iosTestType + ' end-to-end test');
<add> describe('Test: iOS end-to-end test');
<ide> if (
<ide> // TODO: Get target OS and simulator from .tests.env
<ide> tryExecNTimes(
<ide> () => {
<del> let destination = 'platform=iOS Simulator,name=iPhone 8,OS=13.3';
<del> let sdk = 'iphonesimulator';
<del> let scheme = 'HelloWorld';
<del>
<del> if (argv.tvos) {
<del> destination = 'platform=tvOS Simulator,name=Apple TV,OS=13.3';
<del> sdk = 'appletvsimulator';
<del> scheme = 'HelloWorld-tvOS';
<del> }
<del>
<ide> return exec(
<ide> [
<ide> 'xcodebuild',
<ide> '-workspace',
<ide> '"HelloWorld.xcworkspace"',
<ide> '-destination',
<del> `"${destination}"`,
<add> '"platform=iOS Simulator,name=iPhone 8,OS=13.3"',
<ide> '-scheme',
<del> `"${scheme}"`,
<add> '"HelloWorld"',
<ide> '-sdk',
<del> sdk,
<add> 'iphonesimulator',
<ide> '-UseModernBuildSystem=NO',
<ide> 'test',
<ide> ].join(' ') +
<ide> try {
<ide> '--report',
<ide> 'junit',
<ide> '--output',
<del> `"~/react-native/reports/junit/${iosTestType}-e2e/results.xml"`,
<add> '"~/react-native/reports/junit/iOS-e2e/results.xml"',
<ide> ].join(' ') +
<ide> ' && exit ${PIPESTATUS[0]}',
<ide> ).code;
<ide> try {
<ide> () => exec('sleep 10s'),
<ide> )
<ide> ) {
<del> echo('Failed to run ' + iosTestType + ' end-to-end tests');
<add> echo('Failed to run iOS end-to-end tests');
<ide> echo('Most likely the code is broken');
<ide> exitCode = 1;
<ide> throw Error(exitCode); | 1 |
Text | Text | remove unmaintained plugin from readme | 1e1d9ceecb6c8b123a92aa617bf0b5db86fb3122 | <ide><path>README.md
<ide> within webpack itself use this plugin interface. This makes webpack very
<ide> |:--:|:----:|:----------|
<ide> |[common-chunks-webpack-plugin][common]|![common-npm]|Generates chunks of common modules shared between entry points and splits them into separate bundles (e.g vendor.bundle.js && app.bundle.js)|
<ide> |[extract-text-webpack-plugin][extract]|![extract-npm]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)|
<del>|[component-webpack-plugin][component]|![component-npm]|Use components with webpack|
<ide> |[compression-webpack-plugin][compression]|![compression-npm]|Prepare compressed versions of assets to serve them with Content-Encoding|
<ide> |[i18n-webpack-plugin][i18n]|![i18n-npm]|Adds i18n support to your bundles|
<ide> |[html-webpack-plugin][html-plugin]|![html-plugin-npm]| Simplifies creation of HTML files (`index.html`) to serve your bundles| | 1 |
PHP | PHP | add test for parse() | 66314da73b9918a9700128587f57704db2e9e397 | <ide><path>tests/TestCase/Routing/ScopedRouteCollectionTest.php
<ide> public function testNestedPluginPathOption() {
<ide> });
<ide> }
<ide>
<add>/**
<add> * Test parsing routes.
<add> *
<add> * @return void
<add> */
<add> public function testParse() {
<add> $routes = new ScopedRouteCollection('/b', ['key' => 'value']);
<add> $routes->connect('/', ['controller' => 'Articles']);
<add> $routes->connect('/:id', ['controller' => 'Articles', 'action' => 'view']);
<add>
<add> $result = $routes->parse('/');
<add> $this->assertEquals([], $result, 'Should not match, missing /b');
<add>
<add> $result = $routes->parse('/b/');
<add> $expected = [
<add> 'controller' => 'Articles',
<add> 'action' => 'index',
<add> 'pass' => [],
<add> 'plugin' => null,
<add> 'key' => 'value',
<add> ];
<add> $this->assertEquals($expected, $result);
<add>
<add> $result = $routes->parse('/b/the-thing?one=two');
<add> $expected = [
<add> 'controller' => 'Articles',
<add> 'action' => 'view',
<add> 'id' => 'the-thing',
<add> 'pass' => [],
<add> 'plugin' => null,
<add> 'key' => 'value',
<add> '?' => ['one' => 'two'],
<add> ];
<add> $this->assertEquals($expected, $result);
<add> }
<add>
<ide> } | 1 |
Python | Python | set default network mode to auto | 0bae0e5c0845b3a3a02d68141466efe035581a56 | <ide><path>libcloud/compute/drivers/gce.py
<ide> def ex_create_subnetwork(self, name, cidr=None, network=None, region=None,
<ide>
<ide> return self.ex_get_subnetwork(name, region_name)
<ide>
<del> def ex_create_network(self, name, cidr, description=None, mode="legacy"):
<add> def ex_create_network(self, name, cidr, description=None, mode="auto"):
<ide> """
<ide> Create a network. In November 2015, Google introduced Subnetworks and
<ide> suggests using networks with 'auto' generated subnetworks. See, the | 1 |
Java | Java | allow bypass of active/default properties | da3ff29e88f4f7041714deb10e91f4ca68bac12c | <ide><path>spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java
<ide> public String[] getActiveProfiles() {
<ide> /**
<ide> * Return the set of active profiles as explicitly set through
<ide> * {@link #setActiveProfiles} or if the current set of active profiles
<del> * is empty, check for the presence of the {@value #ACTIVE_PROFILES_PROPERTY_NAME}
<del> * property and assign its value to the set of active profiles.
<add> * is empty, check for the presence of {@link #doGetActiveProfilesProperty()}
<add> * and assign its value to the set of active profiles.
<ide> * @see #getActiveProfiles()
<del> * @see #ACTIVE_PROFILES_PROPERTY_NAME
<add> * @see #doGetActiveProfilesProperty()
<ide> */
<ide> protected Set<String> doGetActiveProfiles() {
<ide> synchronized (this.activeProfiles) {
<ide> if (this.activeProfiles.isEmpty()) {
<del> String profiles = getProperty(ACTIVE_PROFILES_PROPERTY_NAME);
<add> String profiles = doGetActiveProfilesProperty();
<ide> if (StringUtils.hasText(profiles)) {
<ide> setActiveProfiles(StringUtils.commaDelimitedListToStringArray(
<ide> StringUtils.trimAllWhitespace(profiles)));
<ide> protected Set<String> doGetActiveProfiles() {
<ide> }
<ide> }
<ide>
<add> /**
<add> * Return the property value for the active profiles.
<add> * @see #ACTIVE_PROFILES_PROPERTY_NAME
<add> * @since 5.3.4
<add> */
<add> protected String doGetActiveProfilesProperty() {
<add> return getProperty(ACTIVE_PROFILES_PROPERTY_NAME);
<add> }
<add>
<ide> @Override
<ide> public void setActiveProfiles(String... profiles) {
<ide> Assert.notNull(profiles, "Profile array must not be null");
<ide> public String[] getDefaultProfiles() {
<ide> * Return the set of default profiles explicitly set via
<ide> * {@link #setDefaultProfiles(String...)} or if the current set of default profiles
<ide> * consists only of {@linkplain #getReservedDefaultProfiles() reserved default
<del> * profiles}, then check for the presence of the
<del> * {@value #DEFAULT_PROFILES_PROPERTY_NAME} property and assign its value (if any)
<del> * to the set of default profiles.
<add> * profiles}, then check for the presence of {@link #doGetActiveProfilesProperty()}
<add> * and assign its value (if any) to the set of default profiles.
<ide> * @see #AbstractEnvironment()
<ide> * @see #getDefaultProfiles()
<del> * @see #DEFAULT_PROFILES_PROPERTY_NAME
<ide> * @see #getReservedDefaultProfiles()
<add> * @see #doGetDefaultProfilesProperty()
<ide> */
<ide> protected Set<String> doGetDefaultProfiles() {
<ide> synchronized (this.defaultProfiles) {
<ide> if (this.defaultProfiles.equals(getReservedDefaultProfiles())) {
<del> String profiles = getProperty(DEFAULT_PROFILES_PROPERTY_NAME);
<add> String profiles = doGetDefaultProfilesProperty();
<ide> if (StringUtils.hasText(profiles)) {
<ide> setDefaultProfiles(StringUtils.commaDelimitedListToStringArray(
<ide> StringUtils.trimAllWhitespace(profiles)));
<ide> protected Set<String> doGetDefaultProfiles() {
<ide> }
<ide> }
<ide>
<add> /**
<add> * Return the property value for the default profiles.
<add> * @see #DEFAULT_PROFILES_PROPERTY_NAME
<add> * @since 5.3.4
<add> */
<add> protected String doGetDefaultProfilesProperty() {
<add> return getProperty(DEFAULT_PROFILES_PROPERTY_NAME);
<add> }
<add>
<ide> /**
<ide> * Specify the set of profiles to be made active by default if no other profiles
<ide> * are explicitly made active through {@link #setActiveProfiles}.
<ide><path>spring-core/src/test/java/org/springframework/core/env/CustomEnvironmentTests.java
<ide>
<ide> import java.util.Collections;
<ide> import java.util.HashSet;
<add>import java.util.LinkedHashMap;
<add>import java.util.Map;
<ide> import java.util.Set;
<ide>
<ide> import org.junit.jupiter.api.Test;
<ide> protected Set<String> getReservedDefaultProfiles() {
<ide> assertThat(env.acceptsProfiles(Profiles.of("a1 | a2"))).isFalse();
<ide> }
<ide>
<add> @Test
<add> public void withNoProfileProperties() {
<add> ConfigurableEnvironment env = new AbstractEnvironment() {
<add>
<add> @Override
<add> protected String doGetActiveProfilesProperty() {
<add> return null;
<add> }
<add>
<add> @Override
<add> protected String doGetDefaultProfilesProperty() {
<add> return null;
<add> }
<add>
<add> };
<add> Map<String, Object> values = new LinkedHashMap<>();
<add> values.put(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "a,b,c");
<add> values.put(AbstractEnvironment.DEFAULT_PROFILES_PROPERTY_NAME, "d,e,f");
<add> PropertySource<?> propertySource = new MapPropertySource("test", values);
<add> env.getPropertySources().addFirst(propertySource);
<add> assertThat(env.getActiveProfiles()).isEmpty();
<add> assertThat(env.getDefaultProfiles()).containsExactly(AbstractEnvironment.RESERVED_DEFAULT_PROFILE_NAME);
<add> }
<add>
<ide> private Profiles defaultProfile() {
<ide> return Profiles.of(AbstractEnvironment.RESERVED_DEFAULT_PROFILE_NAME);
<ide> } | 2 |
Javascript | Javascript | reduce flakiness with ie11 test runs | f616b3bdd941f653438cb99c9e276fc161f3e732 | <ide><path>packages/ember-glimmer/tests/integration/helpers/input-test.js
<ide> moduleFor('Helpers test: {{input}}', class extends InputRenderingTest {
<ide> }
<ide>
<ide> ['@test triggers `focus-in` when focused'](assert) {
<del> assert.expect(1);
<add> let wasFocused = false;
<ide>
<ide> this.render(`{{input focus-in='foo'}}`, {
<ide> actions: {
<ide> foo() {
<del> assert.ok(true, 'action was triggered');
<add> wasFocused = true;
<ide> }
<ide> }
<ide> });
<ide>
<ide> this.runTask(() => { this.$input().focus(); });
<add>
<add> assert.ok(wasFocused, 'action was triggered');
<ide> }
<ide>
<ide> ['@test sends `insert-newline` when <enter> is pressed'](assert) {
<ide><path>packages/ember-testing/tests/helpers_test.js
<ide> import {
<ide> moduleFor,
<del> AutobootApplicationTestCase
<add> AutobootApplicationTestCase,
<add> isIE11
<ide> } from 'internal-test-helpers';
<ide>
<ide> import { Route } from 'ember-routing';
<ide> if (!jQueryDisabled) {
<ide> wrapper.addEventListener('mousedown', e => events.push(e.type));
<ide> wrapper.addEventListener('mouseup', e => events.push(e.type));
<ide> wrapper.addEventListener('click', e => events.push(e.type));
<del> wrapper.addEventListener('focusin', e => events.push(e.type));
<add> wrapper.addEventListener('focusin', e => {
<add> // IE11 _sometimes_ triggers focusin **twice** in a row
<add> // (we believe this is when it is under higher load)
<add> //
<add> // the goal here is to only push a single focusin when running on
<add> // IE11
<add> if (isIE11) {
<add> if (events[events.length - 1] !== 'focusin') {
<add> events.push(e.type);
<add> }
<add> } else {
<add> events.push(e.type);
<add> }
<add> });
<ide> }
<ide> }));
<ide>
<ide> if (!jQueryDisabled) {
<ide> }
<ide>
<ide> [`@test 'fillIn' focuses on the element`](assert) {
<del> assert.expect(2);
<add> let wasFocused = false;
<ide>
<ide> this.add('route:application', Route.extend({
<ide> actions: {
<ide> wasFocused() {
<del> assert.ok(true, 'focusIn event was triggered');
<add> wasFocused = true;
<ide> }
<ide> }
<ide> }));
<ide> if (!jQueryDisabled) {
<ide> visit('/');
<ide> fillIn('#first', 'current value');
<ide> andThen(() => {
<add> assert.ok(wasFocused, 'focusIn event was triggered');
<add>
<ide> assert.equal(
<ide> find('#first')[0].value,'current value'
<ide> );
<ide> if (!jQueryDisabled) {
<ide> }
<ide>
<ide> });
<del>}
<ide>\ No newline at end of file
<add>}
<ide><path>packages/internal-test-helpers/lib/browser-detect.js
<add>// `window.ActiveXObject` is "falsey" in IE11 (but not `undefined` or `false`)
<add>// `"ActiveXObject" in window` returns `true` in all IE versions
<add>// only IE11 will pass _both_ of these conditions
<add>export const isIE11 = !window.ActiveXObject && 'ActiveXObject' in window;
<ide><path>packages/internal-test-helpers/lib/index.js
<ide> export {
<ide> default as TestResolver,
<ide> ModuleBasedResolver as ModuleBasedTestResolver
<ide> } from './test-resolver';
<add>
<add>export { isIE11 } from './browser-detect'; | 4 |
Java | Java | fix lazyreactpackage in oss | 42146a7a4ad992a3597e07ead3aafdc36d58ac26 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/LazyReactPackage.java
<ide>
<ide> package com.facebook.react;
<ide>
<del>import java.util.ArrayList;
<del>import java.util.Collections;
<del>import java.util.List;
<add>import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
<ide>
<ide> import com.facebook.react.bridge.ModuleSpec;
<ide> import com.facebook.react.bridge.NativeModule;
<ide> import com.facebook.react.bridge.ReactApplicationContext;
<ide> import com.facebook.react.bridge.ReactMarker;
<ide> import com.facebook.react.bridge.ReactMarkerConstants;
<add>import com.facebook.react.module.model.ReactModuleInfo;
<ide> import com.facebook.react.module.model.ReactModuleInfoProvider;
<ide> import com.facebook.react.uimanager.ViewManager;
<ide> import com.facebook.systrace.SystraceMessage;
<del>
<del>import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
<add>import java.util.ArrayList;
<add>import java.util.Collections;
<add>import java.util.List;
<add>import java.util.Map;
<ide>
<ide> /**
<ide> * React package supporting lazy creation of native modules.
<ide> public static ReactModuleInfoProvider getReactModuleInfoProviderViaReflection(
<ide> reactModuleInfoProviderClass = Class.forName(
<ide> lazyReactPackage.getClass().getCanonicalName() + "$$ReactModuleInfoProvider");
<ide> } catch (ClassNotFoundException e) {
<del> throw new RuntimeException(e);
<add> // In OSS case, when the annotation processor does not run, we fall back to non-lazy mode
<add> // For this, we simply return an empty moduleMap.
<add> // NativeModuleRegistryBuilder will eagerly get all the modules, and get the info from the
<add> // modules directly
<add> return new ReactModuleInfoProvider() {
<add> @Override
<add> public Map<String, ReactModuleInfo> getReactModuleInfos() {
<add> return Collections.emptyMap();
<add> }
<add> };
<ide> }
<ide>
<ide> if (reactModuleInfoProviderClass == null) {
<ide><path>ReactAndroid/src/main/java/com/facebook/react/NativeModuleRegistryBuilder.java
<ide> public void processPackage(ReactPackage reactPackage) {
<ide> NativeModule module;
<ide> ReactMarker.logMarker(
<ide> ReactMarkerConstants.CREATE_MODULE_START,
<del> moduleSpec.getType().getName());
<add> moduleSpec.getClassName());
<ide> try {
<ide> module = moduleSpec.getProvider().get();
<ide> } finally { | 2 |
Ruby | Ruby | fix typo in active job exceptions docs | 6a4e97c4bbce5433a8156059de154cadc6438757 | <ide><path>activejob/lib/active_job/exceptions.rb
<ide> module ClassMethods
<ide> #
<ide> # ==== Options
<ide> # * <tt>:wait</tt> - Re-enqueues the job with a delay specified either in seconds (default: 3 seconds),
<del> # as a computing proc that the number of executions so far as an argument, or as a symbol reference of
<add> # as a computing proc that takes the number of executions so far as an argument, or as a symbol reference of
<ide> # <tt>:exponentially_longer</tt>, which applies the wait algorithm of <tt>((executions**4) + (Kernel.rand * (executions**4) * jitter)) + 2</tt>
<ide> # (first wait ~3s, then ~18s, then ~83s, etc)
<ide> # * <tt>:attempts</tt> - Re-enqueues the job the specified number of times (default: 5 attempts) | 1 |
Python | Python | set version to v2.1.3 | 85dcd9477edfc1970232d1e790b7e401ec36b882 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide>
<ide> __title__ = "spacy"
<del>__version__ = "2.1.2"
<add>__version__ = "2.1.3"
<ide> __summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"
<ide> __uri__ = "https://spacy.io"
<ide> __author__ = "Explosion AI" | 1 |
Text | Text | use serial comma in stream docs | 5ec2c9900722470d47a2e41294d08b60a6016a3b | <ide><path>doc/api/stream.md
<ide> added: v11.4.0
<ide> * {boolean}
<ide>
<ide> Is `true` if it is safe to call [`writable.write()`][stream-write], which means
<del>the stream has not been destroyed, errored or ended.
<add>the stream has not been destroyed, errored, or ended.
<ide>
<ide> ##### `writable.writableAborted`
<ide>
<ide> changes:
<ide>
<ide> * `chunk` {Buffer|Uint8Array|string|null|any} Chunk of data to unshift onto the
<ide> read queue. For streams not operating in object mode, `chunk` must be a
<del> string, `Buffer`, `Uint8Array` or `null`. For object mode streams, `chunk`
<add> string, `Buffer`, `Uint8Array`, or `null`. For object mode streams, `chunk`
<ide> may be any JavaScript value.
<ide> * `encoding` {string} Encoding of string chunks. Must be a valid
<ide> `Buffer` encoding, such as `'utf8'` or `'ascii'`.
<ide> added: v1.2.0
<ide>
<ide> For many simple cases, it is possible to create a stream without relying on
<ide> inheritance. This can be accomplished by directly creating instances of the
<del>`stream.Writable`, `stream.Readable`, `stream.Duplex` or `stream.Transform`
<add>`stream.Writable`, `stream.Readable`, `stream.Duplex`, or `stream.Transform`
<ide> objects and passing appropriate methods as constructor options.
<ide>
<ide> ```js
<ide> changes:
<ide> * Returns: {boolean} `true` if additional chunks of data may continue to be
<ide> pushed; `false` otherwise.
<ide>
<del>When `chunk` is a `Buffer`, `Uint8Array` or `string`, the `chunk` of data will
<add>When `chunk` is a `Buffer`, `Uint8Array`, or `string`, the `chunk` of data will
<ide> be added to the internal queue for users of the stream to consume.
<ide> Passing `chunk` as `null` signals the end of the stream (EOF), after which no
<ide> more data can be written.
<ide> situations within Node.js where this is done, particularly in the
<ide>
<ide> Use of `readable.push('')` is not recommended.
<ide>
<del>Pushing a zero-byte string, `Buffer` or `Uint8Array` to a stream that is not in
<add>Pushing a zero-byte string, `Buffer`, or `Uint8Array` to a stream that is not in
<ide> object mode has an interesting side effect. Because it _is_ a call to
<ide> [`readable.push()`][stream-push], the call will end the reading process.
<ide> However, because the argument is an empty string, no data is added to the | 1 |
Javascript | Javascript | remove geometry check | e0cf3e37510a80d7de9d2515627ee05202c3ce77 | <ide><path>examples/js/utils/BufferGeometryUtils.js
<ide> THREE.BufferGeometryUtils = {
<ide> */
<ide> computeMorphedAttributes: function ( object ) {
<ide>
<del> if ( ! object.geometry ) {
<del>
<del> console.error( 'Please provide an object with a geometry' );
<del> return null;
<del>
<del> } else if ( ! object.geometry.isBufferGeometry ) {
<add> if ( ! object.geometry.isBufferGeometry ) {
<ide>
<ide> console.error( 'Geometry is not a BufferGeometry' );
<ide> return null;
<ide><path>examples/jsm/utils/BufferGeometryUtils.js
<ide> var BufferGeometryUtils = {
<ide> */
<ide> computeMorphedAttributes: function ( object ) {
<ide>
<del> if ( ! object.geometry ) {
<del>
<del> console.warn( 'Please provide an object with a geometry' );
<del> return null;
<del>
<del> } else if ( ! object.geometry.isBufferGeometry ) {
<add> if ( ! object.geometry.isBufferGeometry ) {
<ide>
<ide> console.warn( 'Geometry is not a BufferGeometry' );
<ide> return null; | 2 |
Javascript | Javascript | add test for attempted multiple ipc channels | ae4ce9fe73e9f65f00c6439f2c6ad7381d69d38e | <ide><path>test/parallel/test-child-process-stdio.js
<ide> assert.equal(child.stderr, null);
<ide> options = {stdio: 'ignore'};
<ide> child = common.spawnSyncCat(options);
<ide> assert.deepStrictEqual(options, {stdio: 'ignore'});
<add>
<add>assert.throws(() => {
<add> common.spawnPwd({stdio: ['pipe', 'pipe', 'pipe', 'ipc', 'ipc']});
<add>}, /^Error: Child process can have only one IPC pipe$/); | 1 |
Java | Java | remove style prefix in java and cs apis | 065af66deb7ff6b53910d3540995a3790deb8876 | <ide><path>ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java
<ide> public void setPosition(int spacingType, float position) {
<ide>
<ide> private native float jni_CSSNodeStyleGetWidth(long nativePointer);
<ide> @Override
<del> public float getStyleWidth() {
<add> public float getWidth() {
<ide> return jni_CSSNodeStyleGetWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetWidth(long nativePointer, float width);
<ide> @Override
<del> public void setStyleWidth(float width) {
<add> public void setWidth(float width) {
<ide> jni_CSSNodeStyleSetWidth(mNativePointer, width);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetHeight(long nativePointer);
<ide> @Override
<del> public float getStyleHeight() {
<add> public float getHeight() {
<ide> return jni_CSSNodeStyleGetHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetHeight(long nativePointer, float height);
<ide> @Override
<del> public void setStyleHeight(float height) {
<add> public void setHeight(float height) {
<ide> jni_CSSNodeStyleSetHeight(mNativePointer, height);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetMinWidth(long nativePointer);
<ide> @Override
<del> public float getStyleMinWidth() {
<add> public float getMinWidth() {
<ide> return jni_CSSNodeStyleGetMinWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetMinWidth(long nativePointer, float minWidth);
<ide> @Override
<del> public void setStyleMinWidth(float minWidth) {
<add> public void setMinWidth(float minWidth) {
<ide> jni_CSSNodeStyleSetMinWidth(mNativePointer, minWidth);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetMinHeight(long nativePointer);
<ide> @Override
<del> public float getStyleMinHeight() {
<add> public float getMinHeight() {
<ide> return jni_CSSNodeStyleGetMinHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetMinHeight(long nativePointer, float minHeight);
<ide> @Override
<del> public void setStyleMinHeight(float minHeight) {
<add> public void setMinHeight(float minHeight) {
<ide> jni_CSSNodeStyleSetMinHeight(mNativePointer, minHeight);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetMaxWidth(long nativePointer);
<ide> @Override
<del> public float getStyleMaxWidth() {
<add> public float getMaxWidth() {
<ide> return jni_CSSNodeStyleGetMaxWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetMaxWidth(long nativePointer, float maxWidth);
<ide> @Override
<del> public void setStyleMaxWidth(float maxWidth) {
<add> public void setMaxWidth(float maxWidth) {
<ide> jni_CSSNodeStyleSetMaxWidth(mNativePointer, maxWidth);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetMaxHeight(long nativePointer);
<ide> @Override
<del> public float getStyleMaxHeight() {
<add> public float getMaxHeight() {
<ide> return jni_CSSNodeStyleGetMaxHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetMaxHeight(long nativePointer, float maxheight);
<ide> @Override
<del> public void setStyleMaxHeight(float maxheight) {
<add> public void setMaxHeight(float maxheight) {
<ide> jni_CSSNodeStyleSetMaxHeight(mNativePointer, maxheight);
<ide> }
<ide>
<ide> private native float jni_CSSNodeStyleGetAspectRatio(long nativePointer);
<del> public float getStyleAspectRatio() {
<add> public float getAspectRatio() {
<ide> return jni_CSSNodeStyleGetAspectRatio(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_CSSNodeStyleSetAspectRatio(long nativePointer, float aspectRatio);
<del> public void setStyleAspectRatio(float aspectRatio) {
<add> public void setAspectRatio(float aspectRatio) {
<ide> jni_CSSNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
<ide> }
<ide>
<ide><path>ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeAPI.java
<ide> long measure(
<ide> void setBorder(int spacingType, float border);
<ide> float getPosition(int spacingType);
<ide> void setPosition(int spacingType, float position);
<del> float getStyleWidth();
<del> void setStyleWidth(float width);
<del> float getStyleHeight();
<del> void setStyleHeight(float height);
<del> float getStyleMaxWidth();
<del> void setStyleMaxWidth(float maxWidth);
<del> float getStyleMinWidth();
<del> void setStyleMinWidth(float minWidth);
<del> float getStyleMaxHeight();
<del> void setStyleMaxHeight(float maxHeight);
<del> float getStyleMinHeight();
<del> void setStyleMinHeight(float minHeight);
<add> float getWidth();
<add> void setWidth(float width);
<add> float getHeight();
<add> void setHeight(float height);
<add> float getMaxWidth();
<add> void setMaxWidth(float maxWidth);
<add> float getMinWidth();
<add> void setMinWidth(float minWidth);
<add> float getMaxHeight();
<add> void setMaxHeight(float maxHeight);
<add> float getMinHeight();
<add> void setMinHeight(float minHeight);
<ide> float getLayoutX();
<ide> float getLayoutY();
<ide> float getLayoutWidth();
<ide><path>ReactAndroid/src/main/java/com/facebook/csslayout/CSSNodeDEPRECATED.java
<ide> public void setPosition(int spacingType, float position) {
<ide> * Get this node's width, as defined in the style.
<ide> */
<ide> @Override
<del> public float getStyleWidth() {
<add> public float getWidth() {
<ide> return style.dimensions[DIMENSION_WIDTH];
<ide> }
<ide>
<ide> @Override
<del> public void setStyleWidth(float width) {
<add> public void setWidth(float width) {
<ide> if (!valuesEqual(style.dimensions[DIMENSION_WIDTH], width)) {
<ide> style.dimensions[DIMENSION_WIDTH] = width;
<ide> dirty();
<ide> public void setStyleWidth(float width) {
<ide> * Get this node's height, as defined in the style.
<ide> */
<ide> @Override
<del> public float getStyleHeight() {
<add> public float getHeight() {
<ide> return style.dimensions[DIMENSION_HEIGHT];
<ide> }
<ide>
<ide> @Override
<del> public void setStyleHeight(float height) {
<add> public void setHeight(float height) {
<ide> if (!valuesEqual(style.dimensions[DIMENSION_HEIGHT], height)) {
<ide> style.dimensions[DIMENSION_HEIGHT] = height;
<ide> dirty();
<ide> public void setStyleHeight(float height) {
<ide> * Get this node's max width, as defined in the style
<ide> */
<ide> @Override
<del> public float getStyleMaxWidth() {
<add> public float getMaxWidth() {
<ide> return style.maxWidth;
<ide> }
<ide>
<ide> @Override
<del> public void setStyleMaxWidth(float maxWidth) {
<add> public void setMaxWidth(float maxWidth) {
<ide> if (!valuesEqual(style.maxWidth, maxWidth)) {
<ide> style.maxWidth = maxWidth;
<ide> dirty();
<ide> public void setStyleMaxWidth(float maxWidth) {
<ide> * Get this node's min width, as defined in the style
<ide> */
<ide> @Override
<del> public float getStyleMinWidth() {
<add> public float getMinWidth() {
<ide> return style.minWidth;
<ide> }
<ide>
<ide> @Override
<del> public void setStyleMinWidth(float minWidth) {
<add> public void setMinWidth(float minWidth) {
<ide> if (!valuesEqual(style.minWidth, minWidth)) {
<ide> style.minWidth = minWidth;
<ide> dirty();
<ide> public void setStyleMinWidth(float minWidth) {
<ide> * Get this node's max height, as defined in the style
<ide> */
<ide> @Override
<del> public float getStyleMaxHeight() {
<add> public float getMaxHeight() {
<ide> return style.maxHeight;
<ide> }
<ide>
<ide> @Override
<del> public void setStyleMaxHeight(float maxHeight) {
<add> public void setMaxHeight(float maxHeight) {
<ide> if (!valuesEqual(style.maxHeight, maxHeight)) {
<ide> style.maxHeight = maxHeight;
<ide> dirty();
<ide> public void setStyleMaxHeight(float maxHeight) {
<ide> * Get this node's min height, as defined in the style
<ide> */
<ide> @Override
<del> public float getStyleMinHeight() {
<add> public float getMinHeight() {
<ide> return style.minHeight;
<ide> }
<ide>
<ide> @Override
<del> public void setStyleMinHeight(float minHeight) {
<add> public void setMinHeight(float minHeight) {
<ide> if (!valuesEqual(style.minHeight, minHeight)) {
<ide> style.minHeight = minHeight;
<ide> dirty();
<ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java
<ide> public void setLayoutDirection(CSSDirection direction) {
<ide> }
<ide>
<ide> public final float getStyleWidth() {
<del> return mCSSNode.getStyleWidth();
<add> return mCSSNode.getWidth();
<ide> }
<ide>
<ide> public void setStyleWidth(float widthPx) {
<del> mCSSNode.setStyleWidth(widthPx);
<add> mCSSNode.setWidth(widthPx);
<ide> }
<ide>
<ide> public void setStyleMinWidth(float widthPx) {
<del> mCSSNode.setStyleMinWidth(widthPx);
<add> mCSSNode.setMinWidth(widthPx);
<ide> }
<ide>
<ide> public void setStyleMaxWidth(float widthPx) {
<del> mCSSNode.setStyleMaxWidth(widthPx);
<add> mCSSNode.setMaxWidth(widthPx);
<ide> }
<ide>
<ide> public final float getStyleHeight() {
<del> return mCSSNode.getStyleHeight();
<add> return mCSSNode.getHeight();
<ide> }
<ide>
<ide> public void setStyleHeight(float heightPx) {
<del> mCSSNode.setStyleHeight(heightPx);
<add> mCSSNode.setHeight(heightPx);
<ide> }
<ide>
<ide> public void setStyleMinHeight(float widthPx) {
<del> mCSSNode.setStyleMinHeight(widthPx);
<add> mCSSNode.setMinHeight(widthPx);
<ide> }
<ide>
<ide> public void setStyleMaxHeight(float widthPx) {
<del> mCSSNode.setStyleMaxHeight(widthPx);
<add> mCSSNode.setMaxHeight(widthPx);
<ide> }
<ide>
<ide> public void setFlex(float flex) {
<ide> public void setFlexBasis(float flexBasis) {
<ide> }
<ide>
<ide> public void setStyleAspectRatio(float aspectRatio) {
<del> mCSSNode.setStyleAspectRatio(aspectRatio);
<add> mCSSNode.setAspectRatio(aspectRatio);
<ide> }
<ide>
<ide> public void setFlexDirection(CSSFlexDirection flexDirection) { | 4 |
Javascript | Javascript | remove some debug leftover | c663d181f907ba20304bf59857bd5af032386926 | <ide><path>PDFFont.js
<ide>
<del>var Font = new Dict();
<add>/*
<add> * This dictionary hold the decoded fonts
<add> */
<add>var Fonts = new Dict();
<ide>
<ide> var Type1Parser = function(aAsciiStream, aBinaryStream) {
<ide> var lexer = new Lexer(aAsciiStream);
<ide>
<ide> // Turn on this flag for additional debugging logs
<del> var debug = true;
<add> var debug = false;
<ide>
<ide> var dump = function(aData) {
<ide> if (debug)
<ide> var Type1Parser = function(aAsciiStream, aBinaryStream) {
<ide> break;
<ide>
<ide> case "dup":
<del> //log("duplicate: " + operandStack.peek());
<add> dump("duplicate: " + operandStack.peek());
<ide> operandStack.push(operandStack.peek());
<ide> break;
<ide>
<ide> var Type1Parser = function(aAsciiStream, aBinaryStream) {
<ide> case "get":
<ide> var indexOrKey = operandStack.pop();
<ide> var object = operandStack.pop();
<del> log("==============");
<del> operandStack.toString();
<del> log(dictionaryStack.__innerStack__);
<del> log(object + "::" + indexOrKey);
<ide> var data = object.get ? object.get(indexOrKey) : object[indexOrKey];
<ide> dump("get " + obj + "[" + indexOrKey + "]: " + data);
<ide> operandStack.push(data);
<ide> var Type1Parser = function(aAsciiStream, aBinaryStream) {
<ide> var font = operandStack.pop();
<ide> var key = operandStack.pop();
<ide> dump("definefont " + font + " with key: " + key);
<del> Font.set(key, font);
<add> Fonts.set(key, font);
<ide> break;
<ide>
<ide> case "known":
<ide> var Type1Parser = function(aAsciiStream, aBinaryStream) {
<ide>
<ide> return parseNext();
<ide> } else if (obj){
<del> log (obj);
<add> dump("unknow: " + obj);
<ide> operandStack.push(obj);
<ide> return parseNext();
<ide> } | 1 |
Text | Text | add redux-optimist and group it with redux-undo | cdde305e332c632854a0ec542b88b6cdfa816b09 | <ide><path>docs/introduction/Ecosystem.md
<ide> On this page we will only feature a few of them that the Redux maintainers have
<ide> * [redux-batched-subscribe](https://github.com/tappleby/redux-batched-subscribe) — Customize batching and debouncing calls to the store subscribers
<ide> * [redux-history-transitions](https://github.com/johanneslumpe/redux-history-transitions) — History transitions based on arbitrary actions
<ide>
<add>## Reducer Enhancers
<add>
<add>* [redux-optimist](https://github.com/ForbesLindesay/redux-optimist) — Optimistically apply actions that can be later commited or reverted
<add>* [redux-undo](https://github.com/omnidan/redux-undo) — Effortless undo/redo and action history for your reducers
<add>
<ide> ## Utilities
<ide>
<ide> * [reselect](https://github.com/faassen/reselect) — Efficient derived data selectors inspired by NuclearJS
<ide> * [normalizr](https://github.com/gaearon/normalizr) — Normalize nested API responses for easier consumption by the reducers
<ide> * [redux-actions](https://github.com/acdlite/redux-actions) — Reduces the boilerplate in writing reducers and action creators
<ide> * [redux-transducers](https://github.com/acdlite/redux-transducers) — Transducer utilities for Redux
<ide> * [redux-immutablejs](https://github.com/indexiatech/redux-immutablejs) — Integration tools between Redux and [Immutable](https://github.com/facebook/immutable-js/)
<del>* [redux-undo](https://github.com/omnidan/redux-undo) — Effortless undo/redo and action history for your reducers
<ide> * [redux-tcomb](https://github.com/gcanti/redux-tcomb) — Immutable and type-checked state and actions for Redux
<ide>
<ide> ## Developer Tools | 1 |
Ruby | Ruby | detect versions in tag specs | 033ef09518f5da1fdb56adb4cb90abd30e7223a6 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_specs
<ide> problem "Invalid or missing #{spec} version"
<ide> else
<ide> version_text = s.version unless s.version.detected_from_url?
<del> version_url = Version.parse(s.url)
<add> version_url = Version.detect(s.url, s.specs)
<ide> if version_url.to_s == version_text.to_s && s.version.instance_of?(Version)
<ide> problem "#{spec} version #{version_text} is redundant with version scanned from URL"
<ide> end
<ide><path>Library/Homebrew/formula_support.rb
<ide> def verify_download_integrity fn
<ide> raise e
<ide> end
<ide>
<add> def detect_version(val)
<add> case val
<add> when nil then Version.detect(url, specs)
<add> when String then Version.new(val)
<add> when Hash then Version.new_with_scheme(*val.shift)
<add> end
<add> end
<add>
<ide> # The methods that follow are used in the block-form DSL spec methods
<ide> Checksum::TYPES.each do |cksum|
<ide> class_eval <<-EOS, __FILE__, __LINE__ + 1
<ide> def url val=nil, specs={}
<ide> end
<ide>
<ide> def version val=nil
<del> @version ||=
<del> case val
<del> when nil then Version.parse(@url)
<del> when Hash then Version.new_with_scheme(*val.shift)
<del> else Version.new(val)
<del> end
<add> @version ||= detect_version(val)
<ide> end
<ide>
<ide> def mirror val
<ide><path>Library/Homebrew/test/test_software_spec.rb
<ide> def test_version_with_scheme
<ide> assert_instance_of scheme, @spec.version
<ide> end
<ide>
<add> def test_version_from_tag
<add> @spec.url('http://foo.com/bar-1.0.tar.gz', :tag => 'v1.0.2')
<add> assert_version_equal '1.0.2', @spec.version
<add> assert @spec.version.detected_from_url?
<add> end
<add>
<ide> def test_mirrors
<ide> assert_empty @spec.mirrors
<ide> @spec.mirror('foo')
<ide><path>Library/Homebrew/version.rb
<ide> def self.new_with_scheme(value, scheme)
<ide> end
<ide> end
<ide>
<add> def self.detect(url, specs={})
<add> if specs.has_key?(:tag)
<add> new(specs[:tag][/((?:\d+\.)*\d+)/, 1], true)
<add> else
<add> parse(url)
<add> end
<add> end
<add>
<ide> def initialize(val, detected=false)
<ide> @version = val.to_s
<ide> @detected_from_url = detected | 4 |
Python | Python | fix cyclic import (again) | 64b733396cb6465713ca514e6dd4ac65ff473160 | <ide><path>glances/__init__.py
<ide>
<ide> # Import Glances libs
<ide> # Note: others Glances libs will be imported optionally
<del>from glances.core.glances_globals import gettext_domain, locale_dir, logger
<add>from glances.core.glances_globals import gettext_domain, locale_dir
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_main import GlancesMain
<ide>
<ide> # Get PSutil version
<ide><path>glances/core/glances_autodiscover.py
<ide> zeroconf_tag = False
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import appname, logger
<add>from glances.core.glances_globals import appname
<add>from glances.core.glances_logging import logger
<ide>
<ide> # Zeroconf 0.16 or higher is needed
<ide> if zeroconf_tag:
<ide><path>glances/core/glances_client.py
<ide> import httplib
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger, version
<add>from glances.core.glances_globals import version
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_stats import GlancesStatsClient
<ide> from glances.outputs.glances_curses import GlancesCursesClient
<ide>
<ide><path>glances/core/glances_client_browser.py
<ide> from xmlrpclib import ServerProxy, Fault, ProtocolError
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger
<del>from glances.outputs.glances_curses import GlancesCursesBrowser
<ide> from glances.core.glances_autodiscover import GlancesAutoDiscoverServer
<ide> from glances.core.glances_client import GlancesClient, GlancesClientTransport
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_staticlist import GlancesStaticServer
<add>from glances.outputs.glances_curses import GlancesCursesBrowser
<ide>
<ide>
<ide> class GlancesClientBrowser(object):
<ide><path>glances/core/glances_config.py
<ide> is_mac,
<ide> is_py3,
<ide> is_windows,
<del> logger,
<ide> sys_prefix,
<ide> work_path
<ide> )
<add>from glances.core.glances_logging import logger
<ide>
<ide>
<ide> class Config(object):
<ide><path>glances/core/glances_globals.py
<ide> import os
<ide> import sys
<ide>
<del>from glances.core.glances_logging import glances_logger
<del>
<ide> # Global information
<ide> appname = 'glances'
<ide> version = __import__('glances').__version__
<ide> def get_locale_path(paths):
<ide> user_i18n_path = os.path.join(os.path.expanduser('~/.local'), 'share', 'locale')
<ide> sys_i18n_path = os.path.join(sys_prefix, 'share', 'locale')
<ide> locale_dir = get_locale_path([i18n_path, user_i18n_path, sys_i18n_path])
<del>
<del># Create and init the logging instance
<del>logger = glances_logger()
<ide><path>glances/core/glances_logging.py
<ide> def glances_logger():
<ide> level=logging.DEBUG,
<ide> format='%(asctime)s -- %(levelname)s -- %(message)s')
<ide> return _logger
<add>
<add>logger = glances_logger()
<ide><path>glances/core/glances_main.py
<ide>
<ide> # Import Glances libs
<ide> from glances.core.glances_config import Config
<del>from glances.core.glances_globals import appname, is_windows, logger, psutil_version, version
<add>from glances.core.glances_globals import appname, is_windows, psutil_version, version
<add>from glances.core.glances_logging import logger
<ide>
<ide>
<ide> class GlancesMain(object):
<ide><path>glances/core/glances_monitor_list.py
<ide> import subprocess
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_processes import glances_processes
<ide>
<ide>
<ide><path>glances/core/glances_password.py
<ide> import uuid
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import (
<del> appname,
<del> is_bsd,
<del> is_linux,
<del> is_mac,
<del> is_windows,
<del> logger
<del>)
<add>from glances.core.glances_globals import appname, is_bsd, is_linux, is_mac, is_windows
<add>from glances.core.glances_logging import logger
<ide>
<ide> # Trick: bind raw_input to input in Python 2
<ide> try:
<ide><path>glances/core/glances_processes.py
<ide> import psutil
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import is_bsd, is_linux, is_mac, is_windows, logger
<add>from glances.core.glances_globals import is_bsd, is_linux, is_mac, is_windows
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_timer import getTimeSinceLastUpdate, Timer
<ide>
<ide>
<ide><path>glances/core/glances_server.py
<ide> from SimpleXMLRPCServer import SimpleXMLRPCServer
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger, version
<add>from glances.core.glances_autodiscover import GlancesAutoDiscoverClient
<add>from glances.core.glances_globals import version
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_stats import GlancesStatsServer
<ide> from glances.core.glances_timer import Timer
<del>from glances.core.glances_autodiscover import GlancesAutoDiscoverClient
<ide>
<ide>
<ide> class GlancesXMLRPCHandler(SimpleXMLRPCRequestHandler):
<ide><path>glances/core/glances_snmp.py
<ide> import sys
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide>
<ide> # Import mandatory PySNMP lib
<ide> try:
<ide><path>glances/core/glances_standalone.py
<ide> """Manage the Glances standalone session."""
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import is_windows, logger
<add>from glances.core.glances_globals import is_windows
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_processes import glances_processes
<ide> from glances.core.glances_stats import GlancesStats
<ide> from glances.outputs.glances_curses import GlancesCursesStandalone
<ide><path>glances/core/glances_staticlist.py
<ide> from socket import gaierror, gethostbyname
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide>
<ide>
<ide> class GlancesStaticServer(object):
<ide><path>glances/core/glances_stats.py
<ide> import re
<ide> import sys
<ide>
<del>from glances.core.glances_globals import logger, plugins_path, sys_path
<add>from glances.core.glances_globals import plugins_path, sys_path
<add>from glances.core.glances_logging import logger
<ide>
<ide> # SNMP OID regexp pattern to short system name dict
<ide> oid_to_short_system_name = {'.*Linux.*': 'linux',
<ide><path>glances/outputs/glances_bottle.py
<ide> import sys
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide>
<ide> # Import mandatory Bottle lib
<ide> try:
<ide> from bottle import Bottle, template, static_file, TEMPLATE_PATH, abort, response
<ide> except ImportError:
<ide> logger.critical('Bottle module not found. Glances cannot start in web server mode.')
<del> print(_("Install it using pip: # pip install bottle"))
<ide> sys.exit(2)
<ide>
<ide>
<ide><path>glances/outputs/glances_colorconsole.py
<ide>
<ide> import msvcrt
<ide>
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide>
<ide> try:
<ide> import colorconsole
<ide><path>glances/outputs/glances_csv.py
<ide> import sys
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import is_py3, logger
<add>from glances.core.glances_globals import is_py3
<add>from glances.core.glances_logging import logger
<ide>
<ide> # List of stats enabled in the CSV output
<ide> csv_stats_list = ['cpu', 'load', 'mem', 'memswap']
<ide><path>glances/outputs/glances_curses.py
<ide> import sys
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import is_mac, is_windows, logger
<add>from glances.core.glances_globals import is_mac, is_windows
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_logs import glances_logs
<ide> from glances.core.glances_processes import glances_processes
<ide> from glances.core.glances_timer import Timer
<ide><path>glances/outputs/glances_history.py
<ide> import os
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide>
<ide> # Import specific lib
<ide> try:
<ide><path>glances/plugins/glances_batpercent.py
<ide> """Battery plugin."""
<ide>
<ide> # Import Glances libs
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide> from glances.plugins.glances_plugin import GlancesPlugin
<ide>
<ide> # Batinfo library (optional; Linux-only)
<ide><path>glances/plugins/glances_monitor.py
<ide> """Monitor plugin."""
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import logger
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_monitor_list import MonitorList as glancesMonitorList
<ide> from glances.plugins.glances_plugin import GlancesPlugin
<ide>
<ide><path>glances/plugins/glances_plugin.py
<ide> from operator import itemgetter
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import is_py3, logger
<add>from glances.core.glances_globals import is_py3
<add>from glances.core.glances_logging import logger
<ide> from glances.core.glances_logs import glances_logs
<ide>
<ide>
<ide><path>glances/plugins/glances_sensors.py
<ide> pass
<ide>
<ide> # Import Glances lib
<del>from glances.core.glances_globals import is_py3, logger
<add>from glances.core.glances_globals import is_py3
<add>from glances.core.glances_logging import logger
<ide> from glances.plugins.glances_batpercent import Plugin as BatPercentPlugin
<ide> from glances.plugins.glances_hddtemp import Plugin as HddTempPlugin
<ide> from glances.plugins.glances_plugin import GlancesPlugin | 25 |
PHP | PHP | resolve paginators from the container | 85fed0e37227f4fe85c362e7535455e461d0757b | <ide><path>src/Illuminate/Database/Concerns/BuildsQueries.php
<ide>
<ide> namespace Illuminate\Database\Concerns;
<ide>
<add>use Illuminate\Container\Container;
<add>use Illuminate\Pagination\Paginator;
<add>use Illuminate\Pagination\LengthAwarePaginator;
<add>
<ide> trait BuildsQueries
<ide> {
<ide> /**
<ide> public function when($value, $callback, $default = null)
<ide>
<ide> return $this;
<ide> }
<add>
<add> /**
<add> * Create a new length-aware paginator instance.
<add> *
<add> * @param \Illuminate\Support\Collection $items
<add> * @param int $total
<add> * @param int $perPage
<add> * @param int $currentPage
<add> * @param array $options
<add> * @return \Illuminate\Pagination\LengthAwarePaginator
<add> */
<add> protected function paginator($items, $total, $perPage, $currentPage, $options)
<add> {
<add> return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact(
<add> 'items', 'total', 'perPage', 'currentPage', 'options'
<add> ));
<add> }
<add>
<add> /**
<add> * Create a new simple paginator instance.
<add> *
<add> * @param \Illuminate\Support\Collection $items
<add> * @param int $total
<add> * @param int $perPage
<add> * @param int $currentPage
<add> * @param array $options
<add> * @return \Illuminate\Pagination\Paginator
<add> */
<add> protected function simplePaginator($items, $perPage, $currentPage, $options)
<add> {
<add> return Container::getInstance()->makeWith(Paginator::class, compact(
<add> 'items', 'perPage', 'currentPage', 'options'
<add> ));
<add> }
<ide> }
<ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> use Illuminate\Pagination\Paginator;
<ide> use Illuminate\Contracts\Support\Arrayable;
<ide> use Illuminate\Database\Concerns\BuildsQueries;
<del>use Illuminate\Pagination\LengthAwarePaginator;
<ide> use Illuminate\Database\Eloquent\Relations\Relation;
<ide> use Illuminate\Database\Query\Builder as QueryBuilder;
<ide>
<ide> public function paginate($perPage = null, $columns = ['*'], $pageName = 'page',
<ide> ? $this->forPage($page, $perPage)->get($columns)
<ide> : $this->model->newCollection();
<ide>
<del> return new LengthAwarePaginator($results, $total, $perPage, $page, [
<add> return $this->paginator($results, $total, $perPage, $page, [
<ide> 'path' => Paginator::resolveCurrentPath(),
<ide> 'pageName' => $pageName,
<ide> ]);
<ide> public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'p
<ide> // paginator instances for these results with the given page and per page.
<ide> $this->skip(($page - 1) * $perPage)->take($perPage + 1);
<ide>
<del> return new Paginator($this->get($columns), $perPage, $page, [
<add> return $this->simplePaginator($this->get($columns), $perPage, $page, [
<ide> 'path' => Paginator::resolveCurrentPath(),
<ide> 'pageName' => $pageName,
<ide> ]);
<ide><path>src/Illuminate/Database/Query/Builder.php
<ide> use Illuminate\Database\ConnectionInterface;
<ide> use Illuminate\Database\Concerns\BuildsQueries;
<ide> use Illuminate\Database\Query\Grammars\Grammar;
<del>use Illuminate\Pagination\LengthAwarePaginator;
<ide> use Illuminate\Database\Query\Processors\Processor;
<ide>
<ide> class Builder
<ide> public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $p
<ide>
<ide> $results = $total ? $this->forPage($page, $perPage)->get($columns) : collect();
<ide>
<del> return new LengthAwarePaginator($results, $total, $perPage, $page, [
<add> return $this->paginator($results, $total, $perPage, $page, [
<ide> 'path' => Paginator::resolveCurrentPath(),
<ide> 'pageName' => $pageName,
<ide> ]);
<ide> public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'pag
<ide>
<ide> $this->skip(($page - 1) * $perPage)->take($perPage + 1);
<ide>
<del> return new Paginator($this->get($columns), $perPage, $page, [
<add> return $this->simplePaginator($this->get($columns), $perPage, $page, [
<ide> 'path' => Paginator::resolveCurrentPath(),
<ide> 'pageName' => $pageName,
<ide> ]); | 3 |
Python | Python | fix broken url naming in examples | a8980892c47677f159499f7711cf812907dfaa47 | <ide><path>examples/resourceexample/urls.py
<ide> from resourceexample.views import ExampleView, AnotherExampleView
<ide>
<ide> urlpatterns = patterns('',
<del> url(r'^$', ExampleView.as_view(), name='example'),
<add> url(r'^$', ExampleView.as_view(), name='example-resource'),
<ide> url(r'^(?P<num>[0-9]+)/$', AnotherExampleView.as_view(), name='another-example'),
<ide> ) | 1 |
Go | Go | fix docker cp dir with hard link | d58ffa0364c04d03a8f25704d7f0489ee6cd9634 | <ide><path>pkg/archive/copy.go
<ide> func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.Read
<ide> }
<ide>
<ide> hdr.Name = strings.Replace(hdr.Name, oldBase, newBase, 1)
<add> if hdr.Typeflag == tar.TypeLink {
<add> hdr.Linkname = strings.Replace(hdr.Linkname, oldBase, newBase, 1)
<add> }
<ide>
<ide> if err = rebasedTar.WriteHeader(hdr); err != nil {
<ide> w.CloseWithError(err) | 1 |
Python | Python | create lookups if not passed in | fde4f8ac8e5f9678b8fe39efac2d94c5304dca54 | <ide><path>spacy/language.py
<ide> class BaseDefaults(object):
<ide> @classmethod
<ide> def create_lemmatizer(cls, nlp=None, lookups=None):
<add> if lookups is None:
<add> lookups = cls.create_lookups(nlp=nlp)
<ide> lemma_rules, lemma_index, lemma_exc, lemma_lookup = util.get_lemma_tables(lookups)
<ide> return Lemmatizer(lemma_index, lemma_exc, lemma_rules, lemma_lookup)
<ide> | 1 |
Mixed | Go | use newer default values for mounts cli | 56f3422468a0b43da7bae7a01762ce4f0a92d9ff | <ide><path>api/client/service/opts.go
<ide> func (m *MountOpt) Set(value string) error {
<ide> }
<ide> }
<ide>
<add> // Set writable as the default
<ide> for _, field := range fields {
<ide> parts := strings.SplitN(field, "=", 2)
<del> if len(parts) == 1 && strings.ToLower(parts[0]) == "writable" {
<del> mount.Writable = true
<add> if len(parts) == 1 && strings.ToLower(parts[0]) == "readonly" {
<add> mount.ReadOnly = true
<add> continue
<add> }
<add>
<add> if len(parts) == 1 && strings.ToLower(parts[0]) == "volume-nocopy" {
<add> volumeOptions().NoCopy = true
<ide> continue
<ide> }
<ide>
<ide> func (m *MountOpt) Set(value string) error {
<ide> mount.Source = value
<ide> case "target":
<ide> mount.Target = value
<del> case "writable":
<del> mount.Writable, err = strconv.ParseBool(value)
<add> case "readonly":
<add> ro, err := strconv.ParseBool(value)
<ide> if err != nil {
<del> return fmt.Errorf("invalid value for writable: %s", value)
<add> return fmt.Errorf("invalid value for readonly: %s", value)
<ide> }
<add> mount.ReadOnly = ro
<ide> case "bind-propagation":
<ide> bindOptions().Propagation = swarm.MountPropagation(strings.ToUpper(value))
<del> case "volume-populate":
<del> volumeOptions().Populate, err = strconv.ParseBool(value)
<add> case "volume-nocopy":
<add> volumeOptions().NoCopy, err = strconv.ParseBool(value)
<ide> if err != nil {
<ide> return fmt.Errorf("invalid value for populate: %s", value)
<ide> }
<ide> func (m *MountOpt) Set(value string) error {
<ide> return fmt.Errorf("target is required")
<ide> }
<ide>
<add> if mount.VolumeOptions != nil && mount.Source == "" {
<add> return fmt.Errorf("source is required when specifying volume-* options")
<add> }
<add>
<add> if mount.Type == swarm.MountType("BIND") && mount.VolumeOptions != nil {
<add> return fmt.Errorf("cannot mix 'volume-*' options with mount type '%s'", swarm.MountTypeBind)
<add> }
<add> if mount.Type == swarm.MountType("VOLUME") && mount.BindOptions != nil {
<add> return fmt.Errorf("cannot mix 'bind-*' options with mount type '%s'", swarm.MountTypeVolume)
<add> }
<add>
<ide> m.values = append(m.values, mount)
<ide> return nil
<ide> }
<ide><path>api/client/service/opts_test.go
<ide> func TestMountOptSetErrorInvalidField(t *testing.T) {
<ide>
<ide> func TestMountOptSetErrorInvalidWritable(t *testing.T) {
<ide> var mount MountOpt
<del> assert.Error(t, mount.Set("type=VOLUME,writable=yes"), "invalid value for writable: yes")
<add> assert.Error(t, mount.Set("type=VOLUME,readonly=no"), "invalid value for readonly: no")
<add>}
<add>
<add>func TestMountOptDefaultEnableWritable(t *testing.T) {
<add> var m MountOpt
<add> assert.NilError(t, m.Set("type=bind,target=/foo,source=/foo"))
<add> assert.Equal(t, m.values[0].ReadOnly, false)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=bind,target=/foo,source=/foo,readonly"))
<add> assert.Equal(t, m.values[0].ReadOnly, true)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=bind,target=/foo,source=/foo,readonly=1"))
<add> assert.Equal(t, m.values[0].ReadOnly, true)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=bind,target=/foo,source=/foo,readonly=0"))
<add> assert.Equal(t, m.values[0].ReadOnly, false)
<add>}
<add>
<add>func TestMountOptVolumeNoCopy(t *testing.T) {
<add> var m MountOpt
<add> assert.Error(t, m.Set("type=volume,target=/foo,volume-nocopy"), "source is required")
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=volume,target=/foo,source=foo"))
<add> assert.Equal(t, m.values[0].VolumeOptions == nil, true)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=volume,target=/foo,source=foo,volume-nocopy=true"))
<add> assert.Equal(t, m.values[0].VolumeOptions != nil, true)
<add> assert.Equal(t, m.values[0].VolumeOptions.NoCopy, true)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=volume,target=/foo,source=foo,volume-nocopy"))
<add> assert.Equal(t, m.values[0].VolumeOptions != nil, true)
<add> assert.Equal(t, m.values[0].VolumeOptions.NoCopy, true)
<add>
<add> m = MountOpt{}
<add> assert.NilError(t, m.Set("type=volume,target=/foo,source=foo,volume-nocopy=1"))
<add> assert.Equal(t, m.values[0].VolumeOptions != nil, true)
<add> assert.Equal(t, m.values[0].VolumeOptions.NoCopy, true)
<add>}
<add>
<add>func TestMountOptTypeConflict(t *testing.T) {
<add> var m MountOpt
<add> assert.Error(t, m.Set("type=bind,target=/foo,source=/foo,volume-nocopy=true"), "cannot mix")
<add> assert.Error(t, m.Set("type=volume,target=/foo,source=/foo,bind-propagation=rprivate"), "cannot mix")
<ide> }
<ide><path>daemon/cluster/convert/container.go
<ide> func containerSpecFromGRPC(c *swarmapi.ContainerSpec) types.ContainerSpec {
<ide> Target: m.Target,
<ide> Source: m.Source,
<ide> Type: types.MountType(strings.ToLower(swarmapi.Mount_MountType_name[int32(m.Type)])),
<del> Writable: m.Writable,
<add> ReadOnly: m.ReadOnly,
<ide> }
<ide>
<ide> if m.BindOptions != nil {
<ide> func containerSpecFromGRPC(c *swarmapi.ContainerSpec) types.ContainerSpec {
<ide>
<ide> if m.VolumeOptions != nil {
<ide> mount.VolumeOptions = &types.VolumeOptions{
<del> Populate: m.VolumeOptions.Populate,
<del> Labels: m.VolumeOptions.Labels,
<add> NoCopy: m.VolumeOptions.NoCopy,
<add> Labels: m.VolumeOptions.Labels,
<ide> }
<ide> if m.VolumeOptions.DriverConfig != nil {
<ide> mount.VolumeOptions.DriverConfig = &types.Driver{
<ide> func containerToGRPC(c types.ContainerSpec) (*swarmapi.ContainerSpec, error) {
<ide> mount := swarmapi.Mount{
<ide> Target: m.Target,
<ide> Source: m.Source,
<del> Writable: m.Writable,
<add> ReadOnly: m.ReadOnly,
<ide> }
<ide>
<ide> if mountType, ok := swarmapi.Mount_MountType_value[strings.ToUpper(string(m.Type))]; ok {
<ide> func containerToGRPC(c types.ContainerSpec) (*swarmapi.ContainerSpec, error) {
<ide>
<ide> if m.VolumeOptions != nil {
<ide> mount.VolumeOptions = &swarmapi.Mount_VolumeOptions{
<del> Populate: m.VolumeOptions.Populate,
<del> Labels: m.VolumeOptions.Labels,
<add> NoCopy: m.VolumeOptions.NoCopy,
<add> Labels: m.VolumeOptions.Labels,
<ide> }
<ide> if m.VolumeOptions.DriverConfig != nil {
<ide> mount.VolumeOptions.DriverConfig = &swarmapi.Driver{
<ide><path>daemon/cluster/executor/container/container.go
<ide> func (c *containerConfig) bindMounts() []string {
<ide> var r []string
<ide>
<ide> for _, val := range c.spec().Mounts {
<del> mask := getMountMask(&val)
<ide> if val.Type == api.MountTypeBind || (val.Type == api.MountTypeVolume && val.Source != "") {
<del> r = append(r, fmt.Sprintf("%s:%s:%s", val.Source, val.Target, mask))
<add> mask := getMountMask(&val)
<add> spec := fmt.Sprintf("%s:%s", val.Source, val.Target)
<add> if mask != "" {
<add> spec = fmt.Sprintf("%s:%s", spec, mask)
<add> }
<add> r = append(r, spec)
<ide> }
<ide> }
<ide>
<ide> return r
<ide> }
<ide>
<ide> func getMountMask(m *api.Mount) string {
<del> maskOpts := []string{"ro"}
<del> if m.Writable {
<del> maskOpts[0] = "rw"
<add> var maskOpts []string
<add> if m.ReadOnly {
<add> maskOpts = append(maskOpts, "ro")
<ide> }
<ide>
<ide> if m.BindOptions != nil {
<ide> func getMountMask(m *api.Mount) string {
<ide> }
<ide>
<ide> if m.VolumeOptions != nil {
<del> if !m.VolumeOptions.Populate {
<add> if m.VolumeOptions.NoCopy {
<ide> maskOpts = append(maskOpts, "nocopy")
<ide> }
<ide> }
<ide><path>docs/reference/api/docker_remote_api_v1.24.md
<ide> JSON Parameters:
<ide> - **Target** – Container path.
<ide> - **Source** – Mount source (e.g. a volume name, a host path).
<ide> - **Type** – The mount type (`bind`, or `volume`).
<del> - **Writable** – A boolean indicating whether the mount should be writable.
<add> - **ReadOnly** – A boolean indicating whether the mount should be read-only.
<ide> - **BindOptions** - Optional configuration for the `bind` type.
<ide> - **Propagation** – A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
<ide> - **VolumeOptions** – Optional configuration for the `volume` type.
<del> - **Populate** – A boolean indicating if volume should be
<add> - **NoCopy** – A boolean indicating if volume should be
<ide> populated with the data from the target. (Default false)
<ide> - **Labels** – User-defined name and labels for the volume.
<ide> - **DriverConfig** – Map of driver-specific options.
<ide> Update the service `id`.
<ide> - **Target** – Container path.
<ide> - **Source** – Mount source (e.g. a volume name, a host path).
<ide> - **Type** – The mount type (`bind`, or `volume`).
<del> - **Writable** – A boolean indicating whether the mount should be writable.
<add> - **ReadOnly** – A boolean indicating whether the mount should be read-only.
<ide> - **BindOptions** - Optional configuration for the `bind` type
<ide> - **Propagation** – A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
<ide> - **VolumeOptions** – Optional configuration for the `volume` type.
<del> - **Populate** – A boolean indicating if volume should be populated with the data from the target. (Default false)
<add> - **NoCopy** – A boolean indicating if volume should be
<add> populated with the data from the target. (Default false)
<ide> - **Labels** – User-defined name and labels for the volume.
<ide> - **DriverConfig** – Map of driver-specific options.
<ide> - **Name** - Name of the driver to use to create the volume
<ide><path>docs/reference/api/docker_remote_api_v1.25.md
<ide> JSON Parameters:
<ide> - **Target** – Container path.
<ide> - **Source** – Mount source (e.g. a volume name, a host path).
<ide> - **Type** – The mount type (`bind`, or `volume`).
<del> - **Writable** – A boolean indicating whether the mount should be writable.
<add> - **ReadOnly** – A boolean indicating whether the mount should be read-only.
<ide> - **BindOptions** - Optional configuration for the `bind` type.
<ide> - **Propagation** – A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
<ide> - **VolumeOptions** – Optional configuration for the `volume` type.
<del> - **Populate** – A boolean indicating if volume should be
<add> - **NoCopy** – A boolean indicating if volume should be
<ide> populated with the data from the target. (Default false)
<ide> - **Labels** – User-defined name and labels for the volume.
<ide> - **DriverConfig** – Map of driver-specific options.
<ide> Update the service `id`.
<ide> - **Target** – Container path.
<ide> - **Source** – Mount source (e.g. a volume name, a host path).
<ide> - **Type** – The mount type (`bind`, or `volume`).
<del> - **Writable** – A boolean indicating whether the mount should be writable.
<add> - **ReadOnly** – A boolean indicating whether the mount should be read-only.
<ide> - **BindOptions** - Optional configuration for the `bind` type
<ide> - **Propagation** – A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
<ide> - **VolumeOptions** – Optional configuration for the `volume` type.
<del> - **Populate** – A boolean indicating if volume should be populated with the data from the target. (Default false)
<add> - **NoCopy** – A boolean indicating if volume should be
<add> populated with the data from the target. (Default false)
<ide> - **Labels** – User-defined name and labels for the volume.
<ide> - **DriverConfig** – Map of driver-specific options.
<ide> - **Name** - Name of the driver to use to create the volume
<ide><path>integration-cli/docker_cli_service_create_hack_test.go
<ide> func (s *DockerSwarmSuite) TestServiceCreateMountVolume(c *check.C) {
<ide>
<ide> c.Assert(mounts[0].Name, checker.Equals, "foo")
<ide> c.Assert(mounts[0].Destination, checker.Equals, "/foo")
<del> c.Assert(mounts[0].RW, checker.Equals, false)
<add> c.Assert(mounts[0].RW, checker.Equals, true)
<ide> }
<ide><path>pkg/testutil/assert/assert.go
<ide> package assert
<ide>
<ide> import (
<add> "fmt"
<add> "path/filepath"
<add> "runtime"
<ide> "strings"
<ide> )
<ide>
<ide> type TestingT interface {
<ide> // they are not equal.
<ide> func Equal(t TestingT, actual, expected interface{}) {
<ide> if expected != actual {
<del> t.Fatalf("Expected '%v' (%T) got '%v' (%T)", expected, expected, actual, actual)
<add> fatal(t, fmt.Sprintf("Expected '%v' (%T) got '%v' (%T)", expected, expected, actual, actual))
<ide> }
<ide> }
<ide>
<ide> func EqualStringSlice(t TestingT, actual, expected []string) {
<ide> // NilError asserts that the error is nil, otherwise it fails the test.
<ide> func NilError(t TestingT, err error) {
<ide> if err != nil {
<del> t.Fatalf("Expected no error, got: %s", err.Error())
<add> fatal(t, fmt.Sprintf("Expected no error, got: %s", err.Error()))
<ide> }
<ide> }
<ide>
<ide> // Error asserts that error is not nil, and contains the expected text,
<ide> // otherwise it fails the test.
<ide> func Error(t TestingT, err error, contains string) {
<ide> if err == nil {
<del> t.Fatalf("Expected an error, but error was nil")
<add> fatal(t, "Expected an error, but error was nil")
<ide> }
<ide>
<ide> if !strings.Contains(err.Error(), contains) {
<del> t.Fatalf("Expected error to contain '%s', got '%s'", contains, err.Error())
<add> fatal(t, fmt.Sprintf("Expected error to contain '%s', got '%s'", contains, err.Error()))
<ide> }
<ide> }
<ide>
<ide> // Contains asserts that the string contains a substring, otherwise it fails the
<ide> // test.
<ide> func Contains(t TestingT, actual, contains string) {
<ide> if !strings.Contains(actual, contains) {
<del> t.Fatalf("Expected '%s' to contain '%s'", actual, contains)
<add> fatal(t, fmt.Sprintf("Expected '%s' to contain '%s'", actual, contains))
<ide> }
<ide> }
<add>
<add>func fatal(t TestingT, msg string) {
<add> _, file, line, _ := runtime.Caller(2)
<add> t.Fatalf("%s:%d: %s", filepath.Base(file), line, msg)
<add>} | 8 |
Javascript | Javascript | improve tty.getcolordepth coverage | ce2ed584c826f22c94f89ceb2eb60a1facbb7c95 | <ide><path>test/pseudo-tty/test-tty-get-color-depth.js
<ide> const writeStream = new WriteStream(fd);
<ide>
<ide> {
<ide> const depth = writeStream.getColorDepth();
<del>
<ide> assert.equal(typeof depth, 'number');
<ide> assert(depth >= 1 && depth <= 24);
<del>
<del> if (depth === 1) {
<del> // Terminal does not support colors, compare to a value that would.
<del> assert.notEqual(writeStream.getColorDepth({ COLORTERM: '1' }), depth);
<del> } else {
<del> // Terminal supports colors, compare to a value that would not.
<del> assert.notEqual(writeStream.getColorDepth({ TERM: 'dumb' }), depth);
<del> }
<ide> }
<ide>
<del>// Deactivate colors
<del>{
<del> const tmp = process.env.NODE_DISABLE_COLORS;
<del> process.env.NODE_DISABLE_COLORS = 1;
<del>
<del> const depth = writeStream.getColorDepth();
<add>// Check different environment variables.
<add>[
<add> [{ COLORTERM: '1' }, 4],
<add> [{ TMUX: '1' }, 8],
<add> [{ CI: '1' }, 1],
<add> [{ CI: '1', TRAVIS: '1' }, 8],
<add> [{ CI: '1', CIRCLECI: '1' }, 8],
<add> [{ CI: '1', APPVEYOR: '1' }, 8],
<add> [{ CI: '1', GITLAB_CI: '1' }, 8],
<add> [{ CI: '1', CI_NAME: 'codeship' }, 8],
<add> [{ TEAMCITY_VERSION: '1.0.0' }, 1],
<add> [{ TEAMCITY_VERSION: '9.11.0' }, 4],
<add> [{ TERM_PROGRAM: 'iTerm.app' }, 8],
<add> [{ TERM_PROGRAM: 'iTerm.app', TERM_PROGRAM_VERSION: '3.0' }, 24],
<add> [{ TERM_PROGRAM: 'iTerm.app', TERM_PROGRAM_VERSION: '2.0' }, 8],
<add> [{ TERM_PROGRAM: 'HyperTerm' }, 24],
<add> [{ TERM_PROGRAM: 'Hyper' }, 24],
<add> [{ TERM_PROGRAM: 'MacTerm' }, 24],
<add> [{ TERM_PROGRAM: 'Apple_Terminal' }, 8],
<add> [{ TERM: 'xterm-256' }, 8],
<add> [{ TERM: 'ansi' }, 4],
<add> [{ TERM: 'ANSI' }, 4],
<add> [{ TERM: 'color' }, 4],
<add> [{ TERM: 'linux' }, 4],
<add> [{ TERM: 'fail' }, 1],
<add> [{ NODE_DISABLE_COLORS: '1' }, 1],
<add> [{ TERM: 'dumb' }, 1],
<add> [{ TERM: 'dumb', COLORTERM: '1' }, 4],
<add>].forEach(([env, depth], i) => {
<add> const actual = writeStream.getColorDepth(env);
<add> assert.equal(
<add> actual,
<add> depth,
<add> `i: ${i}, expected: ${depth}, actual: ${actual}, env: ${env}`
<add> );
<add>});
<ide>
<del> assert.equal(depth, 1);
<add>// OS settings
<add>{
<add> const platform = Object.getOwnPropertyDescriptor(process, 'platform');
<add> const [ value, depth1, depth2 ] = process.platform !== 'win32' ?
<add> ['win32', 1, 4] : ['linux', 4, 1];
<ide>
<del> process.env.NODE_DISABLE_COLORS = tmp;
<add> assert.equal(writeStream.getColorDepth({}), depth1);
<add> Object.defineProperty(process, 'platform', { value });
<add> assert.equal(writeStream.getColorDepth({}), depth2);
<add> Object.defineProperty(process, 'platform', platform);
<ide> } | 1 |
Javascript | Javascript | fix wrong usage of error.preparestacktrace | 2948e96afd7fde91ec39bb5434bad93760ccfe13 | <ide><path>lib/internal/util.js
<ide> function isInsideNodeModules() {
<ide> // the perf implications should be okay.
<ide> getStructuredStack = runInNewContext(`(function() {
<ide> Error.prepareStackTrace = function(err, trace) {
<del> err.stack = trace;
<add> return trace;
<ide> };
<ide> Error.stackTraceLimit = Infinity;
<ide> | 1 |
PHP | PHP | use contract instead of email attribute directly | 45c997b569c0b3127f578087eb60b372e3605ca2 | <ide><path>src/Illuminate/Auth/MustVerifyEmail.php
<ide> public function sendEmailVerificationNotification()
<ide> {
<ide> $this->notify(new Notifications\VerifyEmail);
<ide> }
<add>
<add> /**
<add> * Get the email address to verify
<add> *
<add> * @return string
<add> */
<add> public function getEmailForVerification()
<add> {
<add> return $this->email;
<add> }
<add>
<ide> }
<ide><path>src/Illuminate/Contracts/Auth/MustVerifyEmail.php
<ide> public function markEmailAsVerified();
<ide> * @return void
<ide> */
<ide> public function sendEmailVerificationNotification();
<add>
<add> /**
<add> * Get the email address to verify
<add> *
<add> * @return string
<add> */
<add> public function getEmailForVerification();
<ide> }
<ide><path>src/Illuminate/Foundation/Auth/VerifiesEmails.php
<ide> public function verify(Request $request)
<ide> if ($request->route('id') != $request->user()->getKey()) {
<ide> throw new AuthorizationException;
<ide> }
<del> if (!hash_equals(hash('sha1', $request->user()->email), $request->route('hash'))) {
<add> if (! hash_equals(hash('sha1', $request->user()->getEmailForVerification()), $request->route('hash'))) {
<ide> throw new AuthorizationException;
<ide> }
<ide> | 3 |
Ruby | Ruby | move pjsip to the boneyard | de42ad52a545e36b0225d5d7c4c1a96c491c642b | <ide><path>Library/Homebrew/tap_migrations.rb
<ide> "octave" => "homebrew/science",
<ide> "opencv" => "homebrew/science",
<ide> "pan" => "homebrew/boneyard",
<add> "pjsip" => "homebrew/boneyard",
<ide> "pocl" => "homebrew/science",
<ide> "qfits" => "homebrew/boneyard",
<ide> "qrupdate" => "homebrew/science", | 1 |
Python | Python | add links to new modules for deprecated modules | b4770725a3aa03bd50a0a8c8e01db667bff93862 | <ide><path>airflow/contrib/hooks/aws_athena_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.athena`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.athena`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_datasync_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.datasync`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.datasync`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_dynamodb_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.dynamodb`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.dynamodb`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_firehose_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.kinesis`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.kinesis`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_glue_catalog_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.glue_catalog`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.glue_catalog`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.base_aws`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.base_aws`."""
<ide>
<ide> import warnings
<ide>
<ide>
<ide>
<ide> class AwsHook(AwsBaseHook):
<del> """This class is deprecated. Please use `airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`."""
<add> """
<add> This class is deprecated.
<add> Please use :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`.
<add> """
<ide>
<ide> def __init__(self, *args, **kwargs):
<ide> warnings.warn(
<ide><path>airflow/contrib/hooks/aws_lambda_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.lambda_function`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.hooks.lambda_function`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_logs_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.logs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.logs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_sns_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sns`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sns`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/aws_sqs_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sqs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sqs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/azure_container_instance_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.microsoft.azure.hooks.azure_container_instance`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.microsoft.azure.hooks.azure_container_instance`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/hooks/azure_container_volume_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.azure_container_volume`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.microsoft.azure.hooks.azure_container_volume`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/azure_cosmos_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.azure_cosmos`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.azure_cosmos`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/azure_data_lake_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.azure_data_lake`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.azure_data_lake`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/azure_fileshare_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.azure_fileshare`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.azure_fileshare`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/bigquery_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/cassandra_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.cassandra.hooks.cassandra`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.hooks.cassandra`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/cloudant_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.cloudant.hooks.cloudant`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.cloudant.hooks.cloudant`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/databricks_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.databricks.hooks.databricks`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.databricks.hooks.databricks`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/datadog_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.datadog.hooks.datadog`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.datadog.hooks.datadog`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/datastore_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.datastore`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.datastore`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/dingding_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.dingding.hooks.dingding`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.dingding.hooks.dingding`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/discord_webhook_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.discord.hooks.discord_webhook`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.discord.hooks.discord_webhook`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/emr_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.emr`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.emr`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/fs_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.hooks.filesystem`."""
<add>"""This module is deprecated. Please use :mod:`airflow.hooks.filesystem`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/ftp_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.ftp.hooks.ftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.ftp.hooks.ftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_api_base_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.common.hooks.base_google`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.common.hooks.base_google`."""
<ide> import warnings
<ide>
<ide> from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
<ide><path>airflow/contrib/hooks/gcp_bigtable_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.bigtable`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.bigtable`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_cloud_build_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.cloud_build`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.cloud_build`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_compute_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.compute`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.compute`."""
<ide>
<ide> import warnings
<ide>
<ide> class GceHook(ComputeEngineHook):
<ide> """
<ide> This class is deprecated.
<del> Please use ``airflow.providers.google.cloud.hooks.compute.ComputeEngineHook``.
<add> Please use :class:`airflow.providers.google.cloud.hooks.compute.ComputeEngineHook`.
<ide> """
<ide>
<ide> def __init__(self, *args, **kwargs):
<ide><path>airflow/contrib/hooks/gcp_container_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.kubernetes_engine`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.hooks.kubernetes_engine`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_dataflow_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dataflow`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dataflow`."""
<ide>
<ide> import warnings
<ide>
<ide>
<ide>
<ide> class DataFlowHook(DataflowHook):
<del> """This class is deprecated. Please use `airflow.providers.google.cloud.hooks.dataflow.DataflowHook`."""
<add> """
<add> This class is deprecated.
<add> Please use :class:`airflow.providers.google.cloud.hooks.dataflow.DataflowHook`.
<add> """
<ide>
<ide> def __init__(self, *args, **kwargs):
<ide> warnings.warn(
<ide><path>airflow/contrib/hooks/gcp_dataproc_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dataproc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dataproc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_dlp_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.dlp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.dlp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_function_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.functions`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.functions`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_kms_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.kms`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.kms`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_mlengine_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.mlengine`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.mlengine`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_natural_language_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.natural_language`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.natural_language`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_pubsub_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.pubsub`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.pubsub`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_spanner_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.spanner`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.spanner`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_speech_to_text_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.speech_to_text`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.speech_to_text`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_sql_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.cloud_sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.cloud_sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_tasks_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.tasks`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.tasks`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_text_to_speech_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.text_to_speech`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.text_to_speech`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_translate_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.translate`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.translate`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_video_intelligence_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.video_intelligence`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.video_intelligence`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcp_vision_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.vision`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.vision`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/gcs_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.hooks.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.hooks.gcs`."""
<ide> import warnings
<ide>
<ide> from airflow.providers.google.cloud.hooks.gcs import GCSHook
<ide><path>airflow/contrib/hooks/gdrive_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.suite.hooks.drive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.suite.hooks.drive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/grpc_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.grpc.hooks.grpc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.grpc.hooks.grpc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/imap_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.imap.hooks.imap`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.imap.hooks.imap`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/jenkins_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.jenkins.hooks.jenkins`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jenkins.hooks.jenkins`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/jira_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.jira.hooks.jira`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jira.hooks.jira`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/mongo_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.mongo.hooks.mongo`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.mongo.hooks.mongo`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/openfaas_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.openfaas.hooks.openfaas`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.openfaas.hooks.openfaas`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/opsgenie_alert_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.opsgenie.hooks.opsgenie_alert`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.opsgenie.hooks.opsgenie_alert`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/pagerduty_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.pagerduty.hooks.pagerduty`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.pagerduty.hooks.pagerduty`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/pinot_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.pinot.hooks.pinot`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.pinot.hooks.pinot`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/qubole_check_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.qubole.hooks.qubole_check`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.qubole.hooks.qubole_check`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/qubole_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.qubole.hooks.qubole`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.qubole.hooks.qubole`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/redis_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.redis.hooks.redis`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.redis.hooks.redis`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/redshift_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.redshift`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.redshift`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/sagemaker_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.sagemaker`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.sagemaker`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/salesforce_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.salesforce.hooks.salesforce`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.salesforce.hooks.salesforce`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/segment_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.segment.hooks.segment`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.segment.hooks.segment`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/sftp_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.sftp.hooks.sftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.sftp.hooks.sftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/slack_webhook_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.slack.hooks.slack_webhook`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.slack.hooks.slack_webhook`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/snowflake_hook.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.snowflake.hooks.snowflake`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.snowflake.hooks.snowflake`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/spark_jdbc_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_jdbc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_jdbc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/spark_sql_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/spark_submit_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.hooks.spark_submit`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.hooks.spark_submit`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/sqoop_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.sqoop.hooks.sqoop`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.sqoop.hooks.sqoop`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/ssh_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.ssh.hooks.ssh`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.ssh.hooks.ssh`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/vertica_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.vertica.hooks.vertica`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.vertica.hooks.vertica`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/wasb_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.hooks.wasb`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.hooks.wasb`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/hooks/winrm_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.winrm.hooks.winrm`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.winrm.hooks.winrm`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/adls_list_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.adls_list`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.operators.adls_list`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/adls_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.adls_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.adls_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/aws_athena_operator.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.athena`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.athena`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/aws_sqs_publish_operator.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sqs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sqs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/awsbatch_operator.py
<ide> # under the License.
<ide> #
<ide>
<del>"""This module is deprecated. Please use:
<add>"""
<add>This module is deprecated. Please use:
<ide>
<del>- `airflow.providers.amazon.aws.operators.batch`
<del>- `airflow.providers.amazon.aws.hooks.batch_client`
<del>- `airflow.providers.amazon.aws.hooks.batch_waiters``
<add>- :mod:`airflow.providers.amazon.aws.operators.batch`
<add>- :mod:`airflow.providers.amazon.aws.hooks.batch_client`
<add>- :mod:`airflow.providers.amazon.aws.hooks.batch_waiters``
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/operators/azure_cosmos_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.azure_cosmos`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.operators.azure_cosmos`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_check_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_get_data.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_table_delete_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_to_bigquery.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_bigquery`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_bigquery`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/bigquery_to_mysql_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.bigquery_to_mysql`."""
<add>"""This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.transfers.bigquery_to_mysql`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/cassandra_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.cassandra_to_gcs`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.transfers.cassandra_to_gcs`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/databricks_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.databricks.operators.databricks`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.databricks.operators.databricks`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/dataflow_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.dataflow`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dataflow`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/dataproc_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.dataproc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dataproc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/datastore_export_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.datastore`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.datastore`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/datastore_import_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.datastore`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.datastore`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/dingding_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.dingding.operators.dingding`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.dingding.operators.dingding`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/discord_webhook_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.discord.operators.discord_webhook`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.discord.operators.discord_webhook`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/docker_swarm_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.docker.operators.docker_swarm`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.docker.operators.docker_swarm`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/druid_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.druid.operators.druid`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.druid.operators.druid`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/dynamodb_to_s3.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.dynamodb_to_s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.dynamodb_to_s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/ecs_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.ecs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.ecs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/emr_add_steps_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr_add_steps`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.emr_add_steps`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/emr_create_job_flow_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr_create_job_flow`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.emr_create_job_flow`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/emr_terminate_job_flow_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.emr_terminate_job_flow`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.operators.emr_terminate_job_flow`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/file_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.local_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.local_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/file_to_wasb.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.transfers.file_to_wasb`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.microsoft.azure.transfers.file_to_wasb`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_cloud_build_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.cloud_build`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.cloud_build`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_compute_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.compute`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.compute`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_container_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.kubernetes_engine`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.operators.kubernetes_engine`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_dlp_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.dlp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.dlp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_function_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.functions`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.functions`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_natural_language_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.natural_language`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.natural_language`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_spanner_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.spanner`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.spanner`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_speech_to_text_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.speech_to_text`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.speech_to_text`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_sql_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.cloud_sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.cloud_sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_tasks_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.tasks`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.tasks`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_text_to_speech_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.text_to_speech`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.text_to_speech`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_translate_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.translate`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.translate`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_translate_speech_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.translate_speech`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.operators.translate_speech`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_video_intelligence_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.video_intelligence`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.operators.video_intelligence`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcp_vision_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.vision`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.vision`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_acl_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_delete_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_download_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_list_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_to_bq.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.gcs_to_bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.gcs_to_bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.gcs_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.gcs_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_to_gdrive_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.suite.transfers.gcs_to_gdrive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.suite.transfers.gcs_to_gdrive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/gcs_to_s3.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.gcs_to_s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.gcs_to_s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/grpc_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.grpc.operators.grpc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.grpc.operators.grpc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/hive_to_dynamodb.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.hive_to_dynamodb`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.hive_to_dynamodb`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/imap_attachment_to_s3_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.imap_attachment_to_s3`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.transfers.imap_attachment_to_s3`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/jenkins_job_trigger_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.jenkins.operators.jenkins_job_trigger`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jenkins.operators.jenkins_job_trigger`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/jira_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.jira.operators.jira`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jira.operators.jira`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/kubernetes_pod_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.cncf.kubernetes.operators.kubernetes_pod`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.cncf.kubernetes.operators.kubernetes_pod`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/mlengine_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.operators.mlengine`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.operators.mlengine`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/mongo_to_s3.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.mongo_to_s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.mongo_to_s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/mssql_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.mssql_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.mssql_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/mysql_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.mysql_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.mysql_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/opsgenie_alert_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.opsgenie.operators.opsgenie_alert`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.opsgenie.operators.opsgenie_alert`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/oracle_to_oracle_transfer.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.oracle.transfers.oracle_to_oracle`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.oracle.transfers.oracle_to_oracle`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/operators/postgres_to_gcs_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.postgres_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.postgres_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/pubsub_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.google.cloud.operators.pubsub`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.operators.pubsub`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/operators/qubole_check_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.qubole.operators.qubole_check`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.qubole.operators.qubole_check`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/qubole_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.qubole.operators.qubole`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.qubole.operators.qubole`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/redis_publish_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.redis.operators.redis_publish`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.redis.operators.redis_publish`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/s3_copy_object_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3_copy_object`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.s3_copy_object`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/s3_delete_objects_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3_delete_objects`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.operators.s3_delete_objects`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/s3_list_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3_list`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.s3_list`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/s3_to_gcs_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.s3_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.s3_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/s3_to_sftp_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.s3_to_sftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.s3_to_sftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_base_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_base`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_base`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_endpoint_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_endpoint`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_endpoint`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_model_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_model`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_model`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_training_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_training`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_training`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_transform_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_transform`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_transform`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sagemaker_tuning_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sagemaker_tuning`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sagemaker_tuning`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/segment_track_event_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.segment.operators.segment_track_event`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.segment.operators.segment_track_event`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sftp_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.sftp.operators.sftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.sftp.operators.sftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sftp_to_s3_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.sftp_to_s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.sftp_to_s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/slack_webhook_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.slack.operators.slack_webhook`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.slack.operators.slack_webhook`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/snowflake_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.snowflake.operators.snowflake`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.snowflake.operators.snowflake`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sns_publish_operator.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.sns`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.operators.sns`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/spark_jdbc_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_jdbc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_jdbc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/spark_sql_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/spark_submit_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.spark.operators.spark_submit`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.spark.operators.spark_submit`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sql_to_gcs.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.transfers.sql_to_gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.transfers.sql_to_gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/sqoop_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.sqoop.operators.sqoop`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.sqoop.operators.sqoop`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/ssh_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.ssh.operators.ssh`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.ssh.operators.ssh`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/vertica_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.vertica.operators.vertica`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.vertica.operators.vertica`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/vertica_to_hive.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.apache.hive.transfers.vertica_to_hive`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.apache.hive.transfers.vertica_to_hive`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/operators/vertica_to_mysql.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.mysql.transfers.vertica_to_mysql`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.mysql.transfers.vertica_to_mysql`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/operators/wasb_delete_blob_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.operators.wasb_delete_blob`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.microsoft.azure.operators.wasb_delete_blob`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/operators/winrm_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.winrm.operators.winrm`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.winrm.operators.winrm`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/secrets/aws_secrets_manager.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.secrets.secrets_manager`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.secrets.secrets_manager`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/secrets/aws_systems_manager.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.secrets.systems_manager`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.secrets.systems_manager`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/secrets/azure_key_vault.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.secrets.azure_key_vault`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.secrets.azure_key_vault`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/secrets/gcp_secrets_manager.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.secrets.secret_manager`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.secrets.secret_manager`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/secrets/hashicorp_vault.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.hashicorp.secrets.vault`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.hashicorp.secrets.vault`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/aws_athena_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.athena`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.athena`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/aws_glue_catalog_partition_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.glue_catalog_partition`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.sensors.glue_catalog_partition`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/aws_redshift_cluster_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.redshift`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.redshift`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/aws_sqs_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sqs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sqs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/azure_cosmos_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.sensors.azure_cosmos`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.sensors.azure_cosmos`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/bash_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.bash`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.bash`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/bigquery_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.sensors.bigquery`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.bigquery`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/cassandra_record_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.apache.cassandra.sensors.record`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.sensors.record`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/cassandra_table_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.apache.cassandra.sensors.table`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.cassandra.sensors.table`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/celery_queue_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.celery.sensors.celery_queue`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.celery.sensors.celery_queue`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/datadog_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.datadog.sensors.datadog`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.datadog.sensors.datadog`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/emr_base_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr_base`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr_base`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/emr_job_flow_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr_job_flow`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr_job_flow`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/emr_step_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.emr_step`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.emr_step`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/file_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.filesystem`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.filesystem`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/ftp_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.ftp.sensors.ftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.ftp.sensors.ftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/gcp_transfer_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.sensors.cloud_storage_transfer_service`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/sensors/gcs_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.sensors.gcs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.gcs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/hdfs_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.apache.hdfs.sensors.hdfs`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.apache.hdfs.sensors.hdfs`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/sensors/imap_attachment_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.imap.sensors.imap_attachment`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.imap.sensors.imap_attachment`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/jira_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.jira.sensors.jira`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jira.sensors.jira`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/mongo_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.mongo.sensors.mongo`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.mongo.sensors.mongo`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/pubsub_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.sensors.pubsub`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.sensors.pubsub`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/python_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.python`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.python`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/qubole_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.qubole.sensors.qubole`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.qubole.sensors.qubole`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/redis_key_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.redis.sensors.redis_key`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.redis.sensors.redis_key`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/redis_pub_sub_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.redis.sensors.redis_pub_sub`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.redis.sensors.redis_pub_sub`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sagemaker_base_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker_base`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker_base`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sagemaker_endpoint_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker_endpoint`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker_endpoint`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sagemaker_training_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker_training`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker_training`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sagemaker_transform_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker_transform`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker_transform`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sagemaker_tuning_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.sagemaker_tuning`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.sagemaker_tuning`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/sftp_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.sftp.sensors.sftp`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.sftp.sensors.sftp`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/wasb_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.azure.sensors.wasb`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.azure.sensors.wasb`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/sensors/weekday_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.weekday`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.weekday`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/task_runner/cgroup_task_runner.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.task.task_runner.cgroup_task_runner`."""
<add>"""This module is deprecated. Please use :mod:`airflow.task.task_runner.cgroup_task_runner`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/utils/gcp_field_sanitizer.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.utils.field_sanitizer`"""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.utils.field_sanitizer`"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/utils/gcp_field_validator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.utils.field_validator`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.google.cloud.utils.field_validator`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/utils/log/task_handler_with_custom_formatter.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.utils.log.task_handler_with_custom_formatter`."""
<add>"""This module is deprecated. Please use :mod:`airflow.utils.log.task_handler_with_custom_formatter`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/utils/mlengine_operator_utils.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.google.cloud.utils.mlengine_operator_utils`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.utils.mlengine_operator_utils`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/contrib/utils/mlengine_prediction_summary.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.google.cloud.utils.mlengine_prediction_summary`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.google.cloud.utils.mlengine_prediction_summary`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/contrib/utils/weekday.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.utils.weekday`."""
<add>"""This module is deprecated. Please use :mod:`airflow.utils.weekday`."""
<ide> import warnings
<ide>
<ide> # pylint: disable=unused-import
<ide><path>airflow/hooks/S3_hook.py
<ide> # under the License.
<ide>
<ide> # pylint: disable=invalid-name
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/base_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.hooks.base`."""
<add>"""This module is deprecated. Please use :mod:`airflow.hooks.base`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/dbapi_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.hooks.dbapi`."""
<add>"""This module is deprecated. Please use :mod:`airflow.hooks.dbapi`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/docker_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.docker.hooks.docker`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.docker.hooks.docker`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/druid_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.druid.hooks.druid`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.druid.hooks.druid`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/hdfs_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hdfs.hooks.hdfs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hdfs.hooks.hdfs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/hive_hooks.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.hooks.hive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.hooks.hive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/http_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.http.hooks.http`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.http.hooks.http`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/jdbc_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.jdbc.hooks.jdbc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jdbc.hooks.jdbc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/mssql_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.mssql.hooks.mssql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.mssql.hooks.mssql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/mysql_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.mysql.hooks.mysql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.mysql.hooks.mysql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/oracle_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.oracle.hooks.oracle`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.oracle.hooks.oracle`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/pig_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.pig.hooks.pig`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.pig.hooks.pig`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/postgres_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.postgres.hooks.postgres`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.postgres.hooks.postgres`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/presto_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.presto.hooks.presto`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.presto.hooks.presto`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/samba_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.samba.hooks.samba`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.samba.hooks.samba`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/slack_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.slack.hooks.slack`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.slack.hooks.slack`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/sqlite_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.sqlite.hooks.sqlite`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.sqlite.hooks.sqlite`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/webhdfs_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hdfs.hooks.webhdfs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hdfs.hooks.webhdfs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/hooks/zendesk_hook.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.zendesk.hooks.zendesk`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.zendesk.hooks.zendesk`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/kubernetes/pod.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models for V1ResourceRequirements and Port."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`kubernetes.client.models for V1ResourceRequirements and Port.
<add>"""
<ide> # flake8: noqa
<ide> # pylint: disable=unused-import
<ide> import warnings
<ide><path>airflow/kubernetes/pod_launcher.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models for V1ResourceRequirements and Port."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`kubernetes.client.models` for V1ResourceRequirements and Port.
<add>"""
<ide> # flake8: noqa
<ide> # pylint: disable=unused-import
<ide> from airflow.kubernetes.pod_launcher_deprecated import PodLauncher, PodStatus # pylint: disable=unused-import
<ide><path>airflow/kubernetes/pod_launcher_deprecated.py
<ide>
<ide> warnings.warn(
<ide> """
<del> This module is deprecated. Please use `airflow.providers.cncf.kubernetes.utils.pod_launcher`
<add> Please use :mod: Please use `airflow.providers.cncf.kubernetes.utils.pod_launcher`
<ide>
<ide> To use this module install the provider package by installing this pip package:
<ide>
<ide><path>airflow/kubernetes/pod_runtime_info_env.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models.V1EnvVar`."""
<add>"""This module is deprecated. Please use :mod:`kubernetes.client.models.V1EnvVar`."""
<ide> # flake8: noqa
<ide> # pylint: disable=unused-import
<ide> import warnings
<ide><path>airflow/kubernetes/volume.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models.V1Volume`."""
<add>"""This module is deprecated. Please use :mod:`kubernetes.client.models.V1Volume`."""
<ide> # flake8: noqa
<ide> # pylint: disable=unused-import
<ide>
<ide><path>airflow/kubernetes/volume_mount.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models.V1VolumeMount`."""
<add>"""This module is deprecated. Please use :mod:`kubernetes.client.models.V1VolumeMount`."""
<ide> # flake8: noqa
<ide> # pylint: disable=unused-import
<ide>
<ide><path>airflow/operators/bash_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.bash`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.bash`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/branch_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.branch`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.branch`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/check_operator.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.operators.sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/dagrun_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.trigger_dagrun`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.trigger_dagrun`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/docker_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.docker.operators.docker`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.docker.operators.docker`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/druid_check_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.druid.operators.druid_check`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.druid.operators.druid_check`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/dummy_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.dummy`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.dummy`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/email_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.email`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.email`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/gcs_to_s3.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.gcs_to_s3`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.transfers.gcs_to_s3`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/google_api_to_s3_transfer.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<add>"""
<add>This module is deprecated.
<ide> Please use `airflow.providers.amazon.aws.transfers.google_api_to_s3`.
<ide> """
<ide>
<ide><path>airflow/operators/hive_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.operators.hive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.operators.hive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/hive_stats_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.operators.hive_stats`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.operators.hive_stats`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/hive_to_druid.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.apache.druid.transfers.hive_to_druid`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.apache.druid.transfers.hive_to_druid`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/operators/hive_to_mysql.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<add>"""
<add>This module is deprecated.
<ide> Please use `airflow.providers.apache.hive.transfers.hive_to_mysql`.
<ide> """
<ide>
<ide><path>airflow/operators/hive_to_samba_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.transfers.hive_to_samba`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.transfers.hive_to_samba`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/http_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.http.operators.http`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.http.operators.http`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/jdbc_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.jdbc.operators.jdbc`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.jdbc.operators.jdbc`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/latest_only_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.latest_only`"""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.latest_only`"""
<ide> import warnings
<ide>
<ide> # pylint: disable=unused-import
<ide><path>airflow/operators/mssql_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.microsoft.mssql.operators.mssql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.microsoft.mssql.operators.mssql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/mssql_to_hive.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.apache.hive.transfers.mssql_to_hive`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.apache.hive.transfers.mssql_to_hive`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/operators/mysql_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.mysql.operators.mysql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.mysql.operators.mysql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/mysql_to_hive.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.transfers.mysql_to_hive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.transfers.mysql_to_hive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/oracle_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.oracle.operators.oracle`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.oracle.operators.oracle`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/papermill_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.papermill.operators.papermill`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.papermill.operators.papermill`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/pig_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.pig.operators.pig`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.pig.operators.pig`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/postgres_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.postgres.operators.postgres`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.postgres.operators.postgres`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/presto_check_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/presto_to_mysql.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.mysql.transfers.presto_to_mysql`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.mysql.transfers.presto_to_mysql`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/operators/python_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.python`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.python`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/redshift_to_s3_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.amazon.aws.transfers.redshift_to_s3`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.transfers.redshift_to_s3`.
<ide> """
<ide>
<ide> import warnings
<ide>
<ide>
<ide> class RedshiftToS3Transfer(RedshiftToS3Operator):
<del> """This class is deprecated.
<del>
<del> Please use:
<del> `airflow.providers.amazon.aws.transfers.redshift_to_s3.RedshiftToS3Operator`.
<add> """
<add> This class is deprecated.
<add> Please use: :class:`airflow.providers.amazon.aws.transfers.redshift_to_s3.RedshiftToS3Operator`.
<ide> """
<ide>
<ide> def __init__(self, **kwargs):
<ide><path>airflow/operators/s3_file_transform_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.operators.s3_file_transform`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.operators.s3_file_transform`
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/s3_to_hive_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.transfers.s3_to_hive`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.transfers.s3_to_hive`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/s3_to_redshift_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated.
<del>
<del>Please use `airflow.providers.amazon.aws.operators.s3_to_redshift`.
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.amazon.aws.operators.s3_to_redshift`.
<ide> """
<ide>
<ide> import warnings
<ide><path>airflow/operators/slack_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.slack.operators.slack`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.slack.operators.slack`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/sql_branch_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.sql`."""
<ide> import warnings
<ide>
<ide> from airflow.operators.sql import BranchSQLOperator
<ide>
<ide> warnings.warn(
<del> """This module is deprecated. Please use `airflow.operators.sql`.""", DeprecationWarning, stacklevel=2
<add> "This module is deprecated. Please use :mod:`airflow.operators.sql`.", DeprecationWarning, stacklevel=2
<ide> )
<ide>
<ide>
<ide><path>airflow/operators/sqlite_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.sqlite.operators.sqlite`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.sqlite.operators.sqlite`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/operators/subdag_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.operators.subdag`."""
<add>"""This module is deprecated. Please use :mod:`airflow.operators.subdag`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/providers/amazon/aws/hooks/aws_dynamodb.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.dynamodb`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.hooks.dynamodb`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/providers/cncf/kubernetes/backcompat/volume.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `kubernetes.client.models.V1Volume`."""
<add>"""This module is deprecated. Please use :mod:`kubernetes.client.models.V1Volume`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/base_sensor_operator.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.base`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.base`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/date_time_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.date_time`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.date_time`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/external_task_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.external_task`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.external_task`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/hdfs_sensor.py
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<ide>
<del>"""This module is deprecated. Please use `airflow.providers.apache.hdfs.sensors.hdfs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hdfs.sensors.hdfs`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/hive_partition_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.sensors.hive_partition`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.sensors.hive_partition`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/http_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.http.sensors.http`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.http.sensors.http`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/metastore_partition_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.sensors.metastore_partition`."""
<add>"""
<add>This module is deprecated.
<add>Please use :mod:`airflow.providers.apache.hive.sensors.metastore_partition`.
<add>"""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/named_hive_partition_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hive.sensors.named_hive_partition`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hive.sensors.named_hive_partition`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/s3_key_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.s3_key`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.s3_key`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/s3_prefix_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.amazon.aws.sensors.s3_prefix`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.amazon.aws.sensors.s3_prefix`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/sql_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.sql`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.sql`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/time_delta_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.sensors.time_delta`."""
<add>"""This module is deprecated. Please use :mod:`airflow.sensors.time_delta`."""
<ide>
<ide> import warnings
<ide>
<ide><path>airflow/sensors/web_hdfs_sensor.py
<ide> # KIND, either express or implied. See the License for the
<ide> # specific language governing permissions and limitations
<ide> # under the License.
<del>"""This module is deprecated. Please use `airflow.providers.apache.hdfs.sensors.web_hdfs`."""
<add>"""This module is deprecated. Please use :mod:`airflow.providers.apache.hdfs.sensors.web_hdfs`."""
<ide>
<ide> import warnings
<ide> | 300 |
Javascript | Javascript | update parser for multi-file editor | 7bed07ee8a40f1f5b6ce64ec93e36590720728cd | <ide><path>curriculum/getChallenges.js
<ide> async function buildCurriculum(file, curriculum) {
<ide> async function parseTranslation(engPath, transPath, dict) {
<ide> const engChal = await parseMarkdown(engPath);
<ide> const translatedChal = await parseMarkdown(transPath);
<del> const codeLang =
<del> engChal.files && engChal.files[0] ? engChal.files[0].ext : null;
<del>
<del> const engWithTranslatedComments = codeLang
<del> ? translateCommentsInChallenge(
<del> engChal,
<del> getChallengeLang(transPath),
<del> dict,
<del> codeLang
<del> )
<del> : engChal;
<add>
<add> const engWithTranslatedComments = translateCommentsInChallenge(
<add> engChal,
<add> getChallengeLang(transPath),
<add> dict
<add> );
<ide> return mergeChallenges(engWithTranslatedComments, translatedChal);
<ide> }
<ide>
<ide><path>tools/challenge-md-parser/translation-parser/translation-parser.js
<ide> exports.translateComments = (text, lang, dict, codeLang) => {
<ide> }
<ide> };
<ide>
<del>exports.translateCommentsInChallenge = (challenge, lang, dict, codeLang) => {
<add>exports.translateCommentsInChallenge = (challenge, lang, dict) => {
<ide> const challClone = clone(challenge);
<ide>
<del> if (challClone.files[0] && challClone.files[0].contents) {
<del> challClone.files[0].contents = this.translateComments(
<del> challenge.files[0].contents,
<del> lang,
<del> dict,
<del> codeLang
<del> );
<del> }
<add> Object.keys(challClone.files).forEach(key => {
<add> if (challClone.files[key].contents) {
<add> challClone.files[key].contents = this.translateComments(
<add> challenge.files[key].contents,
<add> lang,
<add> dict,
<add> challClone.files[key].ext
<add> );
<add> }
<add> });
<ide>
<ide> return challClone;
<ide> }; | 2 |
Text | Text | extend v2.3 migration guide | c4d02094726a7e92325f9fc0911fcfad7f43db75 | <ide><path>website/docs/usage/v2-3.md
<ide> If you're adding data for a new language, the normalization table should be
<ide> added to `spacy-lookups-data`. See
<ide> [adding norm exceptions](/usage/adding-languages#norm-exceptions).
<ide>
<del>#### No preloaded lexemes/vocab for models with vectors
<add>#### No preloaded vocab for models with vectors
<ide>
<ide> To reduce the initial loading time, the lexemes in `nlp.vocab` are no longer
<ide> loaded on initialization for models with vectors. As you process texts, the
<del>lexemes will be added to the vocab automatically, just as in models without
<del>vectors.
<add>lexemes will be added to the vocab automatically, just as in small models
<add>without vectors.
<ide>
<ide> To see the number of unique vectors and number of words with vectors, see
<ide> `nlp.meta['vectors']`, for example for `en_core_web_md` there are `20000`
<ide> for orth in nlp.vocab.vectors:
<ide> _ = nlp.vocab[orth]
<ide> ```
<ide>
<add>If your workflow previously iterated over `nlp.vocab`, a similar alternative
<add>is to iterate over words with vectors instead:
<add>
<add>```diff
<add>- lexemes = [w for w in nlp.vocab]
<add>+ lexemes = [nlp.vocab[orth] for orth in nlp.vocab.vectors]
<add>```
<add>
<add>Be aware that the set of preloaded lexemes in a v2.2 model is not equivalent to
<add>the set of words with vectors. For English, v2.2 `md/lg` models have 1.3M
<add>provided lexemes but only 685K words with vectors. The vectors have been
<add>updated for most languages in v2.2, but the English models contain the same
<add>vectors for both v2.2 and v2.3.
<add>
<ide> #### Lexeme.is_oov and Token.is_oov
<ide>
<ide> <Infobox title="Important note" variant="warning">
<ide> model vocab, which will take a few seconds on initial loading. When you save
<ide> this model after loading the `prob` table, the full `prob` table will be saved
<ide> as part of the model vocab.
<ide>
<add>To load the probability table into a provided model, first make sure you have
<add>`spacy-lookups-data` installed. To load the table, remove the empty provided
<add>`lexeme_prob` table and then access `Lexeme.prob` for any word to load the
<add>table from `spacy-lookups-data`:
<add>
<add>```diff
<add>+ # prerequisite: pip install spacy-lookups-data
<add>import spacy
<add>
<add>nlp = spacy.load("en_core_web_md")
<add>
<add># remove the empty placeholder prob table
<add>+ if nlp.vocab.lookups_extra.has_table("lexeme_prob"):
<add>+ nlp.vocab.lookups_extra.remove_table("lexeme_prob")
<add>
<add># access any `.prob` to load the full table into the model
<add>assert nlp.vocab["a"].prob == -3.9297883511
<add>
<add># if desired, save this model with the probability table included
<add>nlp.to_disk("/path/to/model")
<add>```
<add>
<ide> If you'd like to include custom `cluster`, `prob`, or `sentiment` tables as part
<ide> of a new model, add the data to
<ide> [`spacy-lookups-data`](https://github.com/explosion/spacy-lookups-data) under
<ide> When you initialize a new model with [`spacy init-model`](/api/cli#init-model),
<ide> the `prob` table from `spacy-lookups-data` may be loaded as part of the
<ide> initialization. If you'd like to omit this extra data as in spaCy's provided
<ide> v2.3 models, use the new flag `--omit-extra-lookups`.
<add>
<add>#### Tag maps in provided models vs. blank models
<add>
<add>The tag maps in the provided models may differ from the tag maps in the spaCy
<add>library. You can access the tag map in a loaded model under
<add>`nlp.vocab.morphology.tag_map`.
<add>
<add>The tag map from `spacy.lang.lg.tag_map` is still used when a blank model is
<add>initialized. If you want to provide an alternate tag map, update
<add>`nlp.vocab.morphology.tag_map` after initializing the model or if you're using
<add>the [train CLI](/api/cli#train), you can use the new `--tag-map-path` option to
<add>provide in the tag map as a JSON dict.
<add>
<add>If you want to export a tag map from a provided model for use with the train
<add>CLI, you can save it as a JSON dict. To only use string keys as required by
<add>JSON and to make it easier to read and edit, any internal integer IDs need to
<add>be converted back to strings:
<add>
<add>```python
<add>import spacy
<add>import srsly
<add>
<add>nlp = spacy.load("en_core_web_sm")
<add>tag_map = {}
<add>
<add># convert any integer IDs to strings for JSON
<add>for tag, morph in nlp.vocab.morphology.tag_map.items():
<add> tag_map[tag] = {}
<add> for feat, val in morph.items():
<add> feat = nlp.vocab.strings.as_string(feat)
<add> if not isinstance(val, bool):
<add> val = nlp.vocab.strings.as_string(val)
<add> tag_map[tag][feat] = val
<add>
<add>srsly.write_json("tag_map.json", tag_map)
<add>``` | 1 |
Go | Go | implement ref checker | 354c241041ec67d4c500cccfda476dc73435d38e | <ide><path>builder/builder-next/adapters/snapshot/snapshot.go
<ide> func (s *snapshotter) chainID(key string) (layer.ChainID, bool) {
<ide> return "", false
<ide> }
<ide>
<add>func (s *snapshotter) GetLayer(key string) (layer.Layer, error) {
<add> return s.getLayer(key, true)
<add>}
<add>
<ide> func (s *snapshotter) getLayer(key string, withCommitted bool) (layer.Layer, error) {
<ide> s.mu.Lock()
<ide> l, ok := s.refs[key]
<ide><path>builder/builder-next/controller.go
<ide> import (
<ide> "github.com/docker/docker/builder/builder-next/adapters/containerimage"
<ide> "github.com/docker/docker/builder/builder-next/adapters/snapshot"
<ide> containerimageexp "github.com/docker/docker/builder/builder-next/exporter"
<add> "github.com/docker/docker/builder/builder-next/imagerefchecker"
<ide> mobyworker "github.com/docker/docker/builder/builder-next/worker"
<ide> "github.com/docker/docker/daemon/graphdriver"
<ide> "github.com/moby/buildkit/cache"
<ide> func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
<ide> MetadataStore: md,
<ide> })
<ide>
<add> layerGetter, ok := sbase.(imagerefchecker.LayerGetter)
<add> if !ok {
<add> return nil, errors.Errorf("snapshotter does not implement layergetter")
<add> }
<add>
<add> refChecker := imagerefchecker.New(imagerefchecker.Opt{
<add> ImageStore: dist.ImageStore,
<add> LayerGetter: layerGetter,
<add> })
<add>
<ide> cm, err := cache.NewManager(cache.ManagerOpt{
<del> Snapshotter: snapshotter,
<del> MetadataStore: md,
<del> // TODO: implement PruneRefChecker to correctly mark cache objects as "Shared"
<del> PruneRefChecker: nil,
<add> Snapshotter: snapshotter,
<add> MetadataStore: md,
<add> PruneRefChecker: refChecker,
<ide> })
<ide> if err != nil {
<ide> return nil, err
<ide><path>builder/builder-next/imagerefchecker/checker.go
<add>package imagerefchecker
<add>
<add>import (
<add> "sync"
<add>
<add> "github.com/docker/docker/image"
<add> "github.com/docker/docker/layer"
<add> "github.com/moby/buildkit/cache"
<add>)
<add>
<add>// LayerGetter abstracts away the snapshotter
<add>type LayerGetter interface {
<add> GetLayer(string) (layer.Layer, error)
<add>}
<add>
<add>// Opt represents the options needed to create a refchecker
<add>type Opt struct {
<add> LayerGetter LayerGetter
<add> ImageStore image.Store
<add>}
<add>
<add>// New creates new image reference checker that can be used to see if a reference
<add>// is being used by any of the images in the image store
<add>func New(opt Opt) cache.ExternalRefCheckerFunc {
<add> return func() (cache.ExternalRefChecker, error) {
<add> return &checker{opt: opt, layers: lchain{}, cache: map[string]bool{}}, nil
<add> }
<add>}
<add>
<add>type lchain map[layer.DiffID]lchain
<add>
<add>func (c lchain) add(ids []layer.DiffID) {
<add> if len(ids) == 0 {
<add> return
<add> }
<add> id := ids[0]
<add> ch, ok := c[id]
<add> if !ok {
<add> ch = lchain{}
<add> c[id] = ch
<add> }
<add> ch.add(ids[1:])
<add>}
<add>
<add>func (c lchain) has(ids []layer.DiffID) bool {
<add> if len(ids) == 0 {
<add> return true
<add> }
<add> ch, ok := c[ids[0]]
<add> return ok && ch.has(ids[1:])
<add>}
<add>
<add>type checker struct {
<add> opt Opt
<add> once sync.Once
<add> layers lchain
<add> cache map[string]bool
<add>}
<add>
<add>func (c *checker) Exists(key string) bool {
<add> if c.opt.ImageStore == nil {
<add> return false
<add> }
<add>
<add> c.once.Do(c.init)
<add>
<add> if b, ok := c.cache[key]; ok {
<add> return b
<add> }
<add>
<add> l, err := c.opt.LayerGetter.GetLayer(key)
<add> if err != nil || l == nil {
<add> c.cache[key] = false
<add> return false
<add> }
<add>
<add> ok := c.layers.has(diffIDs(l))
<add> c.cache[key] = ok
<add> return ok
<add>}
<add>
<add>func (c *checker) init() {
<add> imgs := c.opt.ImageStore.Map()
<add>
<add> for _, img := range imgs {
<add> c.layers.add(img.RootFS.DiffIDs)
<add> }
<add>}
<add>
<add>func diffIDs(l layer.Layer) []layer.DiffID {
<add> p := l.Parent()
<add> if p == nil {
<add> return []layer.DiffID{l.DiffID()}
<add> }
<add> return append(diffIDs(p), l.DiffID())
<add>} | 3 |
Python | Python | update deep dream config | 7481b5d060d77f73dc78e2fde37362d1b4656f2a | <ide><path>examples/deep_dream.py
<ide> # You can tweak these setting to obtain new visual effects.
<ide> settings = {
<ide> 'features': {
<del> 'mixed2': 0.5,
<del> 'mixed3': 1.,
<del> 'mixed4': 1.,
<add> 'mixed2': 0.2,
<add> 'mixed3': 0.5,
<add> 'mixed4': 2.,
<add> 'mixed5': 1.5,
<ide> },
<ide> }
<ide>
<ide> def resize_img(img, size):
<ide> return scipy.ndimage.zoom(img, factors, order=1)
<ide>
<ide>
<del>def gradient_ascent(x, iterations, step):
<add>def gradient_ascent(x, iterations, step, max_loss=None):
<ide> for i in range(iterations):
<ide> loss_value, grad_values = eval_loss_and_grads(x)
<add> if max_loss is not None and loss_value > max_loss:
<add> break
<ide> print('..Loss value at', i, ':', loss_value)
<ide> x += step * grad_values
<ide> return x
<ide> def save_img(img, fname):
<ide> """
<ide>
<ide>
<del>step = 0.003 # Gradient ascent step size
<del>num_octave = 4 # Number of scales at which to run gradient ascent
<del>octave_scale = 1.3 # Size ratio between scales
<add># Playing with these hyperparameters will also allow you to achieve new effects
<add>step = 0.01 # Gradient ascent step size
<add>num_octave = 3 # Number of scales at which to run gradient ascent
<add>octave_scale = 1.4 # Size ratio between scales
<ide> iterations = 20 # Number of ascent steps per scale
<add>max_loss = 10.
<ide>
<ide> img = preprocess_image(base_image_path)
<ide> if K.image_data_format() == 'channels_first':
<ide> def save_img(img, fname):
<ide> for shape in successive_shapes:
<ide> print('Processing image shape', shape)
<ide> img = resize_img(img, shape)
<del> img = gradient_ascent(img, iterations=iterations, step=step)
<del>
<add> img = gradient_ascent(img,
<add> iterations=iterations,
<add> step=step,
<add> max_loss=max_loss)
<ide> upscaled_shrunk_original_img = resize_img(shrunk_original_img, shape)
<ide> same_size_original = resize_img(original_img, shape)
<ide> lost_detail = same_size_original - upscaled_shrunk_original_img | 1 |
PHP | PHP | fix incorrect documentation | 272416540895fa42681f0037acdd7856fa504866 | <ide><path>src/Datasource/EntityTrait.php
<ide> public function hiddenProperties($properties = null)
<ide> /**
<ide> * Sets hidden properties.
<ide> *
<del> * @param array $properties An array of properties to treat as virtual.
<add> * @param array $properties An array of properties to hide from array exports.
<ide> * @param bool $merge Merge the new properties with the existing. By default false.
<ide> * @return $this
<ide> */ | 1 |
Ruby | Ruby | prevent deadlocks with load interlock and db lock | 1f9f6f6cfc57020ccb35f77872c56f069f337075 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
<ide> require "active_record/connection_adapters/sql_type_metadata"
<ide> require "active_record/connection_adapters/abstract/schema_dumper"
<ide> require "active_record/connection_adapters/abstract/schema_creation"
<add>require "active_support/concurrency/load_interlock_aware_monitor"
<ide> require "arel/collectors/bind"
<ide> require "arel/collectors/composite"
<ide> require "arel/collectors/sql_string"
<ide> def initialize(connection, logger = nil, config = {}) # :nodoc:
<ide> @schema_cache = SchemaCache.new self
<ide> @quoted_column_names, @quoted_table_names = {}, {}
<ide> @visitor = arel_visitor
<del> @lock = Monitor.new
<add> @lock = ActiveSupport::Concurrency::LoadInterlockAwareMonitor.new
<ide>
<ide> if self.class.type_cast_config_to_boolean(config.fetch(:prepared_statements) { true })
<ide> @prepared_statements = true
<ide><path>activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb
<add># frozen_string_literal: true
<add>
<add>require "monitor"
<add>
<add>module ActiveSupport
<add> module Concurrency
<add> # A monitor that will permit dependency loading while blocked waiting for
<add> # the lock.
<add> class LoadInterlockAwareMonitor < Monitor
<add> # Enters an exclusive section, but allows dependency loading while blocked
<add> def mon_enter
<add> mon_try_enter ||
<add> ActiveSupport::Dependencies.interlock.permit_concurrent_loads { super }
<add> end
<add> end
<add> end
<add>end
<ide><path>activesupport/test/concurrency/load_interlock_aware_monitor_test.rb
<add># frozen_string_literal: true
<add>
<add>require "abstract_unit"
<add>require "concurrent/atomic/count_down_latch"
<add>require "active_support/concurrency/load_interlock_aware_monitor"
<add>
<add>module ActiveSupport
<add> module Concurrency
<add> class LoadInterlockAwareMonitorTest < ActiveSupport::TestCase
<add> def setup
<add> @monitor = ActiveSupport::Concurrency::LoadInterlockAwareMonitor.new
<add> end
<add>
<add> def test_entering_with_no_blocking
<add> assert @monitor.mon_enter
<add> end
<add>
<add> def test_entering_with_blocking
<add> load_interlock_latch = Concurrent::CountDownLatch.new
<add> monitor_latch = Concurrent::CountDownLatch.new
<add>
<add> able_to_use_monitor = false
<add> able_to_load = false
<add>
<add> thread_with_load_interlock = Thread.new do
<add> ActiveSupport::Dependencies.interlock.running do
<add> load_interlock_latch.count_down
<add> monitor_latch.wait
<add>
<add> @monitor.synchronize do
<add> able_to_use_monitor = true
<add> end
<add> end
<add> end
<add>
<add> thread_with_monitor_lock = Thread.new do
<add> @monitor.synchronize do
<add> monitor_latch.count_down
<add> load_interlock_latch.wait
<add>
<add> ActiveSupport::Dependencies.interlock.loading do
<add> able_to_load = true
<add> end
<add> end
<add> end
<add>
<add> thread_with_load_interlock.join
<add> thread_with_monitor_lock.join
<add>
<add> assert able_to_use_monitor
<add> assert able_to_load
<add> end
<add> end
<add> end
<add>end | 3 |
Ruby | Ruby | show correct command name in help of rails runner | 06cd7ab6cb1e0ecae5a3fedaecb7facc4bf52ad9 | <ide><path>railties/lib/rails/commands/runner.rb
<ide>
<ide> options = { environment: (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development").dup }
<ide> code_or_file = nil
<add>command = 'bin/rails runner'
<ide>
<ide> if ARGV.first.nil?
<ide> ARGV.push "-h"
<ide> opts.separator ""
<ide> opts.separator "You can also use runner as a shebang line for your executables:"
<ide> opts.separator " -------------------------------------------------------------"
<del> opts.separator " #!/usr/bin/env #{File.expand_path($0)} runner"
<add> opts.separator " #!/usr/bin/env #{File.expand_path(command)}"
<ide> opts.separator ""
<ide> opts.separator " Product.all.each { |p| p.price *= 2 ; p.save! }"
<ide> opts.separator " -------------------------------------------------------------"
<ide> Rails.application.load_runner
<ide>
<ide> if code_or_file.nil?
<del> $stderr.puts "Run '#{$0} -h' for help."
<add> $stderr.puts "Run '#{command} -h' for help."
<ide> exit 1
<ide> elsif File.exist?(code_or_file)
<ide> $0 = code_or_file
<ide> eval(code_or_file, binding, __FILE__, __LINE__)
<ide> rescue SyntaxError, NameError
<ide> $stderr.puts "Please specify a valid ruby command or the path of a script to run."
<del> $stderr.puts "Run '#{$0} -h' for help."
<add> $stderr.puts "Run '#{command} -h' for help."
<ide> exit 1
<ide> end
<ide> end | 1 |
Ruby | Ruby | remove old deprecation warning | 31911a409c2cfe4c6fef550d913487163b3b938e | <ide><path>activerecord/lib/active_record/querying.rb
<ide> module Querying
<ide> # Post.find_by_sql ["SELECT body FROM comments WHERE author = :user_id OR approved_by = :user_id", { :user_id => user_id }]
<ide> def find_by_sql(sql, binds = [])
<ide> result_set = connection.select_all(sanitize_sql(sql), "#{name} Load", binds)
<del> column_types = {}
<del>
<del> if result_set.respond_to? :column_types
<del> column_types = result_set.column_types.except(*columns_hash.keys)
<del> else
<del> ActiveSupport::Deprecation.warn "the object returned from `select_all` must respond to `column_types`"
<del> end
<del>
<add> column_types = result_set.column_types.except(*columns_hash.keys)
<ide> result_set.map { |record| instantiate(record, column_types) }
<ide> end
<ide> | 1 |
Javascript | Javascript | fix tap naming | c04bc487ff70ab656c895b9edec1c818fa40c21b | <ide><path>lib/dependencies/ImportMetaContextDependencyParserPlugin.js
<ide> module.exports = class ImportMetaContextDependencyParserPlugin {
<ide> apply(parser) {
<ide> parser.hooks.evaluateIdentifier
<ide> .for("import.meta.webpackContext")
<del> .tap("HotModuleReplacementPlugin", expr => {
<add> .tap("ImportMetaContextDependencyParserPlugin", expr => {
<ide> return evaluateToIdentifier(
<ide> "import.meta.webpackContext",
<ide> "import.meta", | 1 |
PHP | PHP | move tests under the orm namespace | e1843d018278a8e8a0873c477bd5deb5d47e8e31 | <ide><path>tests/TestCase/Database/QueryTests/CaseExpressionQueryTest.php
<ide> public function testInferredReturnType(): void
<ide> ];
<ide> $this->assertSame($expected, $query->execute()->fetchAll(StatementInterface::FETCH_TYPE_ASSOC));
<ide> }
<del>
<del> public function testOverwrittenReturnType(): void
<del> {
<del> $typeMap = new TypeMap([
<del> 'is_cheap' => 'boolean',
<del> ]);
<del>
<del> $query = $this->query
<del> ->select(function (Query $query) {
<del> return [
<del> 'name',
<del> 'price',
<del> 'is_cheap' => $query->newExpr()
<del> ->case()
<del> ->when(['price <' => 20])
<del> ->then(1)
<del> ->else(0)
<del> ->setReturnType('boolean'),
<del> ];
<del> })
<del> ->from('products')
<del> ->orderAsc('price')
<del> ->orderAsc('name')
<del> ->setSelectTypeMap($typeMap);
<del>
<del> $expected = [
<del> [
<del> 'name' => 'First product',
<del> 'price' => '10',
<del> 'is_cheap' => true,
<del> ],
<del> [
<del> 'name' => 'Second product',
<del> 'price' => '20',
<del> 'is_cheap' => false,
<del> ],
<del> [
<del> 'name' => 'Third product',
<del> 'price' => '30',
<del> 'is_cheap' => false,
<del> ],
<del> ];
<del> $this->assertSame($expected, $query->execute()->fetchAll(StatementInterface::FETCH_TYPE_ASSOC));
<del> }
<del>
<del> public function bindingValueDataProvider(): array
<del> {
<del> return [
<del> ['1', 3],
<del> ['2', 4],
<del> ];
<del> }
<del>
<del> /**
<del> * @dataProvider bindingValueDataProvider
<del> * @param string $when The `WHEN` value.
<del> * @param int $result The result value.
<del> */
<del> public function testBindValues(string $when, int $result): void
<del> {
<del> $value = '1';
<del> $then = '3';
<del> $else = '4';
<del>
<del> $typeMap = new TypeMap([
<del> 'val' => 'integer',
<del> ]);
<del>
<del> $query = $this->query
<del> ->select(function (Query $query) {
<del> return [
<del> 'val' => $query->newExpr()
<del> ->case($query->newExpr(':value'))
<del> ->when($query->newExpr(':when'))
<del> ->then($query->newExpr(':then'))
<del> ->else($query->newExpr(':else'))
<del> ->setReturnType('integer'),
<del> ];
<del> })
<del> ->from('products')
<del> ->bind(':value', $value, 'integer')
<del> ->bind(':when', $when, 'integer')
<del> ->bind(':then', $then, 'integer')
<del> ->bind(':else', $else, 'integer')
<del> ->setSelectTypeMap($typeMap);
<del>
<del> $expected = [
<del> 'val' => $result,
<del> ];
<del> $this->assertSame($expected, $query->execute()->fetch(StatementInterface::FETCH_TYPE_ASSOC));
<del> }
<ide> }
<ide><path>tests/TestCase/ORM/QueryTests/CaseExpressionQueryTest.php
<add><?php
<add>declare(strict_types=1);
<add>
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and license information, please see the LICENSE.txt
<add> * Redistributions of files must retain the above copyright notice.
<add> *
<add> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<add> * @link https://cakephp.org CakePHP(tm) Project
<add> * @since 4.3.0
<add> * @license https://opensource.org/licenses/mit-license.php MIT License
<add> */
<add>namespace Cake\Test\TestCase\Database\QueryTests;
<add>
<add>use Cake\ORM\Query;
<add>use Cake\TestSuite\TestCase;
<add>
<add>class CaseExpressionQueryTest extends TestCase
<add>{
<add> protected $fixtures = [
<add> 'core.Products',
<add> ];
<add>
<add> public function testOverwrittenReturnType(): void
<add> {
<add> $query = $this->getTableLocator()->get('Products')
<add> ->find()
<add> ->select(function (Query $query) {
<add> return [
<add> 'name',
<add> 'price',
<add> 'is_cheap' => $query->newExpr()
<add> ->case()
<add> ->when(['price <' => 20])
<add> ->then(1)
<add> ->else(0)
<add> ->setReturnType('boolean'),
<add> ];
<add> })
<add> ->orderAsc('price')
<add> ->orderAsc('name')
<add> ->disableHydration();
<add>
<add> $expected = [
<add> [
<add> 'name' => 'First product',
<add> 'price' => 10,
<add> 'is_cheap' => true,
<add> ],
<add> [
<add> 'name' => 'Second product',
<add> 'price' => 20,
<add> 'is_cheap' => false,
<add> ],
<add> [
<add> 'name' => 'Third product',
<add> 'price' => 30,
<add> 'is_cheap' => false,
<add> ],
<add> ];
<add> $this->assertSame($expected, $query->toArray());
<add> }
<add>
<add> public function bindingValueDataProvider(): array
<add> {
<add> return [
<add> ['1', 3],
<add> ['2', 4],
<add> ];
<add> }
<add>
<add> /**
<add> * @dataProvider bindingValueDataProvider
<add> * @param string $when The `WHEN` value.
<add> * @param int $result The result value.
<add> */
<add> public function testBindValues(string $when, int $result): void
<add> {
<add> $value = '1';
<add> $then = '3';
<add> $else = '4';
<add>
<add> $query = $this->getTableLocator()->get('Products')
<add> ->find()
<add> ->select(function (Query $query) {
<add> return [
<add> 'val' => $query->newExpr()
<add> ->case($query->newExpr(':value'))
<add> ->when($query->newExpr(':when'))
<add> ->then($query->newExpr(':then'))
<add> ->else($query->newExpr(':else'))
<add> ->setReturnType('integer'),
<add> ];
<add> })
<add> ->bind(':value', $value, 'integer')
<add> ->bind(':when', $when, 'integer')
<add> ->bind(':then', $then, 'integer')
<add> ->bind(':else', $else, 'integer')
<add> ->disableHydration();
<add>
<add> $expected = [
<add> 'val' => $result,
<add> ];
<add> $this->assertSame($expected, $query->first());
<add> }
<add>} | 2 |
Javascript | Javascript | remove promise on checkmodule | f8456b2ecbf194d19d70ff057f251cbc5814bc34 | <ide><path>scripts/release/build-commands/check-package-dependencies.js
<ide> const check = async ({cwd, packages}) => {
<ide> });
<ide> };
<ide>
<del> await Promise.all(dependencies.map(checkModule));
<add> dependencies.forEach(checkModule);
<ide>
<ide> if (invalidDependencies.length) {
<ide> throw Error( | 1 |
PHP | PHP | use tableschema constants in sqlserver schema | 6b970c4e5eedf22804b13ff063a182c296007e19 | <ide><path>src/Database/Schema/SqlserverSchema.php
<ide> protected function _convertColumn($col, $length = null, $precision = null, $scal
<ide> return ['type' => $col, 'length' => null];
<ide> }
<ide> if (strpos($col, 'datetime') !== false) {
<del> return ['type' => 'timestamp', 'length' => null];
<add> return ['type' => TableSchema::TYPE_TIMESTAMP, 'length' => null];
<ide> }
<ide>
<ide> if ($col === 'tinyint') {
<del> return ['type' => 'tinyinteger', 'length' => $precision ?: 3];
<add> return ['type' => TableSchema::TYPE_TINYINTEGER, 'length' => $precision ?: 3];
<ide> }
<ide> if ($col === 'smallint') {
<del> return ['type' => 'smallinteger', 'length' => $precision ?: 5];
<add> return ['type' => TableSchema::TYPE_SMALLINTEGER, 'length' => $precision ?: 5];
<ide> }
<ide> if ($col === 'int' || $col === 'integer') {
<del> return ['type' => 'integer', 'length' => $precision ?: 10];
<add> return ['type' => TableSchema::TYPE_INTEGER, 'length' => $precision ?: 10];
<ide> }
<ide> if ($col === 'bigint') {
<del> return ['type' => 'biginteger', 'length' => $precision ?: 20];
<add> return ['type' => TableSchema::TYPE_BIGINTEGER, 'length' => $precision ?: 20];
<ide> }
<ide> if ($col === 'bit') {
<del> return ['type' => 'boolean', 'length' => null];
<add> return ['type' => TableSchema::TYPE_BOOLEAN, 'length' => null];
<ide> }
<ide> if (strpos($col, 'numeric') !== false ||
<ide> strpos($col, 'money') !== false ||
<ide> strpos($col, 'decimal') !== false
<ide> ) {
<del> return ['type' => 'decimal', 'length' => $precision, 'precision' => $scale];
<add> return ['type' => TableSchema::TYPE_DECIMAL, 'length' => $precision, 'precision' => $scale];
<ide> }
<ide>
<ide> if ($col === 'real' || $col === 'float') {
<del> return ['type' => 'float', 'length' => null];
<add> return ['type' => TableSchema::TYPE_FLOAT, 'length' => null];
<ide> }
<ide>
<ide> if (strpos($col, 'varchar') !== false && $length < 0) {
<del> return ['type' => 'text', 'length' => null];
<add> return ['type' => TableSchema::TYPE_TEXT, 'length' => null];
<ide> }
<ide>
<ide> if (strpos($col, 'varchar') !== false) {
<del> return ['type' => 'string', 'length' => $length ?: 255];
<add> return ['type' => TableSchema::TYPE_STRING, 'length' => $length ?: 255];
<ide> }
<ide>
<ide> if (strpos($col, 'char') !== false) {
<del> return ['type' => 'string', 'fixed' => true, 'length' => $length];
<add> return ['type' => TableSchema::TYPE_STRING, 'fixed' => true, 'length' => $length];
<ide> }
<ide>
<ide> if (strpos($col, 'text') !== false) {
<del> return ['type' => 'text', 'length' => null];
<add> return ['type' => TableSchema::TYPE_TEXT, 'length' => null];
<ide> }
<ide>
<ide> if ($col === 'image' || strpos($col, 'binary')) {
<del> return ['type' => 'binary', 'length' => null];
<add> return ['type' => TableSchema::TYPE_BINARY, 'length' => null];
<ide> }
<ide>
<ide> if ($col === 'uniqueidentifier') {
<del> return ['type' => 'uuid'];
<add> return ['type' => TableSchema::TYPE_UUID];
<ide> }
<ide>
<del> return ['type' => 'string', 'length' => null];
<add> return ['type' => TableSchema::TYPE_STRING, 'length' => null];
<ide> }
<ide>
<ide> /**
<ide> public function convertColumnDescription(TableSchema $schema, $row)
<ide> if (!empty($row['autoincrement'])) {
<ide> $field['autoIncrement'] = true;
<ide> }
<del> if ($field['type'] === 'boolean') {
<add> if ($field['type'] === TableSchema::TYPE_BOOLEAN) {
<ide> $row['default'] = (int)$row['default'];
<ide> }
<ide>
<ide> public function columnSql(TableSchema $schema, $name)
<ide> $data = $schema->column($name);
<ide> $out = $this->_driver->quoteIdentifier($name);
<ide> $typeMap = [
<del> 'tinyinteger' => ' TINYINT',
<del> 'smallinteger' => ' SMALLINT',
<del> 'integer' => ' INTEGER',
<del> 'biginteger' => ' BIGINT',
<del> 'boolean' => ' BIT',
<del> 'float' => ' FLOAT',
<del> 'decimal' => ' DECIMAL',
<del> 'date' => ' DATE',
<del> 'time' => ' TIME',
<del> 'datetime' => ' DATETIME',
<del> 'timestamp' => ' DATETIME',
<del> 'uuid' => ' UNIQUEIDENTIFIER',
<del> 'json' => ' NVARCHAR(MAX)',
<add> TableSchema::TYPE_TINYINTEGER => ' TINYINT',
<add> TableSchema::TYPE_SMALLINTEGER => ' SMALLINT',
<add> TableSchema::TYPE_INTEGER => ' INTEGER',
<add> TableSchema::TYPE_BIGINTEGER => ' BIGINT',
<add> TableSchema::TYPE_BOOLEAN => ' BIT',
<add> TableSchema::TYPE_FLOAT => ' FLOAT',
<add> TableSchema::TYPE_DECIMAL => ' DECIMAL',
<add> TableSchema::TYPE_DATE => ' DATE',
<add> TableSchema::TYPE_TIME => ' TIME',
<add> TableSchema::TYPE_DATETIME => ' DATETIME',
<add> TableSchema::TYPE_TIMESTAMP => ' DATETIME',
<add> TableSchema::TYPE_UUID => ' UNIQUEIDENTIFIER',
<add> TableSchema::TYPE_JSON => ' NVARCHAR(MAX)',
<ide> ];
<ide>
<ide> if (isset($typeMap[$data['type']])) {
<ide> $out .= $typeMap[$data['type']];
<ide> }
<ide>
<del> if ($data['type'] === 'integer' || $data['type'] === 'biginteger') {
<add> if ($data['type'] === TableSchema::TYPE_INTEGER || $data['type'] === TableSchema::TYPE_BIGINTEGER) {
<ide> if ([$name] === $schema->primaryKey() || $data['autoIncrement'] === true) {
<ide> unset($data['null'], $data['default']);
<ide> $out .= ' IDENTITY(1, 1)';
<ide> }
<ide> }
<ide>
<del> if ($data['type'] === 'text' && $data['length'] !== Table::LENGTH_TINY) {
<add> if ($data['type'] === TableSchema::TYPE_TEXT && $data['length'] !== Table::LENGTH_TINY) {
<ide> $out .= ' NVARCHAR(MAX)';
<ide> }
<ide>
<del> if ($data['type'] === 'binary') {
<add> if ($data['type'] === TableSchema::TYPE_BINARY) {
<ide> $out .= ' VARBINARY';
<ide>
<ide> if ($data['length'] !== Table::LENGTH_TINY) {
<ide> public function columnSql(TableSchema $schema, $name)
<ide> }
<ide> }
<ide>
<del> if ($data['type'] === 'string' || ($data['type'] === 'text' && $data['length'] === Table::LENGTH_TINY)) {
<add> if ($data['type'] === TableSchema::TYPE_STRING ||
<add> ($data['type'] === TableSchema::TYPE_TEXT && $data['length'] === Table::LENGTH_TINY)
<add> ) {
<ide> $type = ' NVARCHAR';
<ide>
<ide> if (!empty($data['fixed'])) {
<ide> public function columnSql(TableSchema $schema, $name)
<ide> $out .= sprintf('%s(%d)', $type, $data['length']);
<ide> }
<ide>
<del> $hasCollate = ['text', 'string'];
<add> $hasCollate = [TableSchema::TYPE_TEXT, TableSchema::TYPE_STRING];
<ide> if (in_array($data['type'], $hasCollate, true) && isset($data['collate']) && $data['collate'] !== '') {
<ide> $out .= ' COLLATE ' . $data['collate'];
<ide> }
<ide>
<del> if ($data['type'] === 'float' && isset($data['precision'])) {
<add> if ($data['type'] === TableSchema::TYPE_FLOAT && isset($data['precision'])) {
<ide> $out .= '(' . (int)$data['precision'] . ')';
<ide> }
<ide>
<del> if ($data['type'] === 'decimal' &&
<add> if ($data['type'] === TableSchema::TYPE_DECIMAL &&
<ide> (isset($data['length']) || isset($data['precision']))
<ide> ) {
<ide> $out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')';
<ide> public function columnSql(TableSchema $schema, $name)
<ide> }
<ide>
<ide> if (isset($data['default']) &&
<del> in_array($data['type'], ['timestamp', 'datetime']) &&
<del> strtolower($data['default']) === 'current_timestamp') {
<add> in_array($data['type'], [TableSchema::TYPE_TIMESTAMP, TableSchema::TYPE_DATETIME]) &&
<add> strtolower($data['default']) === 'current_timestamp'
<add> ) {
<ide> $out .= ' DEFAULT CURRENT_TIMESTAMP';
<ide> } elseif (isset($data['default'])) {
<ide> $default = is_bool($data['default']) ? (int)$data['default'] : $this->_driver->schemaValue($data['default']); | 1 |
Text | Text | add missing changes to 1.2.16 release | cb6b976851b2114382cbd0d0ce1894eb4c49472f | <ide><path>CHANGELOG.md
<ide> to:
<ide> ## Bug Fixes
<ide>
<ide> - **$animate:**
<add> - ensure the CSS driver properly works with SVG elements
<add> ([38ea5426](https://github.com/angular/angular.js/commit/38ea542662b2b74703d583e3a637d65369fc26eb),
<add> [#6030](https://github.com/angular/angular.js/issues/6030))
<ide> - prevent cancellation timestamp from being too far in the future
<ide> ([35d635cb](https://github.com/angular/angular.js/commit/35d635cbcbdc20f304781655f3563111afa6567f),
<ide> [#6748](https://github.com/angular/angular.js/issues/6748))
<ide> to:
<ide> ([6e420ff2](https://github.com/angular/angular.js/commit/6e420ff28d9b3e76ac2c3598bf3797540ef8a1d3),
<ide> [#6932](https://github.com/angular/angular.js/issues/6932))
<ide> - **Scope:**
<add> - revert the __proto__ cleanup as that could cause regressions
<add> ([2db66f5b](https://github.com/angular/angular.js/commit/2db66f5b695a06cff62a52e55e55d1a0a25eec2f))
<ide> - more scope clean up on $destroy to minimize leaks
<ide> ([7e4e696e](https://github.com/angular/angular.js/commit/7e4e696ec3adf9d6fc77a7aa7e0909a9675fd43a),
<ide> [#6794](https://github.com/angular/angular.js/issues/6794), [#6856](https://github.com/angular/angular.js/issues/6856), [#6968](https://github.com/angular/angular.js/issues/6968)) | 1 |
Python | Python | add more type hints to podlauncher | b2045d6d1d4d2424c02d7d9b40520440aa4e5070 | <ide><path>airflow/providers/cncf/kubernetes/utils/pod_launcher.py
<ide> import math
<ide> import time
<ide> from datetime import datetime as dt
<del>from typing import Optional, Tuple, Union
<add>from typing import Iterable, Optional, Tuple, Union
<ide>
<ide> import pendulum
<ide> import tenacity
<ide> from kubernetes import client, watch
<add>from kubernetes.client.models.v1_event import V1Event
<add>from kubernetes.client.models.v1_event_list import V1EventList
<ide> from kubernetes.client.models.v1_pod import V1Pod
<ide> from kubernetes.client.rest import ApiException
<ide> from kubernetes.stream import stream as kubernetes_stream
<ide> from airflow.utils.state import State
<ide>
<ide>
<del>def should_retry_start_pod(exception: Exception):
<add>def should_retry_start_pod(exception: Exception) -> bool:
<ide> """Check if an Exception indicates a transient error and warrants retrying"""
<ide> if isinstance(exception, ApiException):
<ide> return exception.status == 409
<ide> def __init__(
<ide> self._watch = watch.Watch()
<ide> self.extract_xcom = extract_xcom
<ide>
<del> def run_pod_async(self, pod: V1Pod, **kwargs):
<add> def run_pod_async(self, pod: V1Pod, **kwargs) -> V1Pod:
<ide> """Runs POD asynchronously"""
<ide> pod_mutation_hook(pod)
<ide>
<ide> def run_pod_async(self, pod: V1Pod, **kwargs):
<ide> raise e
<ide> return resp
<ide>
<del> def delete_pod(self, pod: V1Pod):
<add> def delete_pod(self, pod: V1Pod) -> None:
<ide> """Deletes POD"""
<ide> try:
<ide> self._client.delete_namespaced_pod(
<ide> def delete_pod(self, pod: V1Pod):
<ide> reraise=True,
<ide> retry=tenacity.retry_if_exception(should_retry_start_pod),
<ide> )
<del> def start_pod(self, pod: V1Pod, startup_timeout: int = 120):
<add> def start_pod(self, pod: V1Pod, startup_timeout: int = 120) -> None:
<ide> """
<ide> Launches the pod synchronously and waits for completion.
<ide>
<ide> def parse_log_line(self, line: str) -> Tuple[Optional[Union[Date, Time, DateTime
<ide> return None, line
<ide> return last_log_time, message
<ide>
<del> def _task_status(self, event):
<add> def _task_status(self, event: V1Event) -> str:
<ide> self.log.info('Event: %s had an event of type %s', event.metadata.name, event.status.phase)
<ide> status = self.process_status(event.metadata.name, event.status.phase)
<ide> return status
<ide>
<del> def pod_not_started(self, pod: V1Pod):
<add> def pod_not_started(self, pod: V1Pod) -> bool:
<ide> """Tests if pod has not started"""
<ide> state = self._task_status(self.read_pod(pod))
<ide> return state == State.QUEUED
<ide>
<del> def pod_is_running(self, pod: V1Pod):
<add> def pod_is_running(self, pod: V1Pod) -> bool:
<ide> """Tests if pod is running"""
<ide> state = self._task_status(self.read_pod(pod))
<ide> return state not in (State.SUCCESS, State.FAILED)
<ide>
<del> def base_container_is_running(self, pod: V1Pod):
<add> def base_container_is_running(self, pod: V1Pod) -> bool:
<ide> """Tests if base container is running"""
<ide> event = self.read_pod(pod)
<ide> status = next(iter(filter(lambda s: s.name == 'base', event.status.container_statuses)), None)
<ide> def read_pod_logs(
<ide> tail_lines: Optional[int] = None,
<ide> timestamps: bool = False,
<ide> since_seconds: Optional[int] = None,
<del> ):
<add> ) -> Iterable[str]:
<ide> """Reads log from the POD"""
<ide> additional_kwargs = {}
<ide> if since_seconds:
<ide> def read_pod_logs(
<ide> raise
<ide>
<ide> @tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)
<del> def read_pod_events(self, pod):
<add> def read_pod_events(self, pod: V1Pod) -> V1EventList:
<ide> """Reads events from the POD"""
<ide> try:
<ide> return self._client.list_namespaced_event(
<ide> def read_pod_events(self, pod):
<ide> raise AirflowException(f'There was an error reading the kubernetes API: {e}')
<ide>
<ide> @tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_exponential(), reraise=True)
<del> def read_pod(self, pod: V1Pod):
<add> def read_pod(self, pod: V1Pod) -> V1Pod:
<ide> """Read POD information"""
<ide> try:
<ide> return self._client.read_namespaced_pod(pod.metadata.name, pod.metadata.namespace)
<ide> except BaseHTTPError as e:
<ide> raise AirflowException(f'There was an error reading the kubernetes API: {e}')
<ide>
<del> def _extract_xcom(self, pod: V1Pod):
<add> def _extract_xcom(self, pod: V1Pod) -> str:
<ide> resp = kubernetes_stream(
<ide> self._client.connect_get_namespaced_pod_exec,
<ide> pod.metadata.name,
<ide> def _extract_xcom(self, pod: V1Pod):
<ide> raise AirflowException(f'Failed to extract xcom from pod: {pod.metadata.name}')
<ide> return result
<ide>
<del> def _exec_pod_command(self, resp, command):
<add> def _exec_pod_command(self, resp, command: str) -> None:
<ide> if resp.is_open():
<ide> self.log.info('Running command... %s\n', command)
<ide> resp.write_stdin(command + '\n')
<ide> def _exec_pod_command(self, resp, command):
<ide> break
<ide> return None
<ide>
<del> def process_status(self, job_id, status):
<add> def process_status(self, job_id: str, status: str) -> str:
<ide> """Process status information for the JOB"""
<ide> status = status.lower()
<ide> if status == PodStatus.PENDING: | 1 |
Javascript | Javascript | upgrade tapable for compiler | 31e9625dfe2fa7a01fa3cc756b9b14d4ff62c7ea | <ide><path>lib/Compiler.js
<ide>
<ide> const path = require("path");
<ide> const util = require("util");
<del>const Tapable = require("tapable-old");
<add>const Tapable = require("tapable").Tapable;
<add>const SyncHook = require("tapable").SyncHook;
<add>const SyncBailHook = require("tapable").SyncBailHook;
<add>const AsyncParallelHook = require("tapable").AsyncParallelHook;
<add>const AsyncSeriesHook = require("tapable").AsyncSeriesHook;
<ide>
<ide> const Compilation = require("./Compilation");
<ide> const Stats = require("./Stats");
<ide> class Watching {
<ide> this.startTime = Date.now();
<ide> this.running = true;
<ide> this.invalid = false;
<del> this.compiler.applyPluginsAsync("watch-run", this.compiler, err => {
<add> this.compiler.hooks.watchRun.callAsync(this.compiler, err => {
<ide> if(err) return this._done(err);
<ide> const onCompiled = (err, compilation) => {
<ide> if(err) return this._done(err);
<ide> if(this.invalid) return this._done();
<ide>
<del> if(this.compiler.applyPluginsBailResult("should-emit", compilation) === false) {
<add> if(this.compiler.hooks.shouldEmit.call(compilation) === false) {
<ide> return this._done(null, compilation);
<ide> }
<ide>
<ide> class Watching {
<ide> const stats = new Stats(compilation);
<ide> stats.startTime = this.startTime;
<ide> stats.endTime = Date.now();
<del> this.compiler.applyPlugins("done", stats);
<add> this.compiler.hooks.done.call(stats);
<ide>
<del> this.compiler.applyPluginsAsync("additional-pass", err => {
<add> this.compiler.hooks.additionalPass.callAsync(err => {
<ide> if(err) return this._done(err);
<ide> this.compiler.compile(onCompiled);
<ide> });
<ide> class Watching {
<ide>
<ide> const stats = compilation ? this._getStats(compilation) : null;
<ide> if(err) {
<del> this.compiler.applyPlugins("failed", err);
<add> this.compiler.hooks.failed.call(err);
<ide> this.handler(err, stats);
<ide> return;
<ide> }
<ide>
<del> this.compiler.applyPlugins("done", stats);
<add> this.compiler.hooks.done.call(stats);
<ide> this.handler(null, stats);
<ide> if(!this.closed) {
<ide> this.watch(Array.from(compilation.fileDependencies), Array.from(compilation.contextDependencies), Array.from(compilation.missingDependencies));
<ide> class Watching {
<ide> this.compiler.contextTimestamps = contextTimestamps;
<ide> this.invalidate();
<ide> }, (fileName, changeTime) => {
<del> this.compiler.applyPlugins("invalid", fileName, changeTime);
<add> this.compiler.hooks.invalid.call(fileName, changeTime);
<ide> });
<ide> }
<ide>
<ide> class Watching {
<ide> if(this.running) {
<ide> this.invalid = true;
<ide> this._done = () => {
<del> this.compiler.applyPlugins("watch-close");
<add> this.compiler.hooks.watchClose.call();
<ide> callback();
<ide> };
<ide> } else {
<del> this.compiler.applyPlugins("watch-close");
<add> this.compiler.hooks.watchClose.call();
<ide> callback();
<ide> }
<ide> }
<ide> class Watching {
<ide> class Compiler extends Tapable {
<ide> constructor() {
<ide> super();
<add> this.hooks = {
<add> shouldEmit: new SyncBailHook(["compilation"]),
<add> done: new SyncHook(["stats"]),
<add> additionalPass: new AsyncSeriesHook([]),
<add> beforeRun: new AsyncSeriesHook(["compilation"]),
<add> run: new AsyncSeriesHook(["compilation"]),
<add> emit: new AsyncSeriesHook(["compilation"]),
<add> afterEmit: new AsyncSeriesHook(["compilation"]),
<add> thisCompilation: new SyncHook(["compilation", "params"]),
<add> compilation: new SyncHook(["compilation", "params"]),
<add> normalModuleFactory: new SyncHook(["normalModuleFactory"]),
<add> contextModuleFactory: new SyncHook(["contextModulefactory"]),
<add> beforeCompile: new AsyncSeriesHook(["params"]),
<add> compile: new SyncHook(["params"]),
<add> make: new AsyncParallelHook(["compilation"]),
<add> afterCompile: new AsyncSeriesHook(["compilation"]),
<add> watchRun: new AsyncSeriesHook(["compiler"]),
<add> failed: new SyncHook(["error"]),
<add> invalid: new SyncHook(["filename", "changeTime"]),
<add> watchClose: new SyncHook([]),
<add>
<add> // TODO the following hooks are weirdly located here
<add> // TODO move them for webpack 5
<add> environment: new SyncHook([]),
<add> afterEnvironment: new SyncHook([]),
<add> afterPlugins: new SyncHook(["compiler"]),
<add> afterResolvers: new SyncHook(["compiler"]),
<add> entryOption: new SyncBailHook(["context", "entry"]),
<add> };
<add> this._pluginCompat.tap("Compiler", options => {
<add> switch(options.name) {
<add> case "additional-pass":
<add> case "before-run":
<add> case "run":
<add> case "emit":
<add> case "after-emit":
<add> case "before-compile":
<add> case "make":
<add> case "after-compile":
<add> case "watch-run":
<add> options.async = true;
<add> break;
<add> }
<add> });
<add>
<ide> this.outputPath = "";
<ide> this.outputFileSystem = null;
<ide> this.inputFileSystem = null;
<ide> class Compiler extends Tapable {
<ide> const onCompiled = (err, compilation) => {
<ide> if(err) return callback(err);
<ide>
<del> if(this.applyPluginsBailResult("should-emit", compilation) === false) {
<add> if(this.hooks.shouldEmit.call(compilation) === false) {
<ide> const stats = new Stats(compilation);
<ide> stats.startTime = startTime;
<ide> stats.endTime = Date.now();
<del> this.applyPlugins("done", stats);
<add> this.hooks.done.call(stats);
<ide> return callback(null, stats);
<ide> }
<ide>
<ide> class Compiler extends Tapable {
<ide> const stats = new Stats(compilation);
<ide> stats.startTime = startTime;
<ide> stats.endTime = Date.now();
<del> this.applyPlugins("done", stats);
<add> this.hooks.done.call(stats);
<ide>
<del> this.applyPluginsAsync("additional-pass", err => {
<add> this.hooks.additionalPass.callAsync(err => {
<ide> if(err) return callback(err);
<ide> this.compile(onCompiled);
<ide> });
<ide> class Compiler extends Tapable {
<ide> const stats = new Stats(compilation);
<ide> stats.startTime = startTime;
<ide> stats.endTime = Date.now();
<del> this.applyPlugins("done", stats);
<add> this.hooks.done.call(stats);
<ide> return callback(null, stats);
<ide> });
<ide> });
<ide> };
<ide>
<del> this.applyPluginsAsync("before-run", this, err => {
<add> this.hooks.beforeRun.callAsync(this, err => {
<ide> if(err) return callback(err);
<ide>
<del> this.applyPluginsAsync("run", this, err => {
<add> this.hooks.run.callAsync(this, err => {
<ide> if(err) return callback(err);
<ide>
<ide> this.readRecords(err => {
<ide> class Compiler extends Tapable {
<ide> }, err => {
<ide> if(err) return callback(err);
<ide>
<del> this.applyPluginsAsyncSeries1("after-emit", compilation, err => {
<add> this.hooks.afterEmit.callAsync(compilation, err => {
<ide> if(err) return callback(err);
<ide>
<ide> return callback();
<ide> });
<ide> });
<ide> };
<ide>
<del> this.applyPluginsAsync("emit", compilation, err => {
<add> this.hooks.emit.callAsync(compilation, err => {
<ide> if(err) return callback(err);
<ide> outputPath = compilation.getPath(this.outputPath);
<ide> this.outputFileSystem.mkdirp(outputPath, emitFiles);
<ide> class Compiler extends Tapable {
<ide> if(Array.isArray(plugins)) {
<ide> plugins.forEach(plugin => childCompiler.apply(plugin));
<ide> }
<del> for(const name in this._plugins) {
<del> if(["make", "compile", "emit", "after-emit", "invalid", "done", "this-compilation"].indexOf(name) < 0)
<del> childCompiler._plugins[name] = this._plugins[name].slice();
<add> for(const name in this.hooks) {
<add> if(["make", "compile", "emit", "afterEmit", "invalid", "done", "thisCompilation"].indexOf(name) < 0) {
<add> if(childCompiler.hooks[name])
<add> childCompiler.hooks[name].taps = this.hooks[name].taps.slice();
<add> }
<ide> }
<ide> childCompiler.name = compilerName;
<ide> childCompiler.outputPath = this.outputPath;
<ide> class Compiler extends Tapable {
<ide> compilation.name = this.name;
<ide> compilation.records = this.records;
<ide> compilation.compilationDependencies = params.compilationDependencies;
<del> this.applyPlugins("this-compilation", compilation, params);
<del> this.applyPlugins("compilation", compilation, params);
<add> this.hooks.thisCompilation.call(compilation, params);
<add> this.hooks.compilation.call(compilation, params);
<ide> return compilation;
<ide> }
<ide>
<ide> createNormalModuleFactory() {
<ide> const normalModuleFactory = new NormalModuleFactory(this.options.context, this.resolverFactory, this.options.module || {});
<del> this.applyPlugins("normal-module-factory", normalModuleFactory);
<add> this.hooks.normalModuleFactory.call(normalModuleFactory);
<ide> return normalModuleFactory;
<ide> }
<ide>
<ide> createContextModuleFactory() {
<ide> const contextModuleFactory = new ContextModuleFactory(this.resolverFactory, this.inputFileSystem);
<del> this.applyPlugins("context-module-factory", contextModuleFactory);
<add> this.hooks.contextModuleFactory.call(contextModuleFactory);
<ide> return contextModuleFactory;
<ide> }
<ide>
<ide> class Compiler extends Tapable {
<ide>
<ide> compile(callback) {
<ide> const params = this.newCompilationParams();
<del> this.applyPluginsAsync("before-compile", params, err => {
<add> this.hooks.beforeCompile.callAsync(params, err => {
<ide> if(err) return callback(err);
<ide>
<del> this.applyPlugins("compile", params);
<add> this.hooks.compile.call(params);
<ide>
<ide> const compilation = this.newCompilation(params);
<ide>
<del> this.applyPluginsParallel("make", compilation, err => {
<add> this.hooks.make.callAsync(compilation, err => {
<ide> if(err) return callback(err);
<ide>
<ide> compilation.finish();
<ide>
<ide> compilation.seal(err => {
<ide> if(err) return callback(err);
<ide>
<del> this.applyPluginsAsync("after-compile", compilation, err => {
<add> this.hooks.afterCompile.callAsync(compilation, err => {
<ide> if(err) return callback(err);
<ide>
<ide> return callback(null, compilation);
<ide><path>lib/WebpackOptionsApply.js
<ide> class WebpackOptionsApply extends OptionsApply {
<ide> );
<ide>
<ide> compiler.apply(new EntryOptionPlugin());
<del> compiler.applyPluginsBailResult("entry-option", options.context, options.entry);
<add> compiler.hooks.entryOption.call(options.context, options.entry);
<ide>
<ide> compiler.apply(
<ide> new CompatibilityPlugin(),
<ide> class WebpackOptionsApply extends OptionsApply {
<ide> compiler.apply(new CachePlugin(typeof options.cache === "object" ? options.cache : null));
<ide> }
<ide>
<del> compiler.applyPlugins("after-plugins", compiler);
<add> compiler.hooks.afterPlugins.call(compiler);
<ide> if(!compiler.inputFileSystem) throw new Error("No input filesystem provided");
<ide> compiler.resolverFactory.plugin("resolve-options normal", resolveOptions => {
<ide> return Object.assign({
<ide> class WebpackOptionsApply extends OptionsApply {
<ide> fileSystem: compiler.inputFileSystem
<ide> }, options.resolveLoader, resolveOptions);
<ide> });
<del> compiler.applyPlugins("after-resolvers", compiler);
<add> compiler.hooks.afterResolvers.call(compiler);
<ide> return options;
<ide> }
<ide> }
<ide><path>lib/webpack.js
<ide> const webpack = (options, callback) => {
<ide> if(options.plugins && Array.isArray(options.plugins)) {
<ide> compiler.apply.apply(compiler, options.plugins);
<ide> }
<del> compiler.applyPlugins("environment");
<del> compiler.applyPlugins("after-environment");
<add> compiler.hooks.environment.call();
<add> compiler.hooks.afterEnvironment.call();
<ide> compiler.options = new WebpackOptionsApply().process(options, compiler);
<ide> } else {
<ide> throw new Error("Invalid argument: options"); | 3 |
PHP | PHP | use table name as default for morph map | cf2a9386b31b28019f744c66ba995ee6ae149aff | <ide><path>src/Illuminate/Database/Eloquent/Relations/Relation.php
<ide> namespace Illuminate\Database\Eloquent\Relations;
<ide>
<ide> use Closure;
<add>use Illuminate\Support\Arr;
<ide> use Illuminate\Database\Eloquent\Model;
<ide> use Illuminate\Database\Eloquent\Builder;
<ide> use Illuminate\Database\Query\Expression;
<ide> public function wrap($value)
<ide> */
<ide> public static function morphMap(array $map = null, $merge = true)
<ide> {
<add> $map = static::buildMorphMapFromModels($map);
<add>
<ide> if (is_array($map)) {
<ide> static::$morphMap = $merge ? array_merge(static::$morphMap, $map) : $map;
<ide> }
<ide>
<ide> return static::$morphMap;
<ide> }
<ide>
<add> /**
<add> * Builds a table-keyed array from model class names.
<add> *
<add> * @param string[]|null $models
<add> * @return array|null
<add> */
<add> protected static function buildMorphMapFromModels(array $models = null)
<add> {
<add> if (is_null($models) || Arr::isAssoc($models)) {
<add> return $models;
<add> }
<add>
<add> $tables = array_map(function ($model) {
<add> return (new $model)->getTable();
<add> }, $models);
<add>
<add> return array_combine($tables, $models);
<add> }
<add>
<ide> /**
<ide> * Handle dynamic method calls to the relationship.
<ide> *
<ide><path>tests/Database/DatabaseEloquentRelationTest.php
<ide> use Illuminate\Database\Eloquent\Model;
<ide> use Illuminate\Database\Eloquent\Builder;
<ide> use Illuminate\Database\Eloquent\Relations\HasOne;
<add>use Illuminate\Database\Eloquent\Relations\Relation;
<ide> use Illuminate\Database\Query\Builder as QueryBuilder;
<ide>
<ide> class DatabaseEloquentRelationTest extends PHPUnit_Framework_TestCase
<ide> public function testTouchMethodUpdatesRelatedTimestamps()
<ide> $relation->touch();
<ide> }
<ide>
<add> public function testSettingMorphMapWithNumericArrayUsesTheTableNames()
<add> {
<add> Relation::morphMap([EloquentRelationResetModelStub::class]);
<add>
<add> $this->assertEquals([
<add> 'reset' => 'EloquentRelationResetModelStub',
<add> ], Relation::morphMap());
<add>
<add> Relation::morphMap([], false);
<add> }
<add>
<ide> /**
<ide> * Testing to ensure loop does not occur during relational queries in global scopes.
<ide> *
<ide> public function testDonNotRunParentModelGlobalScopes()
<ide>
<ide> class EloquentRelationResetModelStub extends Model
<ide> {
<del> //Override method call which would normally go through __call()
<add> protected $table = 'reset';
<add>
<add> // Override method call which would normally go through __call()
<ide>
<ide> public function getQuery()
<ide> { | 2 |
Text | Text | fix minor typo in readme.md | 56e20b4ab5899127b67b4a31cfd7b4bf1fc79616 | <ide><path>README.md
<ide> The process to build `react.js` is built entirely on top of node.js, using many
<ide> #### Prerequisites
<ide>
<ide> * You have `node` installed at v4.0.0+ and `npm` at v2.0.0+.
<del>* You have `gcc` installed or are comfortable installing a compiler if needed. Some of our `npm` dependencies may require a compliation step. On OS X, the Xcode Command Line Tools will cover this. On Ubuntu, `apt-get install build-essential` will install the required packages. Similar commands should work on other Linux distros. Windows will require some additional steps, see the [`node-gyp` installation instructions](https://github.com/nodejs/node-gyp#installation) for details.
<add>* You have `gcc` installed or are comfortable installing a compiler if needed. Some of our `npm` dependencies may require a compilation step. On OS X, the Xcode Command Line Tools will cover this. On Ubuntu, `apt-get install build-essential` will install the required packages. Similar commands should work on other Linux distros. Windows will require some additional steps, see the [`node-gyp` installation instructions](https://github.com/nodejs/node-gyp#installation) for details.
<ide> * You are familiar with `npm` and know whether or not you need to use `sudo` when installing packages globally.
<ide> * You are familiar with `git`.
<ide> | 1 |
Javascript | Javascript | remove socket ondata/onend in parser cleanup | 0a414f4caad3430b4d73a69f54345245e1fad016 | <ide><path>lib/http.js
<ide> ClientRequest.prototype.onSocket = function(socket) {
<ide> var freeParser = function() {
<ide> if (parser) {
<ide> parsers.free(parser);
<add> parser.socket.onend = null;
<add> parser.socket.ondata = null;
<add> parser.socket = null;
<ide> parser = null;
<ide> }
<ide> }; | 1 |
Javascript | Javascript | add node support in threads | d69078884b2f0401033c56f64dd6918184b594a1 | <ide><path>src/main-process/atom-window.js
<ide> module.exports = class AtomWindow extends EventEmitter {
<ide> // (Ref: https://github.com/atom/atom/pull/12696#issuecomment-290496960)
<ide> disableBlinkFeatures: 'Auxclick',
<ide> nodeIntegration: true,
<del> webviewTag: true
<add> webviewTag: true,
<add>
<add> // node support in threads
<add> nodeIntegrationInWorker: true
<ide> },
<ide> simpleFullscreen: this.getSimpleFullscreen()
<ide> }; | 1 |
Python | Python | make prettier e-mails on failure | 3c2797a9ef892852b4a9a4bdf1bbc1c76ffda2cf | <ide><path>celery/worker.py
<ide> from celery.registry import tasks
<ide> from celery.pool import TaskPool
<ide> from celery.datastructures import ExceptionInfo
<del>from celery.models import PeriodicTaskMeta
<ide> from celery.backends import default_backend, default_periodic_status_backend
<ide> from celery.timer import EventTimer
<ide> from django.core.mail import mail_admins
<ide> import multiprocessing
<del>import simplejson
<ide> import traceback
<ide> import logging
<add>import socket
<ide> import time
<ide> import sys
<ide>
<add>TASK_FAIL_EMAIL_BODY = """
<add>Task %(name)s with id %(id)s raised exception: %(exc)s
<add>
<add>The contents of the full traceback was:
<add>
<add>%(traceback)s
<add>
<add>--
<add>Just thought I'd let you know!
<add>celeryd at %(hostname)s.
<add>"""
<add>
<ide>
<ide> class EmptyQueue(Exception):
<ide> """The message queue is currently empty."""
<ide> class TaskWrapper(object):
<ide> Mapping of keyword arguments to apply to the task.
<ide>
<ide> """
<del> done_msg = "Task %(name)s[%(id)s] processed: %(return_value)s"
<add> success_msg = "Task %(name)s[%(id)s] processed: %(return_value)s"
<add> fail_msg = """
<add> Task %(name)s[%(id)s] raised exception: %(exc)s\n%(traceback)s
<add> """
<add> fail_email_subject = """
<add> [celery@%(hostname)s] Error: Task %(name)s (%(id)s): %(exc)s
<add> """
<add> fail_email_body = TASK_FAIL_EMAIL_BODY
<add>
<ide>
<ide> def __init__(self, task_name, task_id, task_func, args, kwargs, **opts):
<ide> self.task_name = task_name
<ide> def execute(self, loglevel=None, logfile=None):
<ide> self.task_func, self.args, task_func_kwargs])
<ide>
<ide> def on_success(self, ret_value, meta):
<add> """The handler used if the task was successfully processed (
<add> without raising an exception)."""
<ide> task_id = meta.get("task_id")
<ide> task_name = meta.get("task_name")
<del> msg = self.done_msg % {
<add> msg = self.success_msg.strip() % {
<ide> "id": task_id,
<ide> "name": task_name,
<ide> "return_value": ret_value}
<ide> self.logger.info(msg)
<ide>
<del> def on_failure(self, ret_value, meta):
<add> def on_failure(self, exc_info, meta):
<add> """The handler used if the task raised an exception."""
<ide> task_id = meta.get("task_id")
<ide> task_name = meta.get("task_name")
<del> msg = self.done_msg % {
<del> "id": task_id,
<del> "name": task_name,
<del> "return_value": ret_value}
<del> self.logger.error(msg)
<add> context = {
<add> "hostname": socket.gethostname(),
<add> "id": task_id,
<add> "name": task_name,
<add> "exc": exc_info.exception,
<add> "traceback": exc_info.traceback
<add> }
<add> self.logger.error(self.fail_msg.strip() % context)
<add>
<ide> if SEND_CELERY_TASK_ERROR_EMAILS:
<del> mail_admins(msg, ret_value.traceback, fail_silently=True)
<add> subject = self.fail_email_subject.strip() % context
<add> body = self.fail_email_body.strip() % context
<add> mail_admins(subject, body, fail_silently=True)
<ide>
<ide> def execute_using_pool(self, pool, loglevel=None, logfile=None):
<ide> """Like :meth:`execute`, but using the :mod:`multiprocessing` pool.
<ide> def fetch_next_task(self):
<ide> self.logger.info("Got task from broker: %s[%s]" % (
<ide> task.task_name, task.task_id))
<ide>
<del> return task, message
<add> return task
<ide>
<ide> def execute_next_task(self):
<ide> """Execute the next task on the queue using the multiprocessing pool.
<ide> def execute_next_task(self):
<ide>
<ide> """
<ide> self.logger.debug("Trying to fetch a task.")
<del> task, message = self.fetch_next_task()
<add> task = self.fetch_next_task()
<ide> self.logger.debug("Got a task: %s. Trying to execute it..." % task)
<ide>
<ide> result = task.execute_using_pool(self.pool, self.loglevel,
<ide> self.logfile)
<ide>
<ide> self.logger.debug("Task %s has been executed asynchronously." % task)
<ide>
<del> return result, task.task_name, task.task_id
<add> return result
<ide>
<ide> def run_periodic_tasks(self):
<ide> """Schedule all waiting periodic tasks for execution.
<ide> def run(self):
<ide> while True:
<ide> [event.tick() for event in events]
<ide> try:
<del> result, task_name, task_id = self.execute_next_task()
<add> self.execute_next_task()
<ide> except ValueError:
<ide> # execute_next_task didn't return a r/name/id tuple,
<ide> # probably because it got an exception.
<ide> def run(self):
<ide> ev_msg_waiting.tick()
<ide> time.sleep(self.queue_wakeup_after)
<ide> continue
<del> except UnknownTask, e:
<del> self.logger.info("Unknown task ignored: %s" % (e))
<add> except UnknownTask, exc:
<add> self.logger.info("Unknown task ignored: %s" % (exc))
<ide> continue
<del> except Exception, e:
<add> except Exception, exc:
<ide> self.logger.critical("Message queue raised %s: %s\n%s" % (
<del> e.__class__, e, traceback.format_exc()))
<add> exc.__class__, exc, traceback.format_exc()))
<ide> continue | 1 |
Ruby | Ruby | set the path on "fake" install receipts | 22cf99094f7944de1c7989235c628c599dc760c7 | <ide><path>Library/Homebrew/tab.rb
<ide> def self.dummy_tab f=nil
<ide> :stdlib => nil,
<ide> :compiler => "clang",
<ide> :source => {
<del> :path => nil,
<add> :path => f ? f.path.to_s : nil,
<ide> },
<ide> }
<ide> | 1 |
Javascript | Javascript | remove unneeded html5mock | c4b4ebea4a1679f4148a5f314d6c54c9b564170b | <ide><path>test/unit/player.js
<ide> test('should honor default inactivity timeout', function() {
<ide>
<ide> // default timeout is 2000ms
<ide> player = PlayerTest.makePlayer({});
<del> html5Mock = { player_: player };
<del>
<del> vjs.Html5.prototype.createEl.call(html5Mock);
<ide>
<ide> equal(player.userActive(), true, 'User is active on creation');
<ide> clock.tick(1800);
<ide> test('should honor configured inactivity timeout', function() {
<ide> player = PlayerTest.makePlayer({
<ide> 'inactivityTimeout': 200
<ide> });
<del> html5Mock = { player_: player };
<del>
<del> vjs.Html5.prototype.createEl.call(html5Mock);
<ide>
<ide> equal(player.userActive(), true, 'User is active on creation');
<ide> clock.tick(150);
<ide> test('should honor disabled inactivity timeout', function() {
<ide> player = PlayerTest.makePlayer({
<ide> 'inactivityTimeout': 0
<ide> });
<del> html5Mock = { player_: player };
<del>
<del> vjs.Html5.prototype.createEl.call(html5Mock);
<ide>
<ide> equal(player.userActive(), true, 'User is active on creation');
<ide> clock.tick(5000); | 1 |
Javascript | Javascript | create an ember subclass of morph | 13ff979099826cf89838776b4fd110559609e6c3 | <ide><path>packages/ember-application/lib/system/application.js
<ide> import EnumerableUtils from "ember-metal/enumerable_utils";
<ide> import ObjectController from "ember-runtime/controllers/object_controller";
<ide> import ArrayController from "ember-runtime/controllers/array_controller";
<ide> import Renderer from "ember-metal-views/renderer";
<del>import DOMHelper from "dom-helper";
<add>import DOMHelper from "ember-htmlbars/system/dom-helper";
<ide> import SelectView from "ember-views/views/select";
<ide> import { OutletView } from "ember-routing-views/views/outlet";
<ide> import EmberView from "ember-views/views/view";
<ide><path>packages/ember-htmlbars/lib/env.js
<ide> import environment from "ember-metal/environment";
<ide>
<del>import DOMHelper from "dom-helper";
<del>
<ide> import { hooks } from "htmlbars-runtime";
<ide> import merge from "ember-metal/merge";
<ide>
<ide> import invokeHelper from "ember-htmlbars/hooks/invoke-helper";
<ide> import helpers from "ember-htmlbars/helpers";
<ide> import keywords, { registerKeyword } from "ember-htmlbars/keywords";
<ide>
<add>import DOMHelper from "ember-htmlbars/system/dom-helper";
<add>
<ide> var emberHooks = merge({}, hooks);
<ide> emberHooks.keywords = keywords;
<ide>
<ide><path>packages/ember-htmlbars/lib/hooks/cleanup-render-node.js
<ide> */
<ide>
<ide> export default function cleanupRenderNode(renderNode) {
<del> var state = renderNode.state;
<del> if (!state) { return; }
<del>
<del> if (state.view) {
<del> var view = state.view;
<del> view.destroy();
<del> }
<del>
<del> if (state.toDestroy) {
<del> var toDestroy = state.toDestroy;
<del>
<del> for (var i=0, l=toDestroy.length; i<l; i++) {
<del> toDestroy[i].destroy();
<del> }
<del>
<del> state.toDestroy = [];
<del> }
<add> if (renderNode.cleanup) { renderNode.cleanup(); }
<ide> }
<ide><path>packages/ember-htmlbars/lib/hooks/link-render-node.js
<ide> import { isArray } from "ember-metal/utils";
<ide> import { chain, read, isStream, addDependency } from "ember-metal/streams/utils";
<ide>
<ide> export default function linkRenderNode(renderNode, env, scope, path, params, hash) {
<del> if (renderNode.state.unsubscribers) {
<add> if (renderNode.streamUnsubscribers) {
<ide> return true;
<ide> }
<ide>
<ide><path>packages/ember-htmlbars/lib/keywords/outlet.js
<ide> export default {
<ide>
<ide> rerender: function(morph, env, scope, params, hash, template, inverse, visitor) {
<ide> var newEnv = env;
<del> if (morph.state.view) {
<add> if (morph.emberView) {
<ide> newEnv = merge({}, env);
<del> newEnv.view = morph.state.view;
<add> newEnv.view = morph.emberView;
<ide> }
<ide> },
<ide>
<ide><path>packages/ember-htmlbars/lib/keywords/view.js
<ide> export default {
<ide> var view = hash.view = viewInstance(node.state.viewClassOrInstance);
<ide> parentView.linkChild(view);
<ide>
<del> state.view = view;
<add> node.emberView = view;
<ide>
<ide> var options = { component: view, layout: null };
<ide> var componentNode = ComponentNode.create(node, env, hash, options, parentView, null, scope, template);
<ide><path>packages/ember-htmlbars/lib/keywords/with.js
<ide> export default {
<ide>
<ide> params[0] = controllerInstance;
<ide> state.controller = controllerInstance;
<del> state.toDestroy = [state.controller];
<del>
<ide> }
<ide> },
<ide>
<ide> export default {
<ide> },
<ide>
<ide> render: function(morph, env, scope, params, hash, template, inverse, visitor) {
<add> if (morph.state.controller) { morph.addDestruction(morph.state.controller); }
<add>
<ide> Ember.assert(
<ide> "{{#with foo}} must be called with a single argument or the use the " +
<ide> "{{#with foo as bar}} syntax",
<ide><path>packages/ember-htmlbars/lib/morphs/morph.js
<add>import DOMHelper from "dom-helper";
<add>import o_create from 'ember-metal/platform/create';
<add>
<add>var HTMLBarsMorph = DOMHelper.prototype.MorphClass;
<add>
<add>function EmberMorph(DOMHelper, contextualElement) {
<add> this.HTMLBarsMorph$constructor(DOMHelper, contextualElement);
<add>
<add> this.emberView = null;
<add> this.emberComponent = null;
<add> this.emberToDestroy = null;
<add> this.streamUnsubscribers = null;
<add> this.shouldReceiveAttrs = false;
<add>}
<add>
<add>var proto = EmberMorph.prototype = o_create(HTMLBarsMorph.prototype);
<add>proto.HTMLBarsMorph$constructor = HTMLBarsMorph;
<add>
<add>proto.addDestruction = function(toDestroy) {
<add> this.emberToDestroy = this.emberToDestroy || [];
<add> this.emberToDestroy.push(toDestroy);
<add>};
<add>
<add>proto.cleanup = function() {
<add> if (this.emberView) {
<add> this.emberView.destroy();
<add> }
<add>
<add> var toDestroy = this.emberToDestroy;
<add> if (toDestroy) {
<add> for (var i=0, l=toDestroy.length; i<l; i++) {
<add> toDestroy[i].destroy();
<add> }
<add>
<add> this.emberToDestroy = null;
<add> }
<add>};
<add>
<add>export default EmberMorph;
<ide><path>packages/ember-htmlbars/lib/system/component-node.js
<ide> ComponentNode.prototype.rerender = function(env, attrs, visitor) {
<ide> // Notify component that it has become dirty and is about to change.
<ide> env.renderer.willUpdate(component, snapshot);
<ide>
<del> if (component.renderNode.state.shouldReceiveAttrs) {
<add> if (component.renderNode.shouldReceiveAttrs) {
<ide> env.renderer.updateAttrs(component, snapshot);
<del> component.renderNode.state.shouldReceiveAttrs = false;
<add> component.renderNode.shouldReceiveAttrs = false;
<ide> }
<ide>
<ide> env.renderer.willRender(component);
<ide> export function createOrUpdateComponent(component, options, renderNode) {
<ide> }
<ide>
<ide> component.renderNode = renderNode;
<del> renderNode.state.component = component;
<del> renderNode.state.view = component;
<add> renderNode.emberComponent = component;
<add> renderNode.emberView = component;
<ide> return component;
<ide> }
<ide>
<ide><path>packages/ember-htmlbars/lib/system/dom-helper.js
<add>import DOMHelper from "dom-helper";
<add>import EmberMorph from "ember-htmlbars/morphs/morph";
<add>import o_create from 'ember-metal/platform/create';
<add>
<add>function EmberDOMHelper(_document) {
<add> DOMHelper.call(this, _document);
<add>}
<add>
<add>var proto = EmberDOMHelper.prototype = o_create(DOMHelper.prototype);
<add>proto.MorphClass = EmberMorph;
<add>
<add>export default EmberDOMHelper;
<ide><path>packages/ember-htmlbars/lib/utils/subscribe.js
<ide> import { isStream } from "ember-metal/streams/utils";
<ide> export default function subscribe(node, scope, stream) {
<ide> if (!isStream(stream)) { return; }
<ide> var component = scope.component;
<del> var unsubscribers = node.state.unsubscribers = node.state.unsubscribers || [];
<add> var unsubscribers = node.streamUnsubscribers = node.streamUnsubscribers || [];
<ide>
<ide> unsubscribers.push(stream.subscribe(function() {
<ide> node.isDirty = true;
<ide> export default function subscribe(node, scope, stream) {
<ide> }
<ide>
<ide> if (node.state.componentNode) {
<del> node.state.shouldReceiveAttrs = true;
<add> node.shouldReceiveAttrs = true;
<ide> }
<ide>
<del> node.ownerNode.state.view.scheduleRevalidate();
<add> node.ownerNode.emberView.scheduleRevalidate();
<ide> }));
<ide> }
<ide><path>packages/ember-metal-views/lib/renderer.js
<del>import DOMHelper from "dom-helper";
<del>import environment from "ember-metal/environment";
<ide> import run from "ember-metal/run_loop";
<ide> import { get } from "ember-metal/property_get";
<ide> import { set } from "ember-metal/property_set";
<ide> import {
<ide> } from "ember-metal/instrumentation";
<ide> import buildComponentTemplate from "ember-views/system/build-component-template";
<ide>
<del>var domHelper = environment.hasDOM ? new DOMHelper() : null;
<del>
<del>function Renderer(_helper, _destinedForDOM) {
<del> this._dom = _helper || domHelper;
<add>function Renderer(_helper) {
<add> this._dom = _helper;
<ide> }
<ide>
<ide> Renderer.prototype.renderTopLevelView =
<ide> function Renderer_renderTopLevelView(view, renderNode) {
<del> view.ownerView = renderNode.state.view = view;
<add> view.ownerView = renderNode.emberView = view;
<ide> view.renderNode = renderNode;
<ide>
<ide> var template = get(view, 'layout') || get(view, 'template');
<ide><path>packages/ember-views/lib/main.js
<ide> import {
<ide> getViewBoundingClientRect
<ide> } from "ember-views/system/utils";
<ide> import RenderBuffer from "ember-views/system/render_buffer";
<del>import DOMHelper from "dom-helper";
<ide> import "ember-views/system/ext"; // for the side effect of extending Ember.run.queues
<ide> import {
<ide> cloneStates,
<ide> Ember.CoreView = DeprecatedCoreView;
<ide> Ember.View = View;
<ide> Ember.View.states = states;
<ide> Ember.View.cloneStates = cloneStates;
<del>Ember.View.DOMHelper = DOMHelper;
<ide> Ember.Checkbox = Checkbox;
<ide> Ember.TextField = TextField;
<ide> Ember.TextArea = TextArea;
<ide><path>packages/ember-views/lib/views/core_view.js
<ide> import Renderer from "ember-metal-views/renderer";
<del>import DOMHelper from "dom-helper";
<ide>
<ide> import {
<ide> cloneStates,
<ide> var CoreView = EmberObject.extend(Evented, ActionHandler, {
<ide> // Fallback for legacy cases where the view was created directly
<ide> // via `create()` instead of going through the container.
<ide> if (!this.renderer) {
<add> var DOMHelper = domHelper();
<ide> renderer = renderer || new Renderer(new DOMHelper());
<ide> this.renderer = renderer;
<ide> }
<ide> export var DeprecatedCoreView = CoreView.extend({
<ide> }
<ide> });
<ide>
<add>var _domHelper;
<add>function domHelper() {
<add> return _domHelper = _domHelper || Ember.__loader.require("ember-htmlbars/system/dom-helper")['default'];
<add>}
<add>
<ide> export default CoreView;
<ide><path>packages/ember-views/lib/views/states/has_element.js
<ide> merge(hasElement, {
<ide> renderNode.isDirty = true;
<ide> internal.visitChildren(renderNode.childNodes, function(node) {
<ide> if (node.state.componentNode) {
<del> node.state.shouldReceiveAttrs = true;
<add> node.shouldReceiveAttrs = true;
<ide> }
<ide> node.isDirty = true;
<ide> });
<del> renderNode.ownerNode.state.view.scheduleRevalidate();
<add> renderNode.ownerNode.emberView.scheduleRevalidate();
<ide> },
<ide>
<ide> // once the view is already in the DOM, destroying it removes it | 15 |
PHP | PHP | remove unneeded class | b9742ff9b9d6a24291d882a7e721a6b7841e85bd | <ide><path>src/Error/PHP7ErrorException.php
<del><?php
<del>declare(strict_types=1);
<del>/**
<del> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<del> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<del> *
<del> * Licensed under The MIT License
<del> * Redistributions of files must retain the above copyright notice.
<del> *
<del> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<del> * @since 3.1.5
<del> * @license https://opensource.org/licenses/mit-license.php MIT License
<del> */
<del>namespace Cake\Error;
<del>
<del>use Exception;
<del>
<del>/**
<del> * Wraps a PHP 7 Error object inside a normal Exception
<del> * so it can be handled correctly by the rest of the
<del> * error handling system
<del> */
<del>class PHP7ErrorException extends Exception
<del>{
<del> /**
<del> * The wrapped error object
<del> *
<del> * @var \Error
<del> */
<del> protected $_error;
<del>
<del> /**
<del> * Wraps the passed Error class
<del> *
<del> * @param \Error $error the Error object
<del> */
<del> public function __construct($error)
<del> {
<del> $this->_error = $error;
<del> $this->message = $error->getMessage();
<del> $this->code = $error->getCode();
<del> $this->file = $error->getFile();
<del> $this->line = $error->getLine();
<del> $msg = sprintf(
<del> '(%s) - %s in %s on %s',
<del> get_class($error),
<del> $this->message,
<del> $this->file ?: 'null',
<del> $this->line ?: 'null'
<del> );
<del> parent::__construct($msg, $this->code, $error->getPrevious());
<del> }
<del>
<del> /**
<del> * Returns the wrapped error object
<del> *
<del> * @return \Error
<del> */
<del> public function getError()
<del> {
<del> return $this->_error;
<del> }
<del>} | 1 |
Ruby | Ruby | remove unused `engine` | a0bebf352629010103ff7e3cc003ce69a2d9b2df | <ide><path>lib/arel/tree_manager.rb
<ide> module Arel
<ide> class TreeManager
<ide> include Arel::FactoryMethods
<ide>
<del> attr_reader :ast, :engine
<add> attr_reader :ast
<ide>
<ide> attr_accessor :bind_values
<ide>
<ide><path>test/test_select_manager.rb
<ide> def test_manager_stores_bind_values
<ide> table = Table.new(:users)
<ide> manager = Arel::SelectManager.new table
<ide> manager.project Nodes::SqlLiteral.new '*'
<del> m2 = Arel::SelectManager.new(manager.engine)
<add> m2 = Arel::SelectManager.new
<ide> m2.project manager.exists
<ide> m2.to_sql.must_be_like %{ SELECT EXISTS (#{manager.to_sql}) }
<ide> end
<ide> def test_manager_stores_bind_values
<ide> table = Table.new(:users)
<ide> manager = Arel::SelectManager.new table
<ide> manager.project Nodes::SqlLiteral.new '*'
<del> m2 = Arel::SelectManager.new(manager.engine)
<add> m2 = Arel::SelectManager.new
<ide> m2.project manager.exists.as('foo')
<ide> m2.to_sql.must_be_like %{ SELECT EXISTS (#{manager.to_sql}) AS foo }
<ide> end | 2 |
Python | Python | fix ambiguous assert | e39cb02e227e168f8b3b55c455820c47e2d6c4c1 | <ide><path>numpy/lib/tests/test_io.py
<ide> def test_array(self):
<ide> c = StringIO.StringIO()
<ide> np.savetxt(c, a)
<ide> c.seek(0)
<del> assert(c.readlines(),
<add> assert(c.readlines() ==
<ide> ['1.000000000000000000e+00 2.000000000000000000e+00\n',
<ide> '3.000000000000000000e+00 4.000000000000000000e+00\n'])
<ide> | 1 |
Python | Python | improve worst case of ma.clump_masked | 02fc99244721145896f8f17ec41cdc64567419ef | <ide><path>numpy/ma/extras.py
<ide> def _ezclump(mask):
<ide>
<ide> Returns a series of slices.
<ide> """
<del> #def clump_masked(a):
<ide> if mask.ndim > 1:
<ide> mask = mask.ravel()
<ide> idx = (mask[1:] ^ mask[:-1]).nonzero()
<ide> idx = idx[0] + 1
<del> slices = [slice(left, right)
<del> for (left, right) in zip(itertools.chain([0], idx),
<del> itertools.chain(idx, [len(mask)]),)]
<del> return slices
<add>
<add> if mask[0]:
<add> if len(idx) == 0:
<add> return [slice(0, mask.size)]
<add>
<add> r = [slice(0, idx[0])]
<add> r.extend((slice(left, right)
<add> for left, right in zip(idx[1:-1:2], idx[2::2])))
<add> else:
<add> if len(idx) == 0:
<add> return []
<add>
<add> r = [slice(left, right) for left, right in zip(idx[:-1:2], idx[1::2])]
<add>
<add> if mask[-1]:
<add> r.append(slice(idx[-1], mask.size))
<add> return r
<ide>
<ide>
<ide> def clump_unmasked(a):
<ide> def clump_unmasked(a):
<ide> mask = getattr(a, '_mask', nomask)
<ide> if mask is nomask:
<ide> return [slice(0, a.size)]
<del> slices = _ezclump(mask)
<del> if a[0] is masked:
<del> result = slices[1::2]
<del> else:
<del> result = slices[::2]
<del> return result
<add> return _ezclump(~mask)
<ide>
<ide>
<ide> def clump_masked(a):
<ide> def clump_masked(a):
<ide> mask = ma.getmask(a)
<ide> if mask is nomask:
<ide> return []
<del> slices = _ezclump(mask)
<del> if len(slices):
<del> if a[0] is masked:
<del> slices = slices[::2]
<del> else:
<del> slices = slices[1::2]
<del> return slices
<add> return _ezclump(mask)
<ide>
<ide>
<ide> ###############################################################################
<ide><path>numpy/ma/tests/test_extras.py
<ide> def test_masked_all_like(self):
<ide> test = masked_all_like(control)
<ide> assert_equal(test, control)
<ide>
<add> def check_clump(self, f):
<add> for i in range(1, 7):
<add> for j in range(2**i):
<add> k = np.arange(i, dtype=int)
<add> ja = np.full(i, j, dtype=int)
<add> a = masked_array(2**k)
<add> a.mask = (ja & (2**k)) != 0
<add> s = 0
<add> for sl in f(a):
<add> s += a.data[sl].sum()
<add> if f == clump_unmasked:
<add> assert_equal(a.compressed().sum(), s)
<add> else:
<add> a.mask = ~a.mask
<add> assert_equal(a.compressed().sum(), s)
<add>
<ide> def test_clump_masked(self):
<ide> # Test clump_masked
<ide> a = masked_array(np.arange(10))
<ide> def test_clump_masked(self):
<ide> control = [slice(0, 3), slice(6, 7), slice(8, 10)]
<ide> assert_equal(test, control)
<ide>
<add> self.check_clump(clump_masked)
<add>
<ide> def test_clump_unmasked(self):
<ide> # Test clump_unmasked
<ide> a = masked_array(np.arange(10))
<ide> def test_clump_unmasked(self):
<ide> control = [slice(3, 6), slice(7, 8), ]
<ide> assert_equal(test, control)
<ide>
<add> self.check_clump(clump_unmasked)
<add>
<ide> def test_flatnotmasked_contiguous(self):
<ide> # Test flatnotmasked_contiguous
<ide> a = arange(10) | 2 |
PHP | PHP | replace wrong comment | 00b531913ac4edfe82eb47982ef9240394e72567 | <ide><path>cake/libs/set.php
<ide> function format($data, $format, $keys) {
<ide> * - /Posts[title] (Selects all Posts that have a 'name' key)
<ide> * - /Comment/.[1] (Selects the contents of the first comment)
<ide> * - /Comment/.[:last] (Selects the last comment)
<del> * - /Comment/.[:first] (Selects the last comment)
<add> * - /Comment/.[:first] (Selects the first comment)
<ide> * - /Comment[text=/cakephp/i] (Selects the all comments that have a text matching the regex /cakephp/i)
<ide> * - /Comment/@* (Selects the all key names of all comments)
<ide> * | 1 |
Text | Text | add ai-soco models | bf162ce8ca15fa0371cccb9ecf0d91404e39905f | <ide><path>model_cards/aliosm/ai-soco-c++-roberta-small-clas/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>- classification
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- accuracy
<add>---
<add>
<add># ai-soco-c++-roberta-small-clas
<add>
<add>## Model description
<add>
<add>`ai-soco-c++-roberta-small` model fine-tuned on [AI-SOCO](https://sites.google.com/view/ai-soco-2020) task.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized from [`ai-soco-c++-roberta-small`](https://github.com/huggingface/transformers/blob/master/model_cards/aliosm/ai-soco-c++-roberta-small) model and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset to do text classification.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform using V100 GPU for 10 epochs, 32 batch size, 512 max sequence length (sequences larger than 512 were truncated). Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>## Eval results
<add>
<add>The model achieved 93.19%/92.88% accuracy on AI-SOCO task and ranked in the 4th place.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-small-clas">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a>
<ide><path>model_cards/aliosm/ai-soco-c++-roberta-small/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- perplexity
<add>---
<add>
<add># ai-soco-c++-roberta-small
<add>
<add>## Model description
<add>
<add>From scratch pre-trained RoBERTa model with 6 layers and 12 attention heads using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which consists of C++ codes crawled from CodeForces website.
<add>
<add>## Intended uses & limitations
<add>
<add>The model can be used to do code classification, authorship identification and other downstream tasks on C++ programming language.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized randomly and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which contains 100K C++ source codes.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform with 8 TPU cores for 200 epochs, 16\*8 batch size, 512 max sequence length and MLM objective. Other parameters were defaulted to the values mentioned in [`run_language_modelling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py) script. Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-small">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a>
<ide><path>model_cards/aliosm/ai-soco-c++-roberta-tiny-96-clas/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>- classification
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- accuracy
<add>---
<add>
<add># ai-soco-c++-roberta-tiny-96-clas
<add>
<add>## Model description
<add>
<add>`ai-soco-c++-roberta-tiny-96` model fine-tuned on [AI-SOCO](https://sites.google.com/view/ai-soco-2020) task.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized from [`ai-soco-c++-roberta-tiny-96`](https://github.com/huggingface/transformers/blob/master/model_cards/aliosm/ai-soco-c++-roberta-tiny-96) model and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset to do text classification.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform using V100 GPU for 10 epochs, 16 batch size, 512 max sequence length (sequences larger than 512 were truncated). Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>## Eval results
<add>
<add>The model achieved 91.12%/91.02% accuracy on AI-SOCO task and ranked in the 7th place.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-tiny-96-clas">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a>
<ide><path>model_cards/aliosm/ai-soco-c++-roberta-tiny-96/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- perplexity
<add>---
<add>
<add># ai-soco-c++-roberta-tiny-96
<add>
<add>## Model description
<add>
<add>From scratch pre-trained RoBERTa model with 1 layers and 96 attention heads using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which consists of C++ codes crawled from CodeForces website.
<add>
<add>## Intended uses & limitations
<add>
<add>The model can be used to do code classification, authorship identification and other downstream tasks on C++ programming language.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized randomly and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which contains 100K C++ source codes.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform with 8 TPU cores for 200 epochs, 16\*8 batch size, 512 max sequence length and MLM objective. Other parameters were defaulted to the values mentioned in [`run_language_modelling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py) script. Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-tiny-96">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a>
<ide><path>model_cards/aliosm/ai-soco-c++-roberta-tiny-clas/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>- classification
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- accuracy
<add>---
<add>
<add># ai-soco-c++-roberta-tiny-clas
<add>
<add>## Model description
<add>
<add>`ai-soco-c++-roberta-tiny` model fine-tuned on [AI-SOCO](https://sites.google.com/view/ai-soco-2020) task.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized from [`ai-soco-c++-roberta-tiny`](https://github.com/huggingface/transformers/blob/master/model_cards/aliosm/ai-soco-c++-roberta-tiny) model and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset to do text classification.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform using V100 GPU for 10 epochs, 32 batch size, 512 max sequence length (sequences larger than 512 were truncated). Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>## Eval results
<add>
<add>The model achieved 87.66%/87.46% accuracy on AI-SOCO task and ranked in the 9th place.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-tiny-clas">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a>
<ide><path>model_cards/aliosm/ai-soco-c++-roberta-tiny/README.md
<add>---
<add>language: "c++"
<add>tags:
<add>- exbert
<add>- authorship-identification
<add>- fire2020
<add>- pan2020
<add>- ai-soco
<add>license: "mit"
<add>datasets:
<add>- ai-soco
<add>metrics:
<add>- perplexity
<add>---
<add>
<add># ai-soco-c++-roberta-tiny
<add>
<add>## Model description
<add>
<add>From scratch pre-trained RoBERTa model with 1 layers and 12 attention heads using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which consists of C++ codes crawled from CodeForces website.
<add>
<add>## Intended uses & limitations
<add>
<add>The model can be used to do code classification, authorship identification and other downstream tasks on C++ programming language.
<add>
<add>#### How to use
<add>
<add>You can use the model directly after tokenizing the text using the provided tokenizer with the model files.
<add>
<add>#### Limitations and bias
<add>
<add>The model is limited to C++ programming language only.
<add>
<add>## Training data
<add>
<add>The model initialized randomly and trained using [AI-SOCO](https://sites.google.com/view/ai-soco-2020) dataset which contains 100K C++ source codes.
<add>
<add>## Training procedure
<add>
<add>The model trained on Google Colab platform with 8 TPU cores for 200 epochs, 32\*8 batch size, 512 max sequence length and MLM objective. Other parameters were defaulted to the values mentioned in [`run_language_modelling.py`](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_language_modeling.py) script. Each continues 4 spaces were converted to a single tab character (`\t`) before tokenization.
<add>
<add>### BibTeX entry and citation info
<add>
<add>```bibtex
<add>@inproceedings{ai-soco-2020-fire,
<add> title = "Overview of the {PAN@FIRE} 2020 Task on {Authorship Identification of SOurce COde (AI-SOCO)}",
<add> author = "Fadel, Ali and Musleh, Husam and Tuffaha, Ibraheem and Al-Ayyoub, Mahmoud and Jararweh, Yaser and Benkhelifa, Elhadj and Rosso, Paolo",
<add> booktitle = "Proceedings of The 12th meeting of the Forum for Information Retrieval Evaluation (FIRE 2020)",
<add> year = "2020"
<add>}
<add>```
<add>
<add><a href="https://huggingface.co/exbert/?model=aliosm/ai-soco-c++-roberta-tiny">
<add> <img width="300px" src="https://hf-dinosaur.huggingface.co/exbert/button.png">
<add></a> | 6 |
Ruby | Ruby | remove silly concatenation | c59a6381956a1a6408f6b6686476fecc437cca1d | <ide><path>Library/Homebrew/formula.rb
<ide> def cached_download
<ide>
<ide> def bin; prefix+'bin' end
<ide> def sbin; prefix+'sbin' end
<del> def doc; prefix+'share'+'doc'+name end
<add> def doc; prefix+'share/doc'+name end
<ide> def lib; prefix+'lib' end
<ide> def libexec; prefix+'libexec' end
<del> def man; prefix+'share'+'man' end
<add> def man; prefix+'share/man' end
<ide> def man1; man+'man1' end
<del> def info; prefix+'share'+'info' end
<add> def info; prefix+'share/info' end
<ide> def include; prefix+'include' end
<ide> def share; prefix+'share' end
<ide> | 1 |
PHP | PHP | add missing import | f14fa623902e96808696656bc40390fe2db146fe | <ide><path>src/Console/CommandRunner.php
<ide> use Cake\Console\Exception\StopException;
<ide> use Cake\Console\Shell;
<ide> use Cake\Core\ConsoleApplicationInterface;
<add>use Cake\Core\HttpApplicationInterface;
<ide> use Cake\Core\PluginApplicationInterface;
<ide> use Cake\Event\EventDispatcherInterface;
<ide> use Cake\Event\EventDispatcherTrait; | 1 |
PHP | PHP | fix primary key test | 10596b812f4841783923861c29c29c7512f5cae2 | <ide><path>tests/TestCase/View/Form/EntityContextTest.php
<ide> public function testPrimaryKey()
<ide> */
<ide> public function testIsPrimaryKey()
<ide> {
<add> $this->_setupTables();
<add>
<ide> $row = new Article();
<ide> $context = new EntityContext($this->request, [
<ide> 'entity' => $row,
<ide> protected function _setupTables()
<ide> 'id' => ['type' => 'integer', 'length' => 11, 'null' => false],
<ide> 'title' => ['type' => 'string', 'length' => 255],
<ide> 'user_id' => ['type' => 'integer', 'length' => 11, 'null' => false],
<del> 'body' => ['type' => 'crazy_text', 'baseType' => 'text']
<add> 'body' => ['type' => 'crazy_text', 'baseType' => 'text'],
<add> '_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]],
<ide> ]);
<ide> $users->schema([
<ide> 'id' => ['type' => 'integer', 'length' => 11], | 1 |
Ruby | Ruby | simplify these tests | 67844c9012a8692d7435862b67a9c791a56abe01 | <ide><path>Library/Homebrew/test/test_bucket.rb
<ide> require 'testing_env'
<ide> require 'test/testball'
<ide>
<del>class MockFormula < Formula
<del> def initialize url
<del> @stable = SoftwareSpec.new(url)
<del> super 'test'
<del> end
<del>end
<del>
<del>class TestZip < Formula
<del> def initialize
<del> @homepage = 'http://example.com/'
<del> zip=HOMEBREW_CACHE.parent+'test-0.1.zip'
<del> Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__
<del> @stable = SoftwareSpec.new "file://#{zip}"
<del> super 'testzip'
<del> end
<del>end
<del>
<ide> # All other tests so far -- feel free to break them out into
<ide> # separate TestCase classes.
<ide>
<ide> def initialize(*args)
<ide> end
<ide>
<ide> def test_zip
<del> shutup { assert_nothing_raised { TestZip.new.brew {} } }
<add> zip = HOMEBREW_CACHE.parent + 'test-0.1.zip'
<add> Kernel.system '/usr/bin/zip', '-q', '-0', zip, ABS__FILE__
<add>
<add> shutup do
<add> assert_nothing_raised do
<add> Class.new(Formula) do
<add> url "file://#{zip}"
<add> end.new("test_zip").brew {}
<add> end
<add> end
<add> ensure
<add> zip.unlink if zip.exist?
<ide> end
<ide>
<ide> def test_brew_h
<ide> def test_pathname_properties
<ide> assert_version_equal '0.1', foo1.version
<ide> end
<ide>
<del> class MockMockFormula < Struct.new(:name); end
<del>
<ide> def test_formula_equality
<del> f = MockFormula.new('http://example.com/test-0.1.tgz')
<del> g = MockMockFormula.new('test')
<add> f = Class.new(Formula) do
<add> url 'http://example.com/test-0.1.tgz'
<add> end.new('test')
<add> g = Struct.new(:name).new('test')
<ide>
<ide> assert f == f
<ide> assert f == g | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.