text:
g05 Chapter Contents
g05 Chapter Introduction
NAG Library Manual

# NAG Library Function Documentnag_rand_f (g05shc)

## 1  Purpose

nag_rand_f (g05shc) generates a vector of pseudorandom numbers taken from an $F$ (or Fisher's variance ratio) distribution with $\mu$ and $\nu$ degrees of freedom.

## 2  Specification

 #include #include
 void nag_rand_f (Integer n, Integer df1, Integer df2, Integer state[], double x[], NagError *fail)

## 3  Description

The distribution has PDF (probability density function)
 $f x = μ+ν-2 2 ! x 12 μ-1 12 μ-1! 12 ν-1 ! 1+ μν x 12 μ+ν × μν 12μ if  x>0 , fx=0 otherwise.$
nag_rand_f (g05shc) calculates the values
 $ν yi μ zi , i=1,2,…,n ,$
where ${y}_{i}$ and ${z}_{i}$ are generated by nag_rand_gamma (g05sjc) from gamma distributions with parameters $\left(\frac{1}{2}\mu ,2\right)$ and $\left(\frac{1}{2}\nu ,2\right)$ respectively (i.e., from ${\chi }^{2}$-distributions with $\mu$ and $\nu$ degrees of freedom).
One of the initialization functions nag_rand_init_repeatable (g05kfc) (for a repeatable sequence if computed sequentially) or nag_rand_init_nonrepeatable (g05kgc) (for a non-repeatable sequence) must be called prior to the first call to nag_rand_f (g05shc).

## 4  References

Knuth D E (1981) The Art of Computer Programming (Volume 2) (2nd Edition) Addison–Wesley

## 5  Arguments

1:    $\mathbf{n}$IntegerInput
On entry: $n$, the number of pseudorandom numbers to be generated.
Constraint: ${\mathbf{n}}\ge 0$.
2:    $\mathbf{df1}$IntegerInput
On entry: $\mu$, the number of degrees of freedom of the distribution.
Constraint: ${\mathbf{df1}}\ge 1$.
3:    $\mathbf{df2}$IntegerInput
On entry: $\nu$, the number of degrees of freedom of the distribution.
Constraint: ${\mathbf{df2}}\ge 1$.
4:    $\mathbf{state}\left[\mathit{dim}\right]$IntegerCommunication Array
Note: the dimension, $\mathit{dim}$, of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument state in the previous call to nag_rand_init_repeatable (g05kfc) or nag_rand_init_nonrepeatable (g05kgc).
On entry: contains information on the selected base generator and its current state.
On exit: contains updated information on the state of the generator.
5:    $\mathbf{x}\left[{\mathbf{n}}\right]$doubleOutput
On exit: the $n$ pseudorandom numbers from the specified $F$-distribution.
6:    $\mathbf{fail}$NagError *Input/Output
The NAG error argument (see Section 2.7 in How to Use the NAG Library and its Documentation).

## 6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
On entry, argument $〈\mathit{\text{value}}〉$ had an illegal value.
NE_INT
On entry, ${\mathbf{df1}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{df1}}\ge 1$.
On entry, ${\mathbf{df2}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{df2}}\ge 1$.
On entry, ${\mathbf{n}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{n}}\ge 0$.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 2.7.6 in How to Use the NAG Library and its Documentation for further information.
NE_INVALID_STATE
On entry, state vector has been corrupted or not initialized.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

## 8  Parallelism and Performance

nag_rand_f (g05shc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the x06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

The time taken by nag_rand_f (g05shc) increases with $\mu$ and $\nu$.

## 10  Example

This example prints five pseudorandom numbers from an $F$-distribution with two and three degrees of freedom, generated by a single call to nag_rand_f (g05shc), after initialization by nag_rand_init_repeatable (g05kfc).

### 10.1  Program Text

Program Text (g05shce.c)

None.

### 10.3  Program Results

Program Results (g05shce.r)


text:
# CheckpointHandler¶

class CheckpointHandler(file_name=None, time_interval=None)

Class for representing the parameters used for saving the configuration and calculator at regular intervals during self- consistent iterations.

Parameters: file_name (str) – The name of the checkpoint file. The file can be given as an absolute path or a relative path interpreted relative to the current working directory. The path of the checkpoint file is written in the output log of the calculator. The extension can be either “nc” for a NetCDF file or “hdf5” for an HDF5 file. Default: File of the form: 'TEMP/checkpointXXXXXXXX.hdf5', where TEMP is the temporary folder on the computer and X is a random digit. time_interval (PhysicalQuantity of type time interval | Disabled) – The approximate time between saving. The program will check if the time since last save exceeds the time interval after each self-consistent iteration. Default: 0.5 * Hour.
fileName()
Returns: The name of the checkpoint file. str
timeInterval()
Returns: The length of the time interval or Disabledif there’s no checkpoint handling. PhysicalQuantity of type time interval | Disabled

## Usage Examples¶

Set the checkpoint file to “/home/checkpoint.nc” and tell the calculator to store itself every 20 minutes.

checkpoint_handler = CheckpointHandler('/home/checkpoint.nc', 20*Minute)
calculator = LCAOCalculator(checkpoint_handler=checkpoint_handler)

Turn off checkpoint handling for a calculator.

calculator = LCAOCalculator(checkpoint_handler=NoCheckpointHandler)

format: plain


text:
# All Questions

121 views

### Alternatives to HMAC + CBC?

I'm looking at using HMAC + CBC. The combination looks like this: ciphertext = AES256(text, k1) data = HMAC-SHA256(iv | ciphertext, k2) | iv | ciphertext Where: ...
108 views

### How does OAEP improve the security of RSA?

The heart of OAEP algorithm used for RSA encryption are the cryptographic hash functions $H$ and $G$. Does everybody (so also an adversary) know these functions? If YES: How does it help the ...
66 views

113 views

### Does knowledge of original file size provide a cryptographic weakness?

I'm encrypting files using an AES-256 CBC cipher and an SHA-256 HMAC every 64KB in the file. Since AES CBC needs an amount of input bytes to be divisible by 16, I use PKCS#7 padding to bring the ...
93 views

### Given a certain entrophy per character, how long should a passphrase be to guarantee key strength?

Given an entrophy of 1.5 bits per character, how long does a passphrase have the be to guarantee a key strength of a 128 bit random key? Assuming an alphabet of 26, one character takes log2(26)=4.7 ...
127 views

### Winzip AES256 vs PGP

If I use the AES256 option in Winzip to encrypt a file, is it any less safe or less secure than using pgp encryption?
243 views

### Custom crypto library in C

I will be making (in the near future) an app that will contain some pretty heavy crypto. As it is possible that my app will be ported to different devices (initially it will be iOs only, but Mac, ...
97 views

### encrypt message with one digest 0-9 instead of 01-26

How much will the security of one-time pad decrease if I use one digit from 0-9 instead of 1-26? for example plaintext = "blue" and ...
177 views

### CBC-MAC , fixed length, all blocks returned

CBC-MAC, with fixed length message. Is it safe to return all ciphered blocks instead of the last? My intuition says it is less secure, since is gives an attacker more information. But how could one ...
51 views

### How to derive formulas for addition and multiplication in Jacobian coordinates

Is there a way to derive the formulas for point addition and multiplication on elliptic curves in Jacobian format by yourself? How could I have derived these formulas by myself?
122 views

### Recommended way of adding a pepper/secret key to password before hashing?

There have been several questions regarding password hashing here and on Security.SE. A "pepper" is sometimes mentioned – an application-specific secret key. The canonical answer on password hashing ...


text:
• ### GALEX-SDSS Catalogs for Statistical Studies(0904.1392)

April 8, 2009 astro-ph.CO, astro-ph.GA
We present a detailed study of the Galaxy Evolution Explorer's photometric catalogs with special focus on the statistical properties of the All-sky and Medium Imaging Surveys. We introduce the concept of primaries to resolve the issue of multiple detections and follow a geometric approach to define clean catalogs with well-understood selection functions. We cross-identify the GALEX sources (GR2+3) with Sloan Digital Sky Survey (DR6) observations, which indirectly provides an invaluable insight about the astrometric model of the UV sources and allows us to revise the band merging strategy. We derive the formal description of the GALEX footprints as well as their intersections with the SDSS coverage along with analytic calculations of their areal coverage. The crossmatch catalogs are made available for the public. We conclude by illustrating the implementation of typical selection criteria in SQL for catalog subsets geared toward statistical analyses, e.g., correlation and luminosity function studies.
• ### UV-optical colours as probes of early-type galaxy evolution(astro-ph/0601029)

Oct. 31, 2007 astro-ph
We have studied ~2100 early-type galaxies in the SDSS DR3 which have been detected by the GALEX Medium Imaging Survey (MIS), in the redshift range 0 < z < 0.11. Combining GALEX UV photometry with corollary optical data from the SDSS, we find that, at a 95 percent confidence level, at least ~30 percent of galaxies in this sample have UV to optical colours consistent with some recent star formation within the last Gyr. In particular, galaxies with a NUV - r colour less than 5.5 are very likely to have experienced such recent star formation, taking into account the possibility of a contribution to NUV flux from the UV upturn phenomenon. We find quantitative agreement between the observations and the predictions of a semi-analytical LCDM hierarchical merger model and deduce that early-type galaxies in the redshift range 0 < z < 0.11 have ~1 to 3 percent of their stellar mass in stars less than 1 Gyr old. The average age of this recently formed population is ~300 to 500 Myrs. We also find that monolithically evolving galaxies, where recent star formation can be driven solely by recycled gas from stellar mass loss, cannot exhibit the blue colours (NUV - r < 5.5) seen in a significant fraction (~30 percent) of our observed sample.
• ### UV to IR SEDs of UV selected galaxies in the ELAIS fields: evolution of dust attenuation and star formation activity from z=0.7 to z=0.2(0707.3415)

July 23, 2007 astro-ph
We study the ultraviolet to far-infrared (hereafter UV-to-IR) SEDs of a sample of intermediate redshift (0.2 < z < 0.7) UV-selected galaxies from the ELAIS-N1 and ELAIS-N2 fields by fitting a multi-wavelength dataset to a library of GRASIL templates. Star formation related properties of the galaxies are derived from the library of models by using the Bayesian statistics. We find a decreasing presence of galaxies with low attenuation and low total luminosity as redshift decreases, which does not hold for high total luminosity galaxies. In addition the dust attenuation of low mass galaxies increases as redshift decreases, and this trend seems to disappear for galaxies with M* > 10^11 M_sun. This result is consistent with a mass dependent evolution of the dust to gas ratio, which could be driven by a mass dependent efficiency of star formation in star forming galaxies. The specific star formation rates (SSFR) decrease with increasing stellar mass at all redshifts, and for a given stellar mass the SSFR decreases with decreasing redshift. The differences in the slope of the M*--SSFR relation found between this work and others at similar redshift could be explained by the adopted selection criteria of the samples which, for a UV selected sample, favours blue, star forming galaxies.
• ### Deep GALEX Imaging of the HST/COSMOS Field: A First Look at the Morphology of z~0.7 Star-forming Galaxies(astro-ph/0701478)

Jan. 17, 2007 astro-ph
We present a study of the morphological nature of redshift z~0.7 star-forming galaxies using a combination of HST/ACS, GALEX and ground-based images of the COSMOS field. Our sample consists of 8,146 galaxies, 5,777 of which are detected in the GALEX near-ultraviolet band down to a limiting magnitude of 25.5 (AB). We make use of the UV to estimate star formation rates, correcting for the effect of dust using the UV-slope, and compute, from the ACS F814W images, the C,A,S,G,M20 morphological parameters for all objects in our sample. We observe a morphological bimodality in the galaxy population and show that it has a strong correspondence with the FUV - g color bimodality. We conclude that UV-optical color predominantly evolves concurrently with morphology. We observe many of the most star-forming galaxies to have morphologies approaching that of early-type galaxies, and interpret this as evidence that strong starburst events are linked to bulge growth and constitute a process through which galaxies can be brought from the blue to the red sequence while simultaneously modifying their morphology accordingly. We conclude that the red sequence has continued growing at z~<0.7. We also observe z~0.7 galaxies to have physical properties similar to that of local galaxies, except for higher star formation rates. Whence we infer that the dimming of star-forming galaxies is responsible for most of the evolution in the star formation rate density of the Universe since that redshift, although our data are also consistent with a mild number evolution. [abridged]
• ### The Local Universe as Seen in Far-Infrared and in Far-Ultraviolet: A Global Point of View on the Local Recent Star Formation(astro-ph/0609738)

Sept. 27, 2006 astro-ph
We select far-infrared (FIR-60 microns) and far-ultraviolet (FUV-1530 A) samples of nearby galaxies in order to discuss the biases encountered by monochromatic surveys (FIR or FUV). Very different volumes are sampled by each selection and much care is taken to apply volume corrections to all the analyses. The distributions of the bolometric luminosity of young stars are compared for both samples: they are found to be consistent with each other for galaxies of intermediate luminosities but some differences are found for high (>5 10^{10} L_sun) luminosities. The shallowness of the IRAS survey prevents us from securing comparison at low luminosities (<2 10^9 L_sun). The ratio of the total infrared (TIR) luminosity to the FUV luminosity is found to increase with the bolometric luminosity in a similar way for both samples up to 5 10^{10} L_sun. Brighter galaxies are found to have a different behavior according to their selection: the L_TIR/L_FUV ratio of the FUV-selected galaxies brighter than 5 10^{10} L_sun reaches a plateau whereas L_TIR/L_FUV continues to increase with the luminosity of bright galaxies selected in FIR. The volume-averaged specific star formation rate (SFR per unit galaxy stellar mass, SSFR) is found to decrease toward massive galaxies within each selection. The SSFR is found to be larger than that measured for optical and NIR-selected sample over the whole mass range for the FIR selection, and for masses larger than 10^{10} M_sun for the FUV selection. Luminous and massive galaxies selected in FIR appear as active as galaxies with similar characteristics detected at z ~ 0.7.
• ### The GALEX Ultraviolet Atlas of Nearby Galaxies(astro-ph/0606440)

June 19, 2006 astro-ph
We present images, integrated photometry, surface-brightness and color profiles for a total of 1034 nearby galaxies recently observed by the GALEX satellite in its far-ultraviolet (FUV; 1516A) and near-ultraviolet (NUV; 2267A) bands. (...) This data set has been complemented with archival optical, near-infrared, and far-infrared fluxes and colors. We find that the integrated (FUV-K) color provides robust discrimination between elliptical and spiral/irregular galaxies and also among spiral galaxies of different sub-types. Elliptical galaxies with brighter K-band luminosities (i.e. more massive) are redder in (NUV-K) color but bluer in (FUV-NUV) than less massive ellipticals. In the case of the spiral/irregular galaxies our analysis shows the presence of a relatively tight correlation between the (FUV-NUV) color and the total infrared-to-UV ratio. The correlation found between (FUV-NUV) color and K-band luminosity (with lower luminosity objects being bluer than more luminous ones) can be explained as due to an increase in the dust content with galaxy luminosity. The images in this Atlas along with the profiles and integrated properties are publicly available through a dedicated web page at http://nedwww.ipac.caltech.edu/level5/GALEX_Atlas/
• ### Dissecting Galaxy Colors with GALEX, SDSS, and Spitzer(astro-ph/0605473)

May 18, 2006 astro-ph
We combine data from SDSS and the GALEX and Spitzer observatories to create a sample of galaxies observed homogeneously from the UV to the Far-IR. This sample, consisting of ~460 galaxies observed spectroscopically by SDSS provides a multiwavelength (0.15-24 micron) view of obscured and unobscured star formation in nearby (z<0.3) galaxies with SFRs ranging from 0.01 to 100 M_solar/yr. We calculate a robust dust measure from the infrared to UV ratio (IRX) and explore the influence of star formation history (SFH) on the dust-UV color relation (i.e. the IRX-beta relation). We find that the UV colors of galaxies are only weakly dependent on their SFH as measured by the 4000A break. However, we find that the contributions of dust and SFH are distinguishable when colors at widely separated wavelengths (e.g. 0.23-3.6 micron) are introduced. We show this explicitly by recasting the IRX-beta relation as a more general IRX-SFH-color relation, which we examine in different projections. We also determine simple fits to this relation.
• ### The effect of environment on the UV colour-magnitude relation of early-type galaxies(astro-ph/0601036)

Jan. 31, 2006 astro-ph
We use \textit{GALEX} (Galaxy Evolution Explorer) near-UV (NUV) photometry of a sample of early-type galaxies selected in \textit{SDSS} (Sloan Digital Sky Survey) to study the UV color-magnitude relation (CMR). $NUV-r$ color is an excellent tracer of even small amounts ($\sim 1$% mass fraction) of recent ($\la 1$ Gyr) star formation and so the $NUV-r$ CMR allows us to study the effect of environment on the recent star formation history. We analyze a volume-limited sample of 839 visually-inspected early-type galaxies in the redshift range $0.05 < z < 0.10$ brighter than $M_{r}$ of -21.5 with any possible emission-line or radio-selected AGN removed to avoid contamination. We find that contamination by AGN candidates and late-type interlopers highly bias any study of recent star formation in early-type galaxies and that, after removing those, our lower limit to the fraction of massive early-type galaxies showing signs of recent star formation is roughly $30 \pm 3%$ This suggests that residual star formation is common even amongst the present day early-type galaxy population. We find that the fraction of UV-bright early-type galaxies is 25% higher in low-density environments. However, the density effect is clear only in the lowest density bin. The blue galaxy fraction for the subsample of the brightest early-type galaxies however shows a very strong density dependence, in the sense that the blue galaxy fraction is lower in a higher density region.
• ### Star formation in the nearby universe: the ultraviolet and infrared points of view(astro-ph/0601235)

Jan. 11, 2006 astro-ph
This work presents the main ultraviolet (UV) and far-infrared (FIR) properties of two samples of nearby galaxies selected from the GALEX ($\lambda = 2315$\AA, hereafter NUV) and IRAS ($\lambda = 60\mu$m) surveys respectively. They are built in order to get detection at both wavelengths for most of the galaxies. Star formation rate (SFR) estimators based on the UV and FIR emissions are compared. Systematic differences are found between the SFR estimators for individual galaxies based on the NUV fluxes corrected for dust attenuation and on the total IR luminosity. A combined estimator based on NUV and IR luminosities seems to be the best proxy over the whole range of values of SFR. Although both samples present similar average values of the birthrate parameter b, their star-formation-related properties are substantially different: NUV-selected galaxies tend to show larger values of $b$ for lower masses, SFRs and dust attenuations, supporting previous scenarios for the star formation history (SFH). Conversely, about 20% of the FIR-selected galaxies show high values of $b$, SFR and NUV attenuation. These galaxies, most of them being LIRGs and ULIRGs, break down the downsizing picture for the SFH, however their relative contribution per unit volume is small in the local Universe. Finally, the cosmic SFR density of the local Universe is estimated in a consistent way from the NUV and IR luminosities.
• ### UV properties of early-type galaxies in the Virgo cluster(astro-ph/0507169)

July 25, 2005 astro-ph
We study the UV properties of a volume limited sample of early-type galaxies in the Virgo cluster combining new GALEX far- (1530 A) and near-ultraviolet (2310 A) data with spectro-photometric data available at other wavelengths. The sample includes 264 ellipticals, lenticulars and dwarfs spanning a large range in luminosity (M(B)<-15). While the NUV to optical or near-IR color magnitude relations (CMR) are similar to those observed at optical wavelengths, with a monotonic reddening of the color index with increasing luminosity, the (FUV-V) and (FUV-H) CMRs show a discontinuity between massive and dwarf objects. An even more pronounced dichotomy is observed in the (FUV-NUV) CMR. For ellipticals the (FUV-NUV) color becomes bluer with increasing luminosity and with increasing reddening of the optical or near-IR color indices. For the dwarfs the opposite trend is observed. These observational evidences are consistent with the idea that the UV emission is dominated by hot, evolved stars in giant systems, while in dwarf ellipticals residual star formation activity is more common.
• ### GALEX UV Spectroscopy and Deep Imaging of LIRGs in the ELAIS S1 field(astro-ph/0411390)

April 20, 2005 astro-ph
The ELAIS S1 field was observed by GALEX in both its Wide Spectroscopic and Deep Imaging Survey modes. This field was previously observed by the Infrared Space Observatory and we made use of the catalogue of multi-wavelength data published by the ELAIS consortium to select galaxies common to the two samples. Among the 959 objects with GALEX spectroscopy, 88 are present in the ELAIS catalog and 19 are galaxies with an optical spectroscopic redshift. The distribution of redshifts covers the range $0<z<1.6$. The selected galaxies have bolometric IR luminosities $10<Log(L_{IR})<13$ (deduced from the $15 \mu m$ flux using ISOCAM) which means that we cover a wide range of galaxies from normal to Ultra Luminous IR Galaxies. The mean ($\sigma$) UV luminosity (not corrected for extinction) amounts to $Log(\lambda.L_{1530}) = 9.8 (0.6)$ $L_\sun$ for the low-z ($z \le 0.35$) sample. The UV slope $\beta$ (assuming $f_\lambda \propto \lambda^\beta$) correlates with the GALEX FUV-NUV color if the sample is restricted to galaxies below $z < 0.1$. Taking advantage of the UV and IR data, we estimate the dust attenuation from the IR/UV ratio and compare it to the UV slope $\beta$. We find that it is not possible to uniquely estimate the dust attenuation from $\beta$ for our sample of galaxies. These galaxies are highly extinguished with a median value $A_{FUV} = 2.7 \pm 0.8$. Once the dust correction applied, the UV- and IR-based SFRs correlate. For the closest galaxy with the best quality spectrum, we see a feature consistent with being produced by a bump near 220nm in the attenuation curve.
• ### GALEX UV observations of the interacting galaxy NGC 4438 in the Virgo cluster(astro-ph/0502040)

Feb. 2, 2005 astro-ph
We present GALEX NUV (2310 A) and FUV (1530 A) images of the interacting galaxy NGC 4438 (Arp 120) in the center of the Virgo cluster. These images show an extended (20 kpc) tidal tail at the north-west edge of the galaxy previously undetected at other wavelengths, at 15-25 kpc from its nucleus. Except in the nucleus, the UV morphology of NGC 4438 is totally different from the Halpha+[NII] one, more similar to the X-ray emission, confirming its gas cooling origin. We study the star formation history of NGC 4438 combining spectro-photometric data in the UV-visible-near-IR wavelength range with population synthesis and galaxy evolution models. The data are consistent with a recent (~ 10 Myr), instantaneous burst of star formation in the newly discovered UV north-western tail which is significantly younger than the age of the tidal interaction with NGC 4435, dated by dynamical models at ~ 100 Myr ago. Recent star formation events are also present at the edge of the northern arm and in the southern tail, while totally lacking in the other regions, which are dominated by the old stellar population perturbed during the dynamical interaction with NGC 4435. The contribution of this recent starburst to the total galaxy stellar mass is lower than 0.1%, an extremely low value for such a violent interaction. High-velocity, off-center tidal encounters such as that observed in Arp 120 are thus not sufficient to significantly increase the star formation activity of cluster galaxies.
• ### The GALEX UV luminosity function of the cluster of galaxies Abell 1367(astro-ph/0502041)

Feb. 2, 2005 astro-ph
We present the GALEX NUV (2310 A) and FUV (1530 A) galaxy luminosity functions of the nearby cluster of galaxies A1367 in the magnitude range -20.3< M_AB < -13.3. The luminosity functions are consistent with previous (~ 2 mag shallower) estimates based on the FOCA and FAUST experiments, but display a steeper faint-end slope than the GALEX luminosity function for local field galaxies. Using spectro-photometric optical data we select out star-forming systems from quiescent galaxies and study their separate contributions to the cluster luminosity function. We find that the UV luminosity function of cluster star-forming galaxies is consistent with the field. The difference between the cluster and field LF is entirely due to the contribution at low luminosities (M_AB >-16 mag) of non star-forming, early-type galaxies that are significantly over dense in clusters.
• ### Classification and Characterization of Objects from GALEX and SDSS surveys(astro-ph/0411406)

Nov. 15, 2004 astro-ph
We use the GALEX (Galaxy Evolution Explorer) Medium Imaging Survey (MIS) and All-Sky Imaging Survey (AIS) data available in the first internal release, matched to the SDSS catalogs in the overlapping regions, to classify objects by comparing the multi-band photometry to model colors. We show an example of the advantage of such broad wavelength coverage (GALEX far-UV and near-UV, SDSS ugriz) in classifying objects and augmenting the existing samples and catalogs. From the MIS [AIS] sample over an area of 75 [92] square degrees, we select a total of 1736 [222] QSO candidates at redshift less than 2, significantly extending the number of fainter candidates, and moderately increasing the number of bright objects in the SDSS list of spectroscopically confirmed QSO. Numerous hot stellar objects are also revealed by the UV colors, as expected.
• ### Extinction radial profiles of M83 from GALEX UV imaging(astro-ph/0411375)

Nov. 14, 2004 astro-ph
We use the far-UV (FUV) and near-UV (NUV) images of M83 obtained by GALEX to compute the radial profile of the UV spectral slope in the star forming disk. We briefly present a model of its chemical evolution which allows us to obtain realistic intrinsic properties of the stellar populations. Using corollary data, we also compute the profiles of H-alpha/H-beta and of the total IR (TIR) to FUV ratio. Both data and model are used to estimate and compare the extinction gradients at the FUV wavelength obtained from these various indicators. We discuss the implications for the determination of the star formation rate.
• ### UV Emission from Stellar Populations within Tidal Tails: Catching the Youngest Galaxies in Formation?(astro-ph/0411372)

Nov. 13, 2004 astro-ph
New GALEX observations have detected significant FUV (1530 Angstroms) and NUV (2310 Angstroms) emission from stellar substructures within the tidal tails of four ongoing galaxy mergers. The UV-bright regions are optically faint and are coincident with HI density enhancements. FUV emission is detected at any location where the HI surface density exceeds ~2 M_sun pc^{-2}, and is often detected in the absence of visible wavelength emission. UV luminosities of the brighter regions of the tidal tails imply masses of 10^6 M_sun to ~10^9 M_sun in young stars in the tails, and HI luminosities imply similar HI masses. UV-optical colors of the tidal tails indicate stellar populations as young as a few Myr, and in all cases ages < 400Myr. Most of the young stars in the tails formed in single bursts rather than resulting from continuous star formation, and they formed *in situ* as the tails evolved. Star formation appears to be older near the parent galaxies and younger at increasing distances from the parent galaxy. This could be because the star formation occurs progressively along the tails, or because the star formation has been inhibited near the galaxy/tail interface. The youngest stellar concentrations, usually near the ends of long tidal tails, have masses comparable to confirmed tidal dwarf galaxies and may be newly forming galaxies undergoing their first burst of star formation.
• ### The Look-back Time Evolution of Far-UV Flux from Elliptical Galaxies: The Fornax Cluster and Abell 2670(astro-ph/0411318)

Nov. 12, 2004 astro-ph
In order to investigate the origin of the far-UV (FUV) flux from the early-type galaxies, Galaxy Evolution Explorer (GALEX) is collecting the UV data for the elliptical-rich clusters at moderate redshifts (z < 0.2) where the dominant FUV source is predicted to be hot horizontal-branch (HB) stars and their post-HB progeny. Here we present our first result for the early-type galaxies in Abell 2670 at z = 0.076. Compared to NGC 1399, a nearby giant elliptical galaxy in the Fornax cluster, it appears that the rest-frame FUV - V color of the giant ellipticals gets redder by ~ 0.7 mag at the distance of Abell 2670 (z = 0.076; look-back time ~ 1.0 Gyr). Although a detailed comparison with the models is postponed until more cluster data are accumulated, it is interesting to note that this value is consistent with the variation predicted by the population synthesis models where the mean temperature of HB stars declines rapidly with increasing look-back time.
• ### GALEX Ultraviolet Photometry of Globular Clusters in M31(astro-ph/0411323)

Nov. 12, 2004 astro-ph
We present ultraviolet photometry for globular clusters (GCs) in M31 from 15 square deg of imaging using the Galaxy Evolution Explorer (GALEX). We detect 200 and 94 GCs with certainty in the near-ultraviolet (NUV; 1750 - 2750 Angstroms) and far-ultraviolet (FUV; 1350 - 1750 Angstroms) bandpasses, respectively. Our rate of detection is about 50% in the NUV and 23% in the FUV, to an approximate limiting V magnitude of 19. Out of six clusters with [Fe/H]>-1 seen in the NUV, none is detected in the FUV bandpass. Furthermore, we find no candidate metal-rich clusters with significant FUV flux, because of the contribution of blue horizontal-branch (HB) stars, such as NGC 6388 and NGC 6441, which are metal-rich Galactic GCs with hot HB stars. We show that our GALEX photometry follows the general color trends established in previous UV studies of GCs in M31 and the Galaxy. Comparing our data with Galactic GCs in the UV and with population synthesis models, we suggest that the age range of M31 and Galactic halo GCs are similar.
• ### A comparative study of the spatial distribution of ultraviolet and far-infrared fluxes from M 101(astro-ph/0411336)

Nov. 12, 2004 astro-ph
The total ultraviolet (UV) flux (from 1412 to 2718 AA) of M 101 is compared on a pixel-to-pixel basis with the total far-infrared (FIR) flux (from 60 to 170 micron), using the maps of the galaxy taken by GALEX in the near-UV and far-UV and by ISOPHOT at 60, 100 and 170 micron. The main result of this investigation is the discovery of a tight dependence of the FIR/UV ratio on radius, with values monotonically decreasing from around 4 in the nuclear region to nearly zero towards the edge of the optical disk. Although the tightness of this dependence is in part attributable to resolution effects, the result is consistent with the presence of a large-scale distribution of diffuse dust having a face-on optical depth which decreases with radius and which dominates over the more localized variations in opacity between the arm and interarm regions. We also find a trend for the FIR/UV ratio to take on higher values in the regions of diffuse interarm emission than in the spiral-arm regions, at a given radius. This is interpreted quantitatively in terms of the escape probability of UV photons from spiral arms and their subsequent scattering in the interarm regions, and in terms of the larger relative contribution of optical photons to the heating of the dust in the interarm regions.
• ### Dust attenuation in the nearby Universe: comparison between galaxies selected in the ultraviolet or in the infrared(astro-ph/0411343)

Nov. 12, 2004 astro-ph
We compare the dust attenuation properties of two samples of galaxies purely selected in the near-ultraviolet (NUV) band (1750-2750 A, lambda_m = 2310 A) and in the far-infrared (FIR) at 60micron. These samples are built using the GALEX and IRAS sky surveys over ~600 square degrees. The NUV selected sample contains 95 galaxies detected down to NUV=16mag (AB system). 83 galaxies in this sample are spirals or irregulars and only two of them are not detected at 60micron. The FIR selected sample is built from the IRAS PSCz catalog complete down to 0.6Jy. Among the 163 sources, we select 118 star forming galaxies well measured by IRAS, all but 1 are detected in NUV and 14 galaxies are not detected in the far-ultraviolet (FUV) band (1350-1750 A, lambda_m = 1530 A). The dust to ultraviolet (NUV and FUV) flux ratio is calibrated to estimate the dust attenuation at both wavelengths. The median value of the attenuation in NUV is found to be ~1 mag for the NUV selected sample versus ~2 mag for the FIR selected one. Within both samples, the dust attenuation is found to correlate with the luminosity of the galaxies. Almost all the NUV selected galaxies and 2/3 of the FIR selected sample exhibit a lower dust attenuation than that expected from the tight relation found previously for starburst galaxies between the dust attenuation and the slope of the ultraviolet continuum. The situation is inverse for one third of the FIR selected galaxies: their extinction is higher than that deduced from their FUV-NUV color and the relation valid for starbursts.
• ### New Constraints on the Star Formation Histories and Dust Attenuation of Galaxies in the Local Universe from GALEX(astro-ph/0411354)

Nov. 12, 2004 astro-ph
We derive a variety of physical parameters including star formation rates (SFRs), dust attenuation and burst mass fractions for 6472 galaxies observed by the Galaxy Evolution Explorer (GALEX) and present in the SDSS DR1 main spectroscopic sample. Parameters are estimated in a statistical way by comparing each observed broad-band SED (two GALEX and five SDSS bands) with an extensive library of model galaxy SEDs, which cover a wide range of star formation histories and include stochastic starbursts. We compare the constraints derived using SDSS bands only with those derived using the combination of SDSS and GALEX photometry. We find that the addition of the GALEX bands leads to significant improvement in the estimation of both the dust optical depth and the star formation rate over timescales of 100 Myr to 1 Gyr in a galaxy. We are sensitive to SFRs as low as 10^{-3} M_sun/yr, and we find that low levels of star formation (SF) are mostly associated with early-type, red galaxies. The least massive galaxies have ratios of current to past-averaged SF rates (b-parameter) consistent with constant SF over a Hubble time. For late-type galaxies, this ratio on average decreases with mass. We find that b correlates tightly with NUV-r color, implying that the SF history of a galaxy can be constrained on the basis of the NUV-r color alone. The fraction of galaxies that have undergone a significant starburst episode within the last 1 Gyr steeply declines with mass-from ~20% for galaxies with ~10^8 M_sun to ~5% for ~10^11 M_sun galaxies.
• ### Systematics of the Ultraviolet Rising flux in a GALEX/SDSS sample of Early-type Galaxies(astro-ph/0411356)

Nov. 12, 2004 astro-ph
We present ultraviolet photometry for a sample of morphologically early-type galaxies selected by matching the Sloan Digital Sky Survey Data Release 1 with the GALEX Medium and All-sky Imaging Surveys. We obtain a working sample of 1032 early-type galaxies with GALEX FUV detections, SDSS spectroscopy, and $z<0.2$. Using the SDSS spectra to identify galaxies with even weak star formation or evidence of AGN, and further removing galaxies with any evidence of non early-type morphology, we derive a final sample of 172 red quiescent early-type galaxies. We find that the $FUV-r$ color has a full range of 5 mag. Plotting against the $FUV-r$ color the metallicity sensitive Lick $\rm Mg_2$ and D4000 indices, and the stellar velocity dispersion, we find no correlation between our measurement of UV rising flux, and any parameter sensitive to metallicity.
• ### GALEX observations of the UV surface brightness and color profiles of the Local Group elliptical galaxy M32 (NGC221)(astro-ph/0411304)

Nov. 11, 2004 astro-ph
M32, the compact elliptical-galaxy companion to the Andromeda spiral galaxy has been imaged by the Galaxy Evolution Explorer (GALEX) in two ultraviolet bands, centered at ~1500 (FUV) and 2300 Angstroms (NUV). The imaging data have been carefully decomposed so as to properly account for the complicated background contamination from the disk of M31. We have derived the surface brightness and color profiles finding a slightly positive color gradient of Delta(FUV-B)/Delta log(r)=+0.15+/-0.03 within one effective radius. Earlier data from the Ultraviolet Imaging Telescope suggested that M32 had an extremely large (negative) FUV-optical color gradient (Delta(FUV-B)/Delta log(r)<-2), inverted with respect to the majority of gradients seen in giant elliptical galaxies. Our new results show that, despite of its very low UV-upturn, M32 has similar UV properties to those observed in luminous elliptical galaxies.
• ### The Ultraviolet Luminosity Function of GALEX Galaxies at Photometric Redshifts Between 0.07 and 0.25(astro-ph/0411305)

Nov. 11, 2004 astro-ph
We present measurements of the UV galaxy luminosity function and the evolution of luminosity density from GALEX observations matched to the Sloan Digital Sky Survey (SDSS). We analyze galaxies in the Medium Imaging Survey overlapping the SDSS DR1 with a total coverage of 44 deg^2. Using the combined GALEX+SDSS photometry, we compute photometric redshifts and study the LF in three redshift shells between z=0.07 and 0.25. The Schechter function fits indicate that the faint-end slope alpha is consistent with -1.1 at all redshifts but the characteristic UV luminosity M* brightens by 0.2 mag from z=0.07 to 0.25. In the lowest redshift bin, early and late type galaxies are studied separately and we confirm that red galaxies tend to be brighter and have a shallower slope alpha than blue ones. The derived luminosity densities are consistent with other GALEX results based on a local spectroscopic sample from 2dF and the evolution follows the trend reported by deeper studies.
• ### Recent Star Formation in the Extreme Outer Disk of M83(astro-ph/0411306)

Nov. 11, 2004 astro-ph
Ultraviolet imaging with the Galaxy Evolution Explorer (GALEX) has revealed an extensive sample of UV-bright stellar complexes in the extreme outer disk of M83, extending to about four times the radius where the majority of HII regions are detected (R_HII = 5.1' or 6.6 kpc). These sources are typically associated with large-scale filamentary HI structures in the warped outer disk of M83, and are distributed beyond the galactocentric radii at which molecular ISM has yet been detected. We present measured properties of these stellar complexes, including FUV and NUV magnitudes and local gas surface density. Only a subset of the outer disk UV sources have corresponding HII regions detected in H-alpha imaging, consistent with a sample of mixed age in which some sources are a few Myr old and others are much more evolved (~ 10^8 yr).


text:
# File:CentralChaoticZoneAroundSmallBody.png

Original file(1,800 × 900 pixels, file size: 459 KB, MIME type: image/png)

Extent of the central chaotic zone around a small body (with $$\mu=1/2$$) as a function of the its rotation frequency $$\omega$$. The red (blue) area correspond to chaotic (regular) dynamics of a test particle orbiting the small body. Left panel: the central chaotic zone border has been obtained analytically. Right panel: stability diagram for a test particle with initial zero eccentricity (from Lages J., Shepelyansky D.L., Shevchenko I.I. (2017). Chaotic zones around rotating small bodies, Astronomical Jour. 153, 272)

## File history

Click on a date/time to view the file as it appeared at that time.

Date/Time Thumbnail Dimensions User Comment current 18:19, 15 August 2017 1,800 × 900 (459 KB) José Lages (Talk | contribs) Extent of the central chaotic zone around a small body (with $$\mu=1/2$$) as a function of the its rotation frequency $$\omega$$. The red (blue) area correspond to chaotic (regular) dynamics of a test particle orbiting the small body. Left panel: the c...

The following page links to this file:


text:
# Upgrading pip fails on Windows when install path is too long #3055

Closed
opened this Issue Aug 24, 2015 · 38 comments

Projects
None yet
9 participants
Contributor

### zooba commented Aug 24, 2015

 Received the following log on Microsoft/PTVS#782. Virtual environment is being created at 'C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env' Virtual environment was successfully created at 'C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env' ----- Installing 'pip' ----- You are using pip version 6.0.8, however version 7.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d Using cached pip-7.1.2-py2.py3-none-any.whl Installing collected packages: pip Found existing installation: pip 6.0.8 Uninstalling pip-6.0.8: Exception: Traceback (most recent call last): File "C:\Python34\lib\shutil.py", line 523, in move os.rename(src, real_dst) FileNotFoundError: [WinError 3] The system cannot find the path specified: 'c:\\users\\trevorsullivan\\source\\repos\\pythonapplication11\\pythonapplication11\\env\\lib\\site-packages\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\_implementation.cpython-34.pyc' -> 'C:\\Users\\TREVOR~1\\AppData\\Local\\Temp\\pip-h64zdfhc-uninstall\\users\\trevorsullivan\\source\\repos\\pythonapplication11\\pythonapplication11\\env\\lib\\site-packages\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\_implementation.cpython-34.pyc' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\basecommand.py", line 232, in main status = self.run(options, args) File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\commands\install.py", line 347, in run root=options.root_path, File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\req\req_set.py", line 543, in install requirement.uninstall(auto_confirm=True) File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\req\req_install.py", line 667, in uninstall paths_to_remove.remove(auto_confirm) File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\req\req_uninstall.py", line 126, in remove renames(path, new_path) File "C:\Users\TrevorSullivan\Source\Repos\PythonApplication11\PythonApplication11\env\lib\site-packages\pip\utils\__init__.py", line 316, in renames shutil.move(old, new) File "C:\Python34\lib\shutil.py", line 535, in move copy2(src, real_dst) File "C:\Python34\lib\shutil.py", line 245, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "C:\Python34\lib\shutil.py", line 109, in copyfile with open(dst, 'wb') as fdst: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\TREVOR~1\\AppData\\Local\\Temp\\pip-h64zdfhc-uninstall\\users\\trevorsullivan\\source\\repos\\pythonapplication11\\pythonapplication11\\env\\lib\\site-packages\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\_implementation.cpython-34.pyc' ----- Failed to install 'pip' ----- The problem seems to be that the entire install path is replicated beneath TEMP, which very quickly exceeds the maximum path length supported by Windows. I guess the aim is to be able to rollback a failed uninstall (which also fails here, and leaves corrupt state), but we may need an alternative to including the full path - maybe generate some sort of map file as well?
Contributor

### xavfernandez commented Sep 1, 2015

 Related to #2892

### RussBaz commented Feb 22, 2016

 I am still experiencing the same issue even though I am using pip 7.1.2 and python 3.5.1. Are there any updates available regarding this issue?

### brettcannon commented Aug 10, 2016 • edited

 Just ran into this under pip 8.1.1 and Python 3.5.2 on Windows 10.
Contributor

### GadgetSteve commented Oct 27, 2016 • edited

 I am wondering if a work around for Windows users might not be to check for paths that are likely to exceed the limit, (260 chars total), and using subst to mount a drive at a suitable point, i.e. identify a spare drive letter and mount that letter to as the TEMP - of course this would not truly fix the problem and deeply nested packages could still hit problems - that is down to Microsoft actually addressing the MAXPATH issue once and for all. If the installation succeeds then the temporary area could be deleted and the subst deleted. In the case of a TEMP location if it fails then the path on the "new" drive could be used for recovery before deletion and the subst deleted. Of course it cannot help someone who already has 23 drive letters mapped A: B: & C: are reserved! In the case of a virtual environment facing the issue I think that the best that can be done is to issue the user an error with a suggestion that they make the virtual environment with --relocatable and either move it higher up the directory tree or use subst to put it at the top of a "new" drive. I have just done a quick test on a Windows 10 (Anniversary Update) 64 bit machine and it would quite happily allow me to create a directory 217 characters long, (at which point the next mkdir failed and then mount it with 'subst' to a new drive letter and create a path 117 characters long on that drive - all that I had time for.
Contributor Author

### zooba commented Oct 27, 2016

 FWIW, Windows 10 allows the option to disable MAX_PATH limits for "self-certified" applications, which will include Python 3.6. Currently there's a machine policy that needs to be enabled, and the Python 3.6 installer will prompt users to do that (if they can - need to be admin). So the issue will go away in the future, and anything else we do now is mitigation for people on existing setups (which obviously has a lot of value, since it's going to be a long time before everyone is on Python 3.6 on Windows 10).
Contributor

### GadgetSteve commented Oct 29, 2016

 @zooba - My reading so far suggests that the disable MAX_PATH limits option is only planned to be available or possibly only accessible in Widows 10 Pro and Enterprise editions not the home edition.
Contributor Author

### zooba commented Oct 31, 2016 • edited

 @GadgetSteve Where are you reading that? It's highly unlikely that such core APIs would be different between Windows SKUs, though of course there's no support included in the home editions for managing group policy. Shouldn't prevent the registry edits from working though.
Contributor

### GadgetSteve commented Oct 31, 2016

 @zooba It looks like the only way to enable the change for the user is via the Group Policy Editor which is missing from the Home editions - I have had too many changes that should work via registry edits fail to work, revert on a MS Update or work erratically, (e.g. I cannot get the numb-lock to survive a reboot on Win 10 even after the registry edits), to be completely happy with the idea of relying on them.

Closed

Merged

Closed

Member

### pradyunsg commented Aug 21, 2017

 @pfmoore Any ideas on what could be a possible workaround for this?
Contributor

### GadgetSteve commented Aug 21, 2017

 On 21/08/2017 11:29, Pradyun Gedam wrote: @pfmoore Any ideas on what could be a possible workaround for this? If you are on Windows 10 applying the changes detailed at https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ is a very good option. Otherwise options include: Installing python to a short path, e.g. C:\Py36 for Python 3.6 and setting temp to c:\tmp can sometimes help. If the path that is too long is the cashe path you can use pip --cache-dir=C:\PyCashe and the --root and --prefix options can also be helpful and sometimes you can make a long path into a short one with the command line subst and mklink commands. Of course there is always the option to switch to Linux... -- Steve (Gadget) Barnes Any opinions in this message are my personal opinions and do not reflect those of my employer. … --- This email has been checked for viruses by AVG. http://www.avg.com
Contributor

### GadgetSteve commented Aug 21, 2017

 On 31/10/2016 16:52, Steve Dower wrote: @GadgetSteve Where are you reading that? It's highly unlikely that such core APIs would be different between Windows versions, though of course there's no support included in the home editions for managing group policy. Shouldn't prevent the registry edits from working though. The registry edits do work the early story that I was reading claimed that the fix would not be available other than via the group policy editor. … -- Steve (Gadget) Barnes Any opinions in this message are my personal opinions and do not reflect those of my employer. --- This email has been checked for viruses by AVG. http://www.avg.com

Closed

Member

### pradyunsg commented Aug 21, 2017 • edited

 Thanks @GadgetSteve! I'll try to summarise what I've understood. Here's how one can workaround this issue as of today: If you can use Python 3.6 and Windows 10, use them. Along with everything else, it has support for the long paths - since the Anniversary Update of Windows 10. You might have to enable long path support on Windows 10 though. [instructions] If you don't have the ability to use Windows 10 and Python 3.6, you'll have to workin the restrictions set by Windows: You can use the --cache-dir option to set a cache directory that's shorter. Set TEMP as a shorter path - like C:\Temp You can try making a long path into a short one with the command line tools subst and mklink commands. (but don't)
Member

### pradyunsg commented Aug 21, 2017

 Since this is basically fixed with the latest versions of the software involved (pip 9.0.1, Python 3.6.1, Windows 10 with Anniversary) - should there be changes in pip to workaround this issue?

### pfmoore added the R: deferred till PR label Aug 21, 2017

Contributor Author

### zooba commented Aug 21, 2017

 I wouldn't suggest going down the subst or mklink routes at all. pip should just name its temp directory something other than the full path to the eventual/original install location. The fix in Python 3.6 and Windows 10 is fine, but will never apply to all users.
Contributor

### GadgetSteve commented Aug 21, 2017

 Of course some deeply nested libraries may well end up hitting the problem with the actual files final location for user installs of python which is problematic, even if it never gets that far with the current process, maybe we also need a separate ticket for getting pip to auto-install to wheel with no override if platform is Windows and any of the resulting paths would exceed the limit.
Member

### pfmoore commented Aug 21, 2017

 I agree with @zooba - that's the form I'd expect such a patch to take. If pip can't install to the final location (as @GadgetSteve suggests) that's not an issue for pip - we'll get an OS error and roll back the install, and it's then the user's issue to solve.

Member

### pradyunsg commented Aug 21, 2017

 should there be changes in pip to workaround this issue? Yes - a patch is needed that shortens pip's temporary directory paths. FTR, "awaiting PR" is essentially for indicating that further discussion related to this issue should be deferred until someone comes around to make a PR.

Member

### pfmoore commented Aug 21, 2017

 Ah, OK. I've removed the label in that case, as there's no real need for any discussion. Do we not have a label for "Agreed to be a reasonable request, but won't go further until someone steps up with a PR"?
Member

### pradyunsg commented Aug 22, 2017

 @pfmoore Nope. Now that I think of it, the only reason I don't wanna use that label is because I have used it in a different context. I've mostly used a comment after labelling to describe the state of the issue; so, stating that you just need to make the PR would probably be fine here too. So, I dent mind if this gets labeled as awaiting PR. Maybe we should rename the current label to "deferred till PR" and add a new label with the current name for this situation? … On Tue, Aug 22, 2017, 03:01 Paul Moore ***@***.***> wrote: Ah, OK. I've removed the label in that case, as there's no real need for any discussion. Do we not have a label for "Agreed to be a reasonable request, but won't go further until someone steps up with a PR"? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3055 (comment)>, or mute the thread .
Member

### pradyunsg commented Aug 22, 2017

 Maybe we should rename the current label to "deferred till PR" and add a new label with the current name for this situation? I've gone ahead and done this.

Member

### pradyunsg commented Aug 22, 2017

 pip should just name its temp directory something other than the full path to the eventual/original install location. Noting for whomsoever comes around to making a PR for this, the behaviour change would be to shorten pip's temporary directories by not being the full path to the install location.

Open

Closed

Contributor

### GadgetSteve commented Jan 13, 2018

 On 27/10/2016 17:48, Steve Dower wrote: FWIW, Windows 10 allows the option to disable MAX_PATH limits for "self-certified" applications, which will include Python 3.6. Currently there's a machine policy that needs to be enabled, and the Python 3.6 installer will prompt users to do that (if they can - need to be admin). So the issue will go away in the future, and anything else we do now is mitigation for people on existing setups (which obviously has a lot of value, since it's going to be a long time before /everyone/ is on Python 3.6 on Windows 10). — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3055 (comment)>, or mute the thread . Note that selecting this option enables long paths for everything, including python 2.7, and AFAIK it remains enabled even if the version of python that enabled it is subsequently removed. … -- Steve (Gadget) Barnes Any opinions in this message are my personal opinions and do not reflect those of my employer.

### alexsilva commented Jan 30, 2018

 Path Length Limitation "\\?\D:\very long path" Note The maximum path of 32,767 characters is approximate, because the "\?" prefix may be expanded to a longer string by the system at run time, and this expansion applies to the total length.

Closed

Closed

### zooba referenced this issue Nov 21, 2018

Open

#### pip uninstall cannot create file in default TEMP path #6019

Contributor Author

### zooba commented Nov 21, 2018

 Question for @pradyunsg @pfmoore @dstufft: would you consider a change to try and use a random name in the target directory instead of TEMP? This has the nice advantage that we can simply rename a directory and then try to delete it, rather than doing multiple copies. When used on install, we can extract/install to the random name and then just rename the directory when it looks good, which drastically simplifies the process of copying permissions/etc., as they'll be inherited normally. And if the user doesn't have permissions to install, it'll fail much sooner. In both cases, the random name can be the same length as the target name, which will ensure that path length issues don't get any worse than when the package is installed. I guess the downside is potentially leftover files in the install directory when pip hard crashes, but the upside is less crashing and significantly faster installs (I've prototyped some parts of this on Windows and we're talking at least 2x faster for big packages like Django). Thoughts? Given one-off installs into virtual environments are becoming the norm, I think the risk of cruft being left behind in install directories is worth the other benefits.
Member

### dstufft commented Nov 21, 2018

 Seems reasonable to me, I'd just say we should use a name that isn't importable as well.
Contributor Author

### zooba commented Nov 21, 2018

 Substituting the first character with a digit is probably an easy algorithm, at least for the first 10 attempts :)
Member

### dstufft commented Nov 21, 2018

 Yea, or add a prefix like -pip-tmp or something.
Contributor Author

### zooba commented Nov 21, 2018

 I want to avoid generating a longer name, if possible. If we cross the 260 char barrier here, install will fail when the package would otherwise work (apart from caching pyc files... but oh well).
Member

### dstufft commented Nov 21, 2018

 Ah right, that makes sense. Okay.
Member

### dstufft commented Nov 21, 2018

 I think I'd use a leading - or something instead of a digit, just because it feel more purposeful to me? But that's kind of nitpicky, so just a suggestion.
Contributor Author

### zooba commented Nov 21, 2018

 I think it'll have to be an invalid character in a dist-info folder name as well, since those will need the same treatment. So probably I'm going to end up with a list of invalid package name characters that are valid directory name characters and swap them in until there's a free one. Trying - (or ~?) first is fine by me.
Member

### dstufft commented Nov 21, 2018

 Presumably another option here is to just not put the entire path inside of the temporary directory as well? Like if there's some common prefix here, we should be able to just exclude that from the temporary directory path that we generate so we're not nesting things nearly as far. That would turn something like: C:\\Users\\TREVOR~1\\AppData\\Local\\Temp\\pip-h64zdfhc-uninstall\\users\\trevorsullivan\\source\\repos\\pythonapplication11\\pythonapplication11\\env\\lib\\site-packages\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\_implementation.cpython-34.pyc into C:\\Users\\TREVOR~1\\AppData\\Local\\Temp\\pip-h64zdfhc-uninstall\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\_implementation.cpython-34.pyc It doesn't have the other benefits though (simple renames, etc) and it means it could still fail when this strategy works in the case the TMPDIR path is longer than the common prefix we'd remove. On the flip side, it does mean that it's probably a smaller delta in our current behavior which may be a "safer" change to make. I don't feel strongly one way or another, but the idea popped into my head so figured I'd mention it.
Contributor Author

### zooba commented Nov 21, 2018

 Yeah, that is going to deal with the original problem here (most of the time). I think it was suggested a few times higher on the thread, and it's definitely a much simpler change. That said, I think the uninstall case is going to be just as simple to rename and then rmtree, so the delta doesn't get much bigger. And the perf benefit to wheel extraction is worth doing in-place as well. Maybe I'll start with uninstall though and send two separate PRs.
Member

### pfmoore commented Nov 21, 2018

 I'm OK with the idea of a random name in the target. Just to be clear, we're talking about the temporary install directory that gets moved into place for the final install? Not the build directory?
Member

### pradyunsg commented Nov 21, 2018

 Sounds OK to me as well.
Contributor Author

### zooba commented Nov 21, 2018

 Just to be clear, we're talking about the temporary install directory that gets moved into place for the final install? Not the build directory? Correct. IIUC, eventually all installs will come from/via wheels, right? So the install side will only affect the wheel extraction directory, and shouldn't touch build at all.
Member

### pfmoore commented Nov 21, 2018

 Yep, under PEP 517 (now in master, but not yet used for all builds) we set up a build directory (which will still be in \$TEMP) and call the backend to build a wheel. We then extract the wheel and move the extracted files. If we extract to a random-named directory in the target location and move, that will skip a whole copy step, which is a definite performance improvement[1] Legacy non-PEP517 installs go direct via setup.py install, so there's no wheel or wheel extraction step, so they won't change (which is fine by me, as you say that code path is destined for removal anyway) [1] We might get a double improvement - I don't know much about how anti-virus software works, but if it can recognise that a move doesn't require a new scan, that could mean that the proposed approach will remove an extra unneeded virus scan as well.
Contributor Author

### zooba commented Nov 21, 2018

 Pretty sure we'll get that double improvement :) I've been profiling with AV scanning enabled, and it seems to be triggered totally differently between copyfile (open/read/close/open/write/close) and rename.

Merged

Open

### pfmoore added a commit that referenced this issue Dec 6, 2018

Merge pull request #6029 from zooba/issue-3055
Fixes #3055 Uninstall causes paths to exceed MAX_PATH limit

### borsbot added a commit to mozilla/normandy that referenced this issue Feb 7, 2019

Merge #1723
1723: Scheduled weekly dependency update for week 05 r=mythmon a=pyup-bot

### Update [atomicwrites](https://pypi.org/project/atomicwrites) from **1.2.1** to **1.3.0**.

*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>

- PyPI: https://pypi.org/project/atomicwrites
- Repo: https://github.com/untitaker/python-atomicwrites
</details>

### Update [botocore](https://pypi.org/project/botocore) from **1.12.82** to **1.12.86**.

<details>
<summary>Changelog</summary>

### 1.12.86

=======

* api-change:devicefarm: Update devicefarm client to latest version
* api-change:codecommit: Update codecommit client to latest version
* api-change:medialive: Update medialive client to latest version
* api-change:mediaconnect: Update mediaconnect client to latest version

### 1.12.85

=======

* api-change:logs: Update logs client to latest version
* api-change:elbv2: Update elbv2 client to latest version
* api-change:rds: Update rds client to latest version
* api-change:codebuild: Update codebuild client to latest version
* api-change:sms-voice: Update sms-voice client to latest version
* api-change:ecr: Update ecr client to latest version

### 1.12.84

=======

* api-change:worklink: Update worklink client to latest version
* api-change:apigatewaymanagementapi: Update apigatewaymanagementapi client to latest version
* api-change:acm-pca: Update acm-pca client to latest version

### 1.12.83

=======

* api-change:appstream: Update appstream client to latest version
* api-change:discovery: Update discovery client to latest version
* api-change:dms: Update dms client to latest version
* api-change:fms: Update fms client to latest version
* api-change:ssm: Update ssm client to latest version

</details>

<details>

- PyPI: https://pypi.org/project/botocore
- Changelog: https://pyup.io/changelogs/botocore/
- Repo: https://github.com/boto/botocore
</details>

### Update [Faker](https://pypi.org/project/Faker) from **1.0.1** to **1.0.2**.

<details>
<summary>Changelog</summary>

### 1.0.2

--------------------------------------------------------------------------------------

* Fix state abbreviations for id_ID to be 2-letters. Thanks dt-ap.
* Fix format for city_with_postcode on de_DE locale. Thanks TZanke.
* Update person providers for zh_CN. Thanks TimeFinger.
* Implement zipcode_in_state and aliases in en_US locale for generating
a zipcode for a specified state. Thanks mattyg.
* Group first names by gender on zh_CN provider. Thanks TimeFinger.

</details>

<details>

- PyPI: https://pypi.org/project/faker
- Changelog: https://pyup.io/changelogs/faker/
- Repo: https://github.com/joke2k/faker
</details>

### Update [pycodestyle](https://pypi.org/project/pycodestyle) from **2.4.0** to **2.5.0**.

<details>
<summary>Changelog</summary>

### 2.5.0

------------------

New checks:

* E117: Over-indented code blocks
* W505: Maximum doc-string length only when configured with --max-doc-length

Changes:

* Remove support for EOL Python 2.6 and 3.3. PR 720.
* Add E117 error for over-indented code blocks.
* Allow W605 to be silenced by  noqa and fix the position reported by W605
* Allow users to omit blank lines around one-liner definitions of classes and
functions
* Include the function return annotation (->) as requiring surrounding
whitespace only on Python 3
* Verify that only names can follow await. Previously we allowed numbers
and strings.
* Add support for Python 3.7
* Fix detection of annotated argument defaults for E252
* Cprrect the position reported by W504

</details>

<details>

- PyPI: https://pypi.org/project/pycodestyle
- Changelog: https://pyup.io/changelogs/pycodestyle/
</details>

### Update [pyflakes](https://pypi.org/project/pyflakes) from **2.0.0** to **2.1.0**.

<details>
<summary>Changelog</summary>

### 2.1.0

- Allow intentional assignment to variables named _
- Recognize __module__ as a valid name in class scope
- pyflakes.checker.Checker supports checking of partial ast trees
- Detect assign-before-use for local variables which shadow builtin names
- Detect invalid print syntax using >> operator
- Treat async for the same as a for loop for introducing variables
- Add detection for list concatenation in __all__
- Exempt typing.overload from duplicate function declaration
- Importing a submodule of an as-aliased import-import is marked as
used
- Report undefined names from __all__ as possibly coming from a *
import
- Add support for changes in Python 3.8-dev
- Add support for PEP 563 (from __future__ import annotations)
- Include Python version and platform information in pyflakes --version
- Recognize __annotations__ as a valid magic global in Python 3.6+
- Mark names used in PEP 484  type: ... comments as used
- Add check for use of is operator with str, bytes, and int
literals

</details>

<details>

- PyPI: https://pypi.org/project/pyflakes
- Changelog: https://pyup.io/changelogs/pyflakes/
- Repo: https://github.com/PyCQA/pyflakes
</details>

### Update [setuptools](https://pypi.org/project/setuptools) from **40.6.3** to **40.7.3**.

<details>
<summary>Changelog</summary>

### 40.7.3

-------

* 1670: In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use urllib.parse.urlparse led to problems as reported in 1663 and 1668. This change serves as an alternative to 1499 and fixes 1668.

### 40.7.2

-------

* 1666: Restore port in URL handling in package_index.

### 40.7.1

-------

* 1660: On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations.

### 40.7.0

-------

* 1551: File inputs for the license field in setup.cfg files now explicitly raise an error.
* 1180: Add support for non-ASCII in setup.cfg (1062). Add support for native strings on some parameters (1136).
* 1499: setuptools.package_index no longer relies on the deprecated urllib.parse.splituser per Python 27485.
* 1625: In PEP 517 build_meta builder, ensure that sdists are built as gztar per the spec.

</details>

<details>

- PyPI: https://pypi.org/project/setuptools
- Changelog: https://pyup.io/changelogs/setuptools/
- Repo: https://github.com/pypa/setuptools
</details>

### Update [cachetools](https://pypi.org/project/cachetools) from **3.0.0** to **3.1.0**.

<details>
<summary>Changelog</summary>

### 3.1.0

-------------------

- Fix Python 3.8 compatibility issue.

- Use time.monotonic as default timer if available.

- Improve documentation regarding thread safety.

</details>

<details>

- PyPI: https://pypi.org/project/cachetools
- Changelog: https://pyup.io/changelogs/cachetools/
- Repo: https://github.com/tkem/cachetools
</details>

### Update [boto3](https://pypi.org/project/boto3) from **1.9.82** to **1.9.86**.

<details>
<summary>Changelog</summary>

### 1.9.86

======

* api-change:devicefarm: [botocore] Update devicefarm client to latest version
* api-change:codecommit: [botocore] Update codecommit client to latest version
* api-change:medialive: [botocore] Update medialive client to latest version
* api-change:mediaconnect: [botocore] Update mediaconnect client to latest version

### 1.9.85

======

* api-change:logs: [botocore] Update logs client to latest version
* api-change:elbv2: [botocore] Update elbv2 client to latest version
* api-change:rds: [botocore] Update rds client to latest version
* api-change:codebuild: [botocore] Update codebuild client to latest version
* api-change:sms-voice: [botocore] Update sms-voice client to latest version
* api-change:ecr: [botocore] Update ecr client to latest version

### 1.9.84

======

* api-change:worklink: [botocore] Update worklink client to latest version
* api-change:apigatewaymanagementapi: [botocore] Update apigatewaymanagementapi client to latest version
* api-change:acm-pca: [botocore] Update acm-pca client to latest version

### 1.9.83

======

* api-change:appstream: [botocore] Update appstream client to latest version
* api-change:discovery: [botocore] Update discovery client to latest version
* api-change:dms: [botocore] Update dms client to latest version
* api-change:fms: [botocore] Update fms client to latest version
* api-change:ssm: [botocore] Update ssm client to latest version

</details>

<details>

- PyPI: https://pypi.org/project/boto3
- Changelog: https://pyup.io/changelogs/boto3/
- Repo: https://github.com/boto/boto3
</details>

### Update [flake8](https://pypi.org/project/flake8) from **3.6.0** to **3.7.5**.

<details>
<summary>Changelog</summary>

### 3.7.5

-------------------

You can view the 3.7.5 milestone_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

GitLab!301_, GitLab503_)

.. _3.7.5 milestone:
https://gitlab.com/pycqa/flake8/milestones/28

.. _GitLab503:
https://gitlab.com/pycqa/flake8/issues/503

.. _GitLab!301:
https://gitlab.com/pycqa/flake8/merge_requests/301

### 3.7.4

-------------------

You can view the 3.7.4 milestone_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

- Fix performance regression with lots of per-file-ignores and errors
(See also GitLab!299_, GitLab501_)

.. _3.7.4 milestone:
https://gitlab.com/pycqa/flake8/milestones/27

.. _GitLab501:
https://gitlab.com/pycqa/flake8/issues/501

.. _GitLab!299:
https://gitlab.com/pycqa/flake8/merge_requests/299

### 3.7.3

-------------------

You can view the 3.7.3 milestone_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

- Fix imports of typing in python 3.5.0 / 3.5.1 (See also GitLab!294_,
GitLab498_)

- Fix flake8 --statistics (See also GitLab!295_, GitLab499_)

- Gracefully ignore flake8-per-file-ignores plugin if installed (See also
GitLab!297_, GitLab495_)

- Improve error message for malformed per-file-ignores (See also
GitLab!298_, GitLab489_)

.. _3.7.3 milestone:
https://gitlab.com/pycqa/flake8/milestones/26

.. _GitLab489:
https://gitlab.com/pycqa/flake8/issues/489
.. _GitLab495:
https://gitlab.com/pycqa/flake8/issues/495
.. _GitLab498:
https://gitlab.com/pycqa/flake8/issues/498
.. _GitLab499:
https://gitlab.com/pycqa/flake8/issues/499

.. _GitLab!294:
https://gitlab.com/pycqa/flake8/merge_requests/294
.. _GitLab!295:
https://gitlab.com/pycqa/flake8/merge_requests/295
.. _GitLab!297:
https://gitlab.com/pycqa/flake8/merge_requests/297
.. _GitLab!298:
https://gitlab.com/pycqa/flake8/merge_requests/298

### 3.7.2

-------------------

You can view the 3.7.2 milestone_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

- Fix broken flake8 --diff (regressed in 3.7.0) (See also GitLab!292_,
GitLab490_)

- Fix typo in plugin exception reporting (See also GitLab!275_,
GitLab491_)

- Fix AttributeError while attempting to use the legacy api (regressed in
3.7.0) (See also GitLab!293_, GitLab497_)

.. _3.7.2 milestone:
https://gitlab.com/pycqa/flake8/milestones/25

.. _GitLab490:
https://gitlab.com/pycqa/flake8/issues/490
.. _GitLab491:
https://gitlab.com/pycqa/flake8/issues/491
.. _GitLab497:
https://gitlab.com/pycqa/flake8/issues/497

.. _GitLab!292:
https://gitlab.com/pycqa/flake8/merge_requests/292
.. _GitLab!275:
https://gitlab.com/pycqa/flake8/merge_requests/275
.. _GitLab!293:
https://gitlab.com/pycqa/flake8/merge_requests/293

### 3.7.1

-------------------

You can view the 3.7.1 milestone_ on GitLab for more details.

Bugs Fixed
~~~~~~~~~~

- Fix capitalized filenames in per-file-ignores setting (See also
GitLab!290_, GitLab488_)

.. _3.7.1 milestone:
https://gitlab.com/pycqa/flake8/milestones/24

.. _GitLab488:
https://gitlab.com/pycqa/flake8/issues/488

.. _GitLab!290:
https://gitlab.com/pycqa/flake8/merge_requests/290

### 3.7.0

-------------------

You can view the 3.7.0 milestone_ on GitLab for more details.

New Dependency Information
~~~~~~~~~~~~~~~~~~~~~~~~~~

- Add dependency on entrypoints >= 0.3, < 0.4 (See also GitLab!264_,
GitLab!288_)

- Pyflakes has been updated to >= 2.1.0, < 2.2.0 (See also GitLab!283_,
GitLab!285_)

- pycodestyle has been updated to >= 2.5.0, < 2.6.0 (See also GitLab!287_)

Features
~~~~~~~~

- Add support for per-file-ignores (See also GitLab!259_, GitLab156_,
GitLab!281_, GitLab471_)

- Enable use of float and complex option types (See also GitLab!261_,
GitLab452_)

- Improve startup performance by switching from pkg_resources to
entrypoints (See also GitLab!264_)

- Add metadata for use through the pre-commit_ git hooks framework (See also
GitLab!268_, GitLab!284_)

- Allow physical line checks to return more than one result (See also
GitLab!269_)

- Allow  noqa:X123 comments without space between the colon and codes
list (See also GitLab!273_, GitLab470_)

- Remove broken and unused flake8.listen plugin type (See also
GitLab!274_, GitLab480_)

.. _3.7.0 milestone:
https://gitlab.com/pycqa/flake8/milestones/23
.. _pre-commit:
https://pre-commit.com/

.. _GitLab156:
https://gitlab.com/pycqa/flake8/issues/156
.. _GitLab452:
https://gitlab.com/pycqa/flake8/issues/452
.. _GitLab470:
https://gitlab.com/pycqa/flake8/issues/470
.. _GitLab471:
https://gitlab.com/pycqa/flake8/issues/471
.. _GitLab480:
https://gitlab.com/pycqa/flake8/issues/480

.. _GitLab!259:
https://gitlab.com/pycqa/flake8/merge_requests/259
.. _GitLab!261:
https://gitlab.com/pycqa/flake8/merge_requests/261
.. _GitLab!264:
https://gitlab.com/pycqa/flake8/merge_requests/264
.. _GitLab!268:
https://gitlab.com/pycqa/flake8/merge_requests/268
.. _GitLab!269:
https://gitlab.com/pycqa/flake8/merge_requests/269
.. _GitLab!273:
https://gitlab.com/pycqa/flake8/merge_requests/273
.. _GitLab!274:
https://gitlab.com/pycqa/flake8/merge_requests/274
.. _GitLab!281:
https://gitlab.com/pycqa/flake8/merge_requests/281
.. _GitLab!283:
https://gitlab.com/pycqa/flake8/merge_requests/283
.. _GitLab!284:
https://gitlab.com/pycqa/flake8/merge_requests/284
.. _GitLab!285:
https://gitlab.com/pycqa/flake8/merge_requests/285
.. _GitLab!287:
https://gitlab.com/pycqa/flake8/merge_requests/287
.. _GitLab!288:
https://gitlab.com/pycqa/flake8/merge_requests/288

</details>

<details>

- PyPI: https://pypi.org/project/flake8
- Changelog: https://pyup.io/changelogs/flake8/
- Repo: https://gitlab.com/pycqa/flake8
</details>

### Update [newrelic](https://pypi.org/project/newrelic) from **4.10.0.112** to **4.12.0.113**.

<details>
<summary>Changelog</summary>

### 4.12.0.113

This release of the Python agent extends support of Amazon's boto3 library and includes bug fixes.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.

Features

AWS operation and request ID will now be reported in transaction traces and
spans when using boto3 and botocore.

The agent will now report aws.requestId and aws.operation for all calls
to AWS made using botocore and boto3.
DynamoDB calls are now reported under the Databases tab.

The agent will now record DynamoDB query performance in the Databases tab in
APM in addition to table name for the following calls:

put_item
get_item
update_item
delete_item
create_table
delete_table
query
scan

traces.

The agent will now record the queue name in spans and transaction traces for
the following SQS calls:

send_message
send_message_batch

The SNS topic, target, or the string literal PhoneNumber will be reported to
New Relic inside of spans and transaction traces.
The full URL path will now be recorded on span events and transaction traces
when using boto3 or botocore.

The agent will now record the full URL path for API calls made to AWS through
the boto3 / botocore libraries. The path will be available through span
events and transaction traces.

Bug Fixes

Using newrelic-admin to start a GunicornWebWorker with an application factory
resulted in an application crash.

The agent would fail to start if using the newrelic-admin command to start an
aiohttp application factory with GunicornWebWorker. This issue has now been
fixed.

</details>

<details>

- PyPI: https://pypi.org/project/newrelic
- Changelog: https://pyup.io/changelogs/newrelic/
- Homepage: http://newrelic.com/docs/python/new-relic-for-python
</details>

### Update [psycopg2](https://pypi.org/project/psycopg2) from **2.7.6.1** to **2.7.7**.

<details>
<summary>Changelog</summary>

### 2.7.7

^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Cleanup of the cursor results assignment code, which might have solved
double free and inconsistencies in concurrent usage (🎟346, 384).
- Wheel package compiled against OpenSSL 1.0.2q.

</details>

<details>

- PyPI: https://pypi.org/project/psycopg2
- Changelog: https://pyup.io/changelogs/psycopg2/
- Homepage: http://initd.org/psycopg/
</details>

### Update [pyasn1-modules](https://pypi.org/project/pyasn1-modules) from **0.2.3** to **0.2.4**.

*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>

- PyPI: https://pypi.org/project/pyasn1-modules
- Changelog: https://pyup.io/changelogs/pyasn1-modules/
- Repo: https://github.com/etingof/pyasn1-modules
</details>

### Update [pytest-django](https://pypi.org/project/pytest-django) from **3.4.5** to **3.4.7**.

<details>
<summary>Changelog</summary>

### 3.4.7

------------------

Bugfixes
^^^^^^^^

* Fix disabling/handling of unittest methods with pytest 4.2+ (700)

### 3.4.6

------------------

Bugfixes
^^^^^^^^

* django_find_project: add cwd as fallback always (690)

Misc
^^^^

* Enable tests for Django 2.2 and add classifier (693)
* Disallow pytest 4.2.0 in install_requires (697)

</details>

<details>

- PyPI: https://pypi.org/project/pytest-django
- Changelog: https://pyup.io/changelogs/pytest-django/
</details>

### Update [pytest](https://pypi.org/project/pytest) from **4.1.1** to **4.2.0**.

<details>
<summary>Changelog</summary>

### 4.2.0

=========================

Features
--------

- 3094 <https://github.com/pytest-dev/pytest/issues/3094>_: Class xunit-style <https://docs.pytest.org/en/latest/xunit_setup.html>__ functions and methods
now obey the scope of *autouse* fixtures.

This fixes a number of surprising issues like setup_method being called before session-scoped
autouse fixtures (see 517 <https://github.com/pytest-dev/pytest/issues/517>__ for an example).

- 4627 <https://github.com/pytest-dev/pytest/issues/4627>_: Display a message at the end of the test session when running under Python 2.7 and 3.4 that pytest 5.0 will no longer
support those Python versions.

- 4660 <https://github.com/pytest-dev/pytest/issues/4660>_: The number of *selected* tests now are also displayed when the -k or -m flags are used.

- 4688 <https://github.com/pytest-dev/pytest/issues/4688>_: pytest_report_teststatus hook now can also receive a config parameter.

- 4691 <https://github.com/pytest-dev/pytest/issues/4691>_: pytest_terminal_summary hook now can also receive a config parameter.

Bug Fixes
---------

- 3547 <https://github.com/pytest-dev/pytest/issues/3547>_: --junitxml can emit XML compatible with Jenkins xUnit.
junit_family INI option accepts legacy|xunit1, which produces old style output, and xunit2 that conforms more strictly to https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd

- 4280 <https://github.com/pytest-dev/pytest/issues/4280>_: Improve quitting from pdb, especially with --trace.

Using q[quit] after pdb.set_trace() will quit pytest also.

- 4402 <https://github.com/pytest-dev/pytest/issues/4402>_: Warning summary now groups warnings by message instead of by test id.

This makes the output more compact and better conveys the general idea of how much code is
actually generating warnings, instead of how many tests call that code.

- 4536 <https://github.com/pytest-dev/pytest/issues/4536>_: monkeypatch.delattr handles class descriptors like staticmethod/classmethod.

- 4649 <https://github.com/pytest-dev/pytest/issues/4649>_: Restore marks being considered keywords for keyword expressions.

- 4653 <https://github.com/pytest-dev/pytest/issues/4653>_: tmp_path fixture and other related ones provides resolved path (a.k.a real path)

- 4667 <https://github.com/pytest-dev/pytest/issues/4667>_: pytest_terminal_summary uses result from pytest_report_teststatus hook, rather than hardcoded strings.

- 4669 <https://github.com/pytest-dev/pytest/issues/4669>_: Correctly handle unittest.SkipTest exception containing non-ascii characters on Python 2.

- 4680 <https://github.com/pytest-dev/pytest/issues/4680>_: Ensure the tmpdir and the tmp_path fixtures are the same folder.

- 4681 <https://github.com/pytest-dev/pytest/issues/4681>_: Ensure tmp_path is always a real path.

Trivial/Internal Changes
------------------------

- 4643 <https://github.com/pytest-dev/pytest/issues/4643>_: Use a.item() instead of the deprecated np.asscalar(a) in pytest.approx.

np.asscalar has been deprecated <https://github.com/numpy/numpy/blob/master/doc/release/1.16.0-notes.rstnew-deprecations>__ in numpy 1.16..

- 4657 <https://github.com/pytest-dev/pytest/issues/4657>_: Copy saferepr from pylib

</details>

<details>

- PyPI: https://pypi.org/project/pytest
- Changelog: https://pyup.io/changelogs/pytest/
- Homepage: https://docs.pytest.org/en/latest/
</details>

### Update [pytest-mock](https://pypi.org/project/pytest-mock) from **1.10.0** to **1.10.1**.

*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>

- PyPI: https://pypi.org/project/pytest-mock
- Changelog: https://pyup.io/changelogs/pytest-mock/
- Repo: https://github.com/pytest-dev/pytest-mock/
</details>

### Update [Sphinx](https://pypi.org/project/Sphinx) from **1.8.3** to **1.8.4**.

<details>
<summary>Changelog</summary>

### 1.8.4

=====================================

Bugs fixed
----------

* 3707: latex: no bold checkmark (✔) available.
* 5605: with the documentation language set to Chinese, English words could not
be searched.
* 5889: LaTeX: user numfig_format is stripped of spaces and may cause
build failure
* C++, fix hyperlinks for declarations involving east cv-qualifiers.
* 5755: C++, fix duplicate declaration error on function templates with constraints
in the return type.
* C++, parse unary right fold expressions and binary fold expressions.
* pycode could not handle egg files on windows
* 5928: KeyError: 'DOCUTILSCONFIG' when running build
* 5936: LaTeX: PDF build broken by inclusion of image taller than page height
* 5231: "make html" does not read and build "po" files in "locale" dir
* 5954: :scale: image option may break PDF build if image in an admonition
* 5966: mathjax has not been loaded on incremental build
* 5960: LaTeX: modified PDF layout since September 2018 TeXLive update of
:file:parskip.sty
* 5948: LaTeX: duplicated labels are generated for sections
* 5958: versionadded directive causes crash with Python 3.5.0
* 5995: autodoc: autodoc_mock_imports conflict with metaclass on Python 3.7
* 5871: texinfo: a section title . is not allowed

</details>

<details>

- PyPI: https://pypi.org/project/sphinx
- Changelog: https://pyup.io/changelogs/sphinx/
- Homepage: http://sphinx-doc.org/
</details>

### Update [pip](https://pypi.org/project/pip) from **18.1** to **19.0.1**.

<details>
<summary>Changelog</summary>

### 19.0

=================

Deprecations and Removals
-------------------------

- Deprecate support for Python 3.4 (6106 <https://github.com/pypa/pip/issues/6106>_)
- Start printing a warning for Python 2.7 to warn of impending Python 2.7 End-of-life and
prompt users to start migrating to Python 3. (6148 <https://github.com/pypa/pip/issues/6148>_)
- Remove the deprecated --process-dependency-links option. (6060 <https://github.com/pypa/pip/issues/6060>_)
- Remove the deprecated SVN editable detection based on dependency links
during freeze. (5866 <https://github.com/pypa/pip/issues/5866>_)

Features
--------

- Implement PEP 517 (allow projects to specify a build backend via pyproject.toml). (5743 <https://github.com/pypa/pip/issues/5743>_)
- Implement manylinux2010 platform tag support.  manylinux2010 is the successor
to manylinux1.  It allows carefully compiled binary wheels to be installed
on compatible Linux platforms. (5008 <https://github.com/pypa/pip/issues/5008>_)
- Improve build isolation: handle .pth files, so namespace packages are correctly supported under Python 3.2 and earlier. (5656 <https://github.com/pypa/pip/issues/5656>_)
- Include the package name in a freeze warning if the package is not installed. (5943 <https://github.com/pypa/pip/issues/5943>_)
- Warn when dropping an --[extra-]index-url value that points to an existing local directory. (5827 <https://github.com/pypa/pip/issues/5827>_)
- Prefix pip's --log file lines with their timestamp. (6141 <https://github.com/pypa/pip/issues/6141>_)

Bug Fixes
---------

- Avoid creating excessively long temporary paths when uninstalling packages. (3055 <https://github.com/pypa/pip/issues/3055>_)
- Redact the password from the URL in various log messages. (4746 <https://github.com/pypa/pip/issues/4746>_, 6124 <https://github.com/pypa/pip/issues/6124>_)
- Avoid creating excessively long temporary paths when uninstalling packages. (3055 <https://github.com/pypa/pip/issues/3055>_)
- Avoid printing a stack trace when given an invalid requirement. (5147 <https://github.com/pypa/pip/issues/5147>_)
- Present 401 warning if username/password do not work for URL (4833 <https://github.com/pypa/pip/issues/4833>_)
- Handle requests.exceptions.RetryError raised in PackageFinder that was causing pip to fail silently when some indexes were unreachable. (5270 <https://github.com/pypa/pip/issues/5270>_, 5483 <https://github.com/pypa/pip/issues/5483>_)
- Handle a broken stdout pipe more gracefully (e.g. when running pip list | head). (4170 <https://github.com/pypa/pip/issues/4170>_)
- Fix crash from setting PIP_NO_CACHE_DIR=yes. (5385 <https://github.com/pypa/pip/issues/5385>_)
- Fix crash from unparseable requirements when checking installed packages. (5839 <https://github.com/pypa/pip/issues/5839>_)
- Fix content type detection if a directory named like an archive is used as a package source. (5838 <https://github.com/pypa/pip/issues/5838>_)
- Fix listing of outdated packages that are not dependencies of installed packages in pip list --outdated --not-required (5737 <https://github.com/pypa/pip/issues/5737>_)
- Fix sorting TypeError in move_wheel_files() when installing some packages. (5868 <https://github.com/pypa/pip/issues/5868>_)
- Fix support for invoking pip using python src/pip .... (5841 <https://github.com/pypa/pip/issues/5841>_)
- Greatly reduce memory usage when installing wheels containing large files. (5848 <https://github.com/pypa/pip/issues/5848>_)
- Editable non-VCS installs now freeze as editable. (5031 <https://github.com/pypa/pip/issues/5031>_)
- Editable Git installs without a remote now freeze as editable. (4759 <https://github.com/pypa/pip/issues/4759>_)
- Canonicalize sdist file names so they can be matched to a canonicalized package name passed to pip install. (5870 <https://github.com/pypa/pip/issues/5870>_)
- Properly decode special characters in SVN URL credentials. (5968 <https://github.com/pypa/pip/issues/5968>_)
- Make PIP_NO_CACHE_DIR disable the cache also for truthy values like "true", "yes", "1", etc. (5735 <https://github.com/pypa/pip/issues/5735>_)

Vendored Libraries
------------------

- Include license text of vendored 3rd party libraries. (5213 <https://github.com/pypa/pip/issues/5213>_)
- Update certifi to 2018.11.29
- Update colorama to 0.4.1
- Update distlib to 0.2.8
- Update idna to 2.8
- Update packaging to 19.0
- Update pep517 to 0.5.0
- Update pkg_resources to 40.6.3 (via setuptools)
- Update pyparsing to 2.3.1
- Update pytoml to 0.1.20
- Update requests to 2.21.0
- Update six to 1.12.0
- Update urllib3 to 1.24.1

Improved Documentation
----------------------

- Include the Vendoring Policy in the documentation. (5958 <https://github.com/pypa/pip/issues/5958>_)
- Add instructions for running pip from source to Development documentation. (5949 <https://github.com/pypa/pip/issues/5949>_)
- Remove references to removed egg=<name>-<version> functionality (5888 <https://github.com/pypa/pip/issues/5888>_)
- Fix omission of command name in HTML usage documentation (5984 <https://github.com/pypa/pip/issues/5984>_)

</details>

<details>

- PyPI: https://pypi.org/project/pip
- Changelog: https://pyup.io/changelogs/pip/
- Homepage: https://pip.pypa.io/
</details>

Co-authored-by: pyup-bot <github-bot@pyup.io>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>


text:
# AGMF03_20_20-Schem

Schematic diagram. I know I should be using more labels, but I really like having everything compactly in one rectangle. I’ll probably produce a more human-readable version soon. :/


text:
## Calculus: Early Transcendentals 8th Edition

$e^{\pi}\cos 1+ie^{\pi}\sin 1$
We use Equation 7 from the text (a modification of Euler's formula), $e^{x+iy}=e^x(\cos{y}+i\sin{y})$: $e^{\pi+i}=e^{\pi+1*i}=e^{\pi}(\cos 1+i\sin 1)=e^{\pi}\cos 1+ie^{\pi}\sin 1$


text:
# Rogers–Ramanujan identities

In mathematics, the Rogers–Ramanujan identities are two identities related to basic hypergeometric series, first discovered and proved by Leonard James Rogers (1894). They were subsequently rediscovered (without a proof) by Srinivasa Ramanujan some time before 1913. Ramanujan had no proof, but rediscovered Rogers's paper in 1917, and they then published a joint new proof (Rogers & Ramanujan 1919). Issai Schur (1917) independently rediscovered and proved the identities.

## Definition

The Rogers–Ramanujan identities are

$G(q) = \sum_{n=0}^\infty \frac {q^{n^2}} {(q;q)_n} = \frac {1}{(q;q^5)_\infty (q^4; q^5)_\infty} =1+ q +q^2 +q^3 +2q^4+2q^5 +3q^6+\cdots \,$ (sequence A003114 in OEIS)

and

$H(q) =\sum_{n=0}^\infty \frac {q^{n^2+n}} {(q;q)_n} = \frac {1}{(q^2;q^5)_\infty (q^3; q^5)_\infty} =1+q^2 +q^3 +q^4+q^5 +2q^6+\cdots \,$ (sequence A003106 in OEIS).

Here, $(\cdot;\cdot)_n$ denotes the q-Pochhammer symbol.

## Modular functions

If q = e2πiτ, then q−1/60G(q) and q11/60H(q) are modular functions of τ.

## A Framework for the Identities

In April 2014 Ken Ono, a number theorist at Emory University, announced that he had found a framework for the Rogers-Ramanujan identities and their arithmetic properties, solving a long-standing mystery stemming from the work of Ramanujan. The findings yield a treasure trove of algebraic numbers and formulas to access them. Ono has two co-authors for this work, S. Ole Warnaar of the University of Queensland and Michael Griffin, an Emory University graduate student.

## Applications

The Rogers–Ramanujan identities appeared in Baxter's solution of the hard hexagon model in statistical mechanics.

$1+\frac{q}{1+\frac{q^2}{1+\frac{q^3}{1+\cdots}}} = \frac{G(q)}{H(q)}.$